Soru

Zorluk: OrtaImproving Database and Caching Efficiency

A fleet telematics platform for a global shipping company tracks container location, internal temperature, and humidity sensors. The telemetry data ingestion service writes updates to an Amazon RDS for PostgreSQL DB instance. A fleet dashboard application frequently queries the database to retrieve the latest state configurations for thousands of active containers. During shift handovers, query volume to retrieve container state configurations spikes dramatically, causing the RDS DB instance to reach 98% CPU utilization and leading to timeout errors in the dashboard. The container state configuration data is highly repetitive, must survive cache node restarts, and requires high availability with sub-millisecond read latency and automatic failover across multiple Availability Zones. Which of the following database and caching strategies should a Solutions Architect implement to resolve the performance bottleneck while meeting the availability and latency requirements?

  1. A
    Configure the Amazon RDS for PostgreSQL DB instance to use a Multi-AZ deployment. Modify the dashboard application's read database connection strings to target the secondary standby DB instance's endpoint during query spikes, offloading the primary DB instance.
  2. B
    Deploy an Amazon ElastiCache for Memcached cluster with nodes distributed across multiple Availability Zones. Configure the dashboard application to use client-side hashing to partition the container state configuration data across the nodes, and enable automatic multi-AZ replication to ensure the configuration data survives node failures.
  3. Deploy an Amazon ElastiCache for Redis replication group with Multi-AZ and automatic failover enabled. Modify the dashboard application to use a cache-aside pattern to read container configurations from ElastiCache, falling back to the PostgreSQL database on cache misses and writing updates to the cache when the database is updated.Cevap
  4. D
    Set up a pilot light disaster recovery database environment in a secondary AWS Region with a smaller instance class using cross-region replication. During peak shift handovers, configure the dashboard application to route all container state queries to the secondary region's database to offload the primary database.

Cevap

Deploy an Amazon ElastiCache for Redis replication group with Multi-AZ and automatic failover enabled, and use a cache-aside pattern in the fleet dashboard application.
Deploying Amazon ElastiCache for Redis with replication and Multi-AZ enabled provides sub-millisecond read latency, handles high read-traffic spikes, ensures high availability with automatic failover, and maintains cached data across node restarts because Redis supports data persistence and replication.

Adım Adım Çözüm

1
Analyze database requirements and workload characteristics
Identified high CPU utilization on RDS PostgreSQL due to read spikes of static container state configurations, requiring sub-millisecond response times, persistence, and high availability with automatic failover.
To select the appropriate caching or database scaling mechanism that satisfies all constraints.
2
Evaluate ElastiCache engines (Redis vs. Memcached)
ElastiCache for Redis supports replication, Multi-AZ with automatic failover, and persistence (data surviving node restarts), whereas Memcached does not support replication or persistence.
To ensure the caching layer meets the high availability and survival requirements.
3
Evaluate RDS architecture options (Multi-AZ vs. Read Replicas)
RDS Multi-AZ standby instances are passive and cannot serve reads. RDS Read Replicas can serve reads but have higher latency than ElastiCache and do not solve the sub-millisecond requirement as efficiently.
To rule out invalid database routing configurations.
4
Select the correct pattern
Deploying ElastiCache for Redis with Multi-AZ and applying a cache-aside pattern in the fleet dashboard application resolves the bottleneck.
To achieve sub-millisecond read latency, high availability, and database load reduction.

Anahtar Kavram

Improving Database and Caching Efficiency using ElastiCache for Redis
Tahmini Süre:2m 0s
Bu soruyu puanla