Soru

Zorluk: OrtaImproving Database and Caching Efficiency

An online ticketing platform manages a high-volume event booking application on AWS. The application tier connects to an Amazon Aurora PostgreSQL DB cluster with one primary (writer) instance and one Aurora Replica (reader) instance. During flash sales, the platform experiences database latency spikes and connection failures, resulting in dropped bookings. An analysis reveals that the application exhausts the database's maximum connection limit due to a lack of connection pooling. Additionally, database read performance degrades under heavy concurrent searches for the same event catalog, and active user session states are lost during application node scaling. Which two actions should a Solutions Architect recommend to resolve these issues while maintaining high availability and session persistence? (Select TWO.)

  1. Deploy an Amazon RDS Proxy instance between the application and the Aurora PostgreSQL cluster, and update the application connection strings to use the proxy endpoint.Cevap
  2. Deploy an Amazon ElastiCache for Redis cluster with Multi-AZ and replication enabled, and configure the application to store user session data and cache event catalog read queries.Cevap
  3. C
    Deploy an Amazon ElastiCache for Memcached cluster, and configure the application to cache the event catalog and store user session data using Memcached's native replication features.
  4. D
    Migrate the Aurora PostgreSQL cluster to an Amazon RDS PostgreSQL DB instance with Multi-AZ enabled, and configure the application to distribute read-only queries to the Multi-AZ standby replica.
  5. E
    Configure an Amazon ElastiCache for Memcached cluster to act as the primary database cache, and configure the database client to periodically write snapshots of the cache data to Amazon S3 for persistence.

Cevap

Implementing database connection pooling with Amazon RDS Proxy addresses the connection limit exhaustion, and deploying a Multi-AZ Amazon ElastiCache for Redis cluster provides high-availability session persistence and catalog read caching.
Deploying Amazon RDS Proxy introduces database connection pooling, which resolves the connection limits exhaustion on PostgreSQL without application-side connection pool configuration. Deploying ElastiCache for Redis with Multi-AZ replication ensures user session persistence across application scaling events and offloads catalog read requests from the primary database cluster.

Adım Adım Çözüm

1
Analyze connection pooling requirements.
Identify that connection timeouts are caused by application nodes exceeding the PostgreSQL database's max_connections limit.
Resolving connection exhaustion requires a proxy layer that pools database connections.
2
Evaluate Amazon RDS Proxy vs. alternatives.
Determine that Amazon RDS Proxy dynamically pools connections, decreases CPU usage on the database, and handles database failovers transparently without modifying target database engine logic.
RDS Proxy natively supports Aurora PostgreSQL and integrates directly to handle connection pooling.
3
Compare caching engines (Redis vs. Memcached) for session storage and HA.
Identify that user sessions require persistence and high availability. Choose Redis because it supports data replication, Multi-AZ automatic failover, and persistent snapshotting, whereas Memcached is purely in-memory and lacks replication.
Selecting Redis prevents session loss during scaling and cache node outages.

Anahtar Kavram

Improving database efficiency requires addressing scaling limitations at both the connection tier (using RDS Proxy for connection pooling) and the read/state tier (using Amazon ElastiCache for Redis for persistent replication and query caching).
Bu soruyu puanla