Skip to content

Architecture Review for Trading APIs Platform – Performance, Latency, HA, DR, and Security

0

Hi Everyone,

I would like to some help regarding an architecture review and recommendations for our High-Level Design (HLD) of a trading APIs platform running on AWS.

The APIs are latency-sensitive trading APIs used by external clients, therefore we want to ensure the architecture follows AWS best practices for: • Low latency • High availability • Disaster recovery • Horizontal scaling • Security

I attached the architecture diagram for reference.

Current Architecture

Our design is a multi-region Active–Passive architecture:

Regions • Primary region: UAE • Standby region: UK

Request Flow 1. Clients resolve DNS using Amazon Route 53 2. Route53 performs health checks and failover routing 3. Traffic is routed to the healthy region 4. Requests pass through AWS WAF 5. APIs are exposed via Amazon API Gateway 6. Business logic runs in AWS Lambda 7. Lambda retrieves secrets from AWS Secrets Manager 8. Data is stored in Amazon Aurora

Database Architecture • Aurora primary writer in UAE region • Aurora read replica in UK region • Cross-region replication used for disaster recovery

Security • AWS WAF protects APIs • TLS certificates managed via AWS Certificate Manager • Secrets stored in AWS Secrets Manager

Deployment

CI/CD pipelines deploy the Lambda functions and API configurations to both regions.

Questions for AWS Architecture Team

We would appreciate AWS recommendations regarding the following:

  1. Latency Optimization

Is this architecture optimal for latency-sensitive trading APIs, particularly with the request path:

Client → Route53 → WAF → API Gateway → Lambda → Aurora?

Are there any AWS services or patterns that would further reduce latency?

  1. Multi-Region Failover

Is Route53 health-check failover the recommended approach for this use case, or would AWS Global Accelerator provide better latency and failover performance?

  1. Lambda Suitability

Is AWS Lambda appropriate for high-throughput trading APIs with strict latency requirements, or would AWS recommend alternatives such as containerized workloads or EC2 for more predictable performance?

  1. Aurora Cross-Region Replication

Is the Aurora primary in UAE with cross-region replica in UK the best approach for DR?

What is the recommended strategy for failover and promotion of the replica during a regional outage?

  1. Security Architecture

Is placing AWS WAF in front of Amazon API Gateway the recommended pattern for API protection?

Are there additional security best practices you would recommend?

  1. Scaling

Do you foresee any scaling bottlenecks in this architecture under high trading load?

  1. General Best Practices

Are there any recommended improvements to enhance: • Performance • Availability • Disaster recovery • Security

Thank Alot!Enter image description here

1 Answer
0

I have few observations on the architecture:

1. API Gateway → Lambda → Aurora Direct Write Pattern

Synchronous blocking: Each API request waits for the database write to complete, increasing latency

No buffering: Sudden traffic spikes directly hit Aurora, potentially overwhelming the database

Limited throughput: Lambda concurrency limits could bottleneck high-frequency trading operations.

Cold start impact: Lambda cold starts add unpredictable latency to time-sensitive trades

2. Missing Resilience Details For a trading application, the architecture lacks critical resilience components:

Circuit breakers: No mention of retry logic, exponential backoff, or failure isolation

Rate limiting: Beyond WAF, no API-level throttling or quota management

Data consistency: No discussion of transaction handling during failover scenarios

RTO/RPO targets: No defined recovery time/point objectives

Connection pooling: Lambda's ephemeral nature makes database connection management challenging

Idempotency: Critical for trading - no mention of duplicate transaction prevention

Time stamping the trades is very critical. You may refer the blog post How Derive scaled their low-latency, decentralized trading platform using AWS Graviton, Amazon EKS, and Amazon Aurora about handling trade latency.

AWS
EXPERT
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.