Soru

Zorluk: OrtaApplication Caching and Session State Management

A developer is designing a high-traffic web application hosted on Amazon ECS. The application requires a caching layer to store session state data for logged-in users. The session states must be replicated across multiple Availability Zones to ensure high availability, and the cache must support automatic failover. Additionally, the configuration credentials for the cache cluster must be retrieved securely from a service that supports automatic credential rotation. Which architecture should the developer implement to meet these requirements?

  1. Configure Amazon ElastiCache for Redis with replication enabled. Store the cache access credentials in AWS Secrets Manager and configure automatic rotation for the credentials.Cevap
  2. B
    Configure Amazon ElastiCache for Redis with replication enabled. Store the cache access credentials in AWS Systems Manager Parameter Store and configure automatic rotation for the credentials.
  3. C
    Store session state data in Amazon DynamoDB. Implement an AWS Lambda function that runs a periodic Scan operation on the table to identify and delete expired session records.
  4. D
    Store session state data in Amazon DynamoDB. Set the partition key of the table to a constant string value 'ActiveSession' for all users, and increase the provisioned read capacity units (RCUs) to prevent throttling errors.

Cevap

Configure Amazon ElastiCache for Redis with replication enabled. Store the cache access credentials in AWS Secrets Manager and configure automatic rotation for the credentials.
The correct solution uses Amazon ElastiCache for Redis with replication enabled, which provides multi-AZ replication, high availability, and automatic failover. The credentials are stored in AWS Secrets Manager, which natively supports automatic rotation of secrets. This directly satisfies all the requirements.

Adım Adım Çözüm

1
Analyze high availability and failover requirements for the session store.
Identify Amazon ElastiCache for Redis as the correct choice since it supports replication, Multi-AZ, and automatic failover, whereas Memcached does not support replication.
The system requires session state data to be replicated across multiple Availability Zones with automatic failover.
2
Analyze security and rotation requirements for credentials.
Select AWS Secrets Manager as the credential storage solution because it supports native automatic rotation, unlike Systems Manager Parameter Store.
The configuration credentials must be stored securely and rotated automatically.
3
Evaluate DynamoDB configurations to rule out anti-patterns.
Discard options suggesting manual Scan cleanups or low-entropy partition keys as they introduce severe performance bottlenecks and high costs.
DynamoDB should use high-entropy keys to avoid hot partitions and use Time to Live (TTL) for session expiration instead of manual Scan operations.

Anahtar Kavram

Selecting and configuring the appropriate caching and state management services in AWS based on high availability, performance, and security requirements.
Bu soruyu puanla