Soru

Zorluk: ZorImproving Database and Caching Efficiency

An esports platform manages live matchmaking lobby states and real-time player leaderboards using an Amazon RDS for MySQL Multi-AZ DB instance. During high-concurrency tournament events, the database experiences severe write contention and lock waits on the lobby tables, causing API response times to exceed 5 seconds and dropping active player sessions. The lobby state data is updated frequently, requires sub-millisecond read/write latency, and must remain available across Availability Zones with automatic failover to prevent tournament disruption. The platform also requires advanced sorting capabilities to compute real-time leaderboards.

Which architectural modification most efficiently addresses these performance and availability requirements?

  1. A
    Deploy an Amazon ElastiCache for Memcached cluster with nodes distributed across multiple Availability Zones. Configure the application to write lobby updates to Memcached and read leaderboard queries from the cache.
  2. Migrate the matchmaking lobby state and leaderboard data to an Amazon ElastiCache for Redis cluster running in a multi-node replication group with Multi-AZ enabled. Use Redis sorted sets for the leaderboard sorting.Cevap
  3. C
    Deploy an Amazon RDS Multi-AZ DB instance and configure the application to split read and write queries, routing leaderboard reads to the standby DB instance in the secondary Availability Zone to reduce load on the primary DB instance.
  4. D
    Set up two active RDS MySQL DB instances in different regions to handle writes, using Route 53 failover routing to direct users to the nearest database, relying on Route 53 DNS health checks to detect database degradation.

Cevap

Migrate the matchmaking lobby state and leaderboard data to an Amazon ElastiCache for Redis cluster running in a multi-node replication group with Multi-AZ enabled. Use Redis sorted sets for the leaderboard sorting.
The correct answer is the option proposing migrating matchmaking lobby state and leaderboard data to Amazon ElastiCache for Redis with Multi-AZ enabled and using sorted sets. ElastiCache for Redis supports replication, Multi-AZ with automatic failover, sub-millisecond latencies, and advanced data structures (sorted sets/ZSET) which are perfectly suited for real-time leaderboard sorting and transient lobby state management under high write load.

Adım Adım Çözüm

1
Analyze workload characteristics and database bottlenecks.
Identify that the matchmaking lobby state is transient, highly write-intensive, requires sub-millisecond response times, and needs real-time sorting for leaderboards.
This helps determine if standard RDS read replicas are sufficient or if an in-memory caching tier with specific data structure support is required.
2
Evaluate Amazon ElastiCache engine capabilities (Redis vs. Memcached).
Confirm that Redis is required because it supports replication, Multi-AZ automatic failover, and sorted sets (ZSET) for leaderboards, whereas Memcached lacks these features.
Ensures the selected caching solution meets both the high availability (failover) and functional (sorting) requirements.
3
Evaluate database-level read scaling options.
Recognize that routing reads to an RDS Multi-AZ standby is impossible because the standby is passive and cannot serve traffic.
Prevents architectural designs that rely on invalid assumptions about RDS standby capabilities.

Anahtar Kavram

Selecting ElastiCache Redis over Memcached for workloads requiring replication, Multi-AZ failover, and complex data structures (sorted sets).
Tahmini Süre:2m 30s
Bu soruyu puanla