Soru

Zorluk: ZorImproving Database and Caching Efficiency

A digital publishing company operates a high-traffic news website with a global audience. The website's user session state and personalized content recommendations are managed by an Amazon RDS for MySQL database. During major breaking news events, the website experiences massive traffic spikes, leading to high CPU utilization and database connection exhaustion on the RDS database due to a massive volume of session read and write operations. The company wants to optimize the database performance and reduce latency by offloading the session management to an in-memory caching tier. The session data must meet the following requirements:
- Retrieve and update session data with sub-millisecond latency.
- Scale horizontally to handle sudden traffic spikes.
- Support data persistence and backup/restore capabilities to recover user session state in the event of an outage.
- Support replication across multiple Availability Zones with automatic failover to maintain high availability.

Which solution should a solutions architect recommend to meet these requirements with the least operational overhead?

  1. Migrate the session state management to an Amazon ElastiCache for Redis cluster with Multi-AZ enabled and automatic failover, and configure automatic backups to Amazon S3.Cevap
  2. B
    Migrate the session state management to an Amazon ElastiCache for Memcached cluster, configuring the nodes across multiple Availability Zones to ensure replication, and schedule regular snapshot exports to Amazon S3.
  3. C
    Deploy Amazon RDS Proxy in front of the RDS for MySQL database to pool database connections, and configure an Amazon RDS Multi-AZ standby instance to offload and scale the session read traffic.
  4. D
    Configure a secondary Amazon RDS for MySQL database in another AWS Region, and use an AWS Lambda-based active-passive pilot light replication strategy to replicate session data, routing traffic using Route 53.

Cevap

Migrate the session state management to an Amazon ElastiCache for Redis cluster with Multi-AZ enabled and automatic failover, and configure automatic backups to Amazon S3.
Migrating the session state to Amazon ElastiCache for Redis is the optimal solution because Redis natively supports sub-millisecond key-value operations, horizontal scaling, Multi-AZ replication with automatic failover, and snapshot backups to Amazon S3 to satisfy the data persistence requirement.

Adım Adım Çözüm

1
Analyze the application requirements: sub-millisecond response times, horizontal scalability, high availability via multi-AZ replication, automatic failover, and data persistence/backups.
Determine that an in-memory caching layer is required to offload transient read/write session workloads from Amazon RDS for MySQL.
Relational databases are not designed to scale cost-effectively under extremely high-volume, transient session read/write loads.
2
Compare the features of Amazon ElastiCache for Redis and Amazon ElastiCache for Memcached.
Select Redis because it natively supports Multi-AZ replication, automatic failover, snapshot backups, and data persistence, whereas Memcached does not support these features.
Memcached is designed for simple, non-persistent, partitioned caching and cannot meet high availability or data recovery requirements natively.
3
Evaluate alternative database scaling strategies, such as RDS Multi-AZ standby read offloading or cross-region pilot light DR.
Rule out the RDS standby instance since it does not accept read connections, and rule out the cross-region pilot light because it lacks real-time synchronization and low-latency access.
Only RDS Read Replicas or Aurora Replicas can handle read queries; standby instances are passive. Pilot light architectures cannot maintain real-time user session state across regions within the required latency threshold.

Anahtar Kavram

Selecting the correct in-memory caching engine (Redis vs. Memcached) based on replication, high availability, and persistence requirements.
Tahmini Süre:2m 0s
Bu soruyu puanla