Question

Difficulty: HardImproving Database and Caching Efficiency

An international flight search and booking platform uses a Multi-AZ Amazon RDS for PostgreSQL DB instance to store flight schedules and seat availability. During peak vacation booking periods, the platform experiences significant read latency spikes and query timeouts on the primary database due to a high volume of flight search queries and connection exhaustion. The booking engine also requires a caching tier for flight search result packages. This cache must support sub-millisecond response times and provide high availability with automatic failover and cross-AZ data replication to prevent cache cold-starts in the event of a node failure. Which three actions should the Solutions Architect take to improve database and caching efficiency while meeting these requirements? (Select THREE.)

  1. Deploy an Amazon RDS Proxy instance between the application and the RDS DB instance to manage database connection pooling.Answer
  2. Deploy an Amazon ElastiCache for Redis cluster in Multi-AZ mode with replication enabled to cache search results.Answer
  3. Deploy one or more Amazon RDS for PostgreSQL read replicas and configure the application to route read-intensive flight search queries to the read replica endpoints.Answer
  4. D
    Deploy an Amazon ElastiCache for Memcached cluster to cache the flight search result packages and enable node auto-recovery.
  5. E
    Configure the application's search queries to target the endpoint of the standby database instance in the secondary Availability Zone of the RDS PostgreSQL Multi-AZ deployment.
  6. F
    Request ELB pre-warming for the Application Load Balancer to prevent database connection timeouts by absorbing instant spikes in database connection attempts.

Answer

Deploying an Amazon RDS Proxy instance, implementing an Amazon ElastiCache for Redis cluster with Multi-AZ replication, and routing read queries to Amazon RDS for PostgreSQL read replicas correctly addresses the connection exhaustion, cache availability, and database read latency requirements.
Deploying Amazon RDS Proxy resolves database connection exhaustion by establishing a pool of reusable connections to the Amazon RDS PostgreSQL instance. Using Amazon ElastiCache for Redis in Multi-AZ mode ensures that the cache layer is replicated across Availability Zones, preventing cold-starts during a failover. Finally, deploying RDS read replicas and routing read queries to them reduces load on the primary DB instance, solving the read latency spikes.

Step-by-Step Solution

1
Address database connection exhaustion by placing a proxy layer between the application and the database.
Amazon RDS Proxy pools database connections, preventing the CPU and memory spikes associated with establishing thousands of simultaneous connection attempts.
Peak traffic periods lead to connection pool exhaustion on the RDS instance, making database connection management critical.
2
Introduce a caching layer that meets the replication and high-availability criteria.
An Amazon ElastiCache for Redis cluster configured with Multi-AZ and replication provides sub-millisecond response times and maintains cache state during a failover.
ElastiCache for Memcached does not support replication or Multi-AZ automatic failover, which would cause cache cold-starts upon node failure.
3
Offload read queries from the primary writer node to horizontal scaling nodes.
RDS PostgreSQL read replicas handle flight search queries, leaving the primary writer node with sufficient capacity to process bookings.
Flight search is a read-heavy workload that can tolerate replication lag, making read replicas ideal for scaling search capacity.

Key Concept

Improving database performance and connection scalability using read replicas, connection pooling, and highly available caching layers.
Rate this question