Soru

Zorluk: Çok zorHigh-Performing Content Delivery and Caching Solutions

A financial services company hosts a high-frequency trading dashboard on Amazon EC2 instances located in private subnets of a VPC. The application performs millions of read queries per second against an Amazon DynamoDB table containing real-time stock market ticker symbols. The dashboard requires sub-millisecond response times for read operations. During peak market hours, read throughput spikes dramatically, causing DynamoDB throttling and increased latency. The solutions architect must design a high-performing and cost-effective caching solution to solve this performance bottleneck. Which architecture will meet these requirements with the lowest latency and optimal cost-efficiency?

  1. A
    Deploy an Amazon CloudFront distribution in front of an Application Load Balancer that routes requests to the EC2 instances. To ensure the dashboard always displays real-time stock ticker data, configure the CloudFront cache behavior with a Minimum TTL, Maximum TTL, and Default TTL of 0 seconds.
  2. B
    Implement an application-level caching mechanism that writes queried ticker data as temporary JSON files to an Amazon S3 bucket. Configure the S3 bucket to use the Amazon S3 Standard-Infrequent Access (S3 Standard-IA) storage class, and use an S3 Lifecycle rule to expire objects after 24 hours.
  3. Provision an Amazon DynamoDB Accelerator (DAX) cluster in the VPC subnets where the EC2 instances reside. Update the application configuration to use the DAX client SDK to query the DAX cluster endpoint instead of the database table directly.Cevap
  4. D
    Configure the application on the EC2 instances to write query responses to an Amazon S3 bucket. Access the cached data via S3 GET requests routed through a NAT Gateway in the public subnet to bypass DynamoDB read capacity limits.

Cevap

Provision an Amazon DynamoDB Accelerator (DAX) cluster in the VPC subnets where the EC2 instances reside. Update the application configuration to use the DAX client SDK to query the DAX cluster endpoint instead of the database table directly.
Amazon DynamoDB Accelerator (DAX) is an in-memory, fully managed write-through cache designed specifically for Amazon DynamoDB. It reduces read response times to microseconds (sub-millisecond) and offloads read capacity requirements from the database table. Because it runs inside the VPC and integrates transparently via the DAX SDK, it is the most performant and cost-effective solution for read-heavy stock ticker workloads.

Adım Adım Çözüm

1
Analyze performance and database constraints
Workload requires sub-millisecond (microsecond) latency under millions of read queries per second against Amazon DynamoDB, while minimizing costs.
This establishes the requirement for an in-memory caching layer that sits directly in front of DynamoDB to prevent throttling and latency spikes.
2
Evaluate Amazon DynamoDB Accelerator (DAX) for performance and integration
DAX delivers microsecond latency, integrates seamlessly with the DynamoDB API, requires no application rewrite of query logic, and offloads read capacity requirements directly.
DAX is the native caching layer for DynamoDB and provides the lowest latency path with minimal management overhead.
3
Identify architectural and financial flaws in alternative options
Using CloudFront with TTL=0 eliminates caching benefits; using S3 Standard-IA for short-lived assets incurs a 30-day minimum storage charge penalty; using a NAT Gateway for high-volume S3 traffic incurs excessive data transfer processing fees.
These alternatives violate either performance (latency) or cost-efficiency constraints, failing to provide a high-performing architecture.

Anahtar Kavram

Selecting the optimal caching layer to accelerate database queries and minimize operational costs under high throughput

Alternatif Yöntem

Alternatively, if the application was built on a relational database like Amazon RDS, Amazon ElastiCache (Redis OSS or Memcached) could be used to cache query results at the application layer, though it requires custom cache invalidation logic compared to the seamless integration of DAX with DynamoDB.
Tahmini Süre:3m 0s
Bu soruyu puanla