Soru

Zorluk: OrtaApplication Caching and Session State Management

A gaming company is launching a multiplayer mobile game. The backend application requires a highly scalable data store to manage active player session states (such as scores and connection statuses) that are updated frequently and must expire after 24 hours of inactivity. The application also needs to cache static, read-heavy matchmaking lobby configurations to minimize database read latency.

Which combination of strategies should a developer implement to meet these requirements? (Select TWO.)

  1. Store player session states in an Amazon DynamoDB table with Time to Live (TTL) enabled, and retrieve session records using Query operations based on unique player IDs.Cevap
  2. Deploy an Amazon ElastiCache for Memcached cluster to cache the static matchmaking configurations and game rule metadata.Cevap
  3. C
    Store player session states in an Amazon DynamoDB table, and retrieve active sessions using periodic Scan operations filtered by session state.
  4. D
    Store session database access credentials in AWS Systems Manager Parameter Store and enable automatic credential rotation.
  5. E
    Store player session states in an Amazon DynamoDB table using a single partition key value for all active game lobbies to simplify partition management.

Cevap

The correct strategies are to store player session states in an Amazon DynamoDB table with Time to Live (TTL) enabled, retrieving them using Query operations based on unique player IDs, and to deploy an Amazon ElastiCache for Memcached cluster to cache static matchmaking configurations.
The correct strategies involve using Amazon DynamoDB with Time to Live (TTL) enabled for player session states, retrieving them using Query operations based on unique player IDs, and deploying an Amazon ElastiCache for Memcached cluster to cache static matchmaking configurations. DynamoDB with TTL automatically deletes expired session data without consuming write capacity. Querying DynamoDB by player ID ensures low-latency single-item lookups. ElastiCache for Memcached is ideal for simple, read-heavy key-value configurations, which offloads read requests from the primary database.

Adım Adım Çözüm

1
Evaluate the requirement for storing active player session states that are updated frequently and must expire after 24 hours.
Amazon DynamoDB is a highly scalable key-value database, and enabling TTL allows automatic expiration of inactive sessions after 24 hours without incurring additional write capacity costs. Accessing sessions via Query or GetItem using unique player IDs provides low-latency retrieval.
This meets the session storage and expiration requirements efficiently.
2
Evaluate the requirement to cache static, read-heavy matchmaking lobby configurations.
Amazon ElastiCache for Memcached is an in-memory key-value store optimized for simple data types and read-heavy workloads, making it ideal for caching static configuration data.
This offloads read traffic from the primary database, reducing latency and cost.
3
Analyze the incorrect options against AWS best practices and the target scenario.
Using Scan operations instead of Query or GetItem results in poor performance and high RCU consumption. Parameter Store does not support automatic rotation. A single partition key for all sessions creates a hot partition and leads to throttling.
This confirms that the other options represent sub-optimal designs or incorrect service usage.

Anahtar Kavram

Application Caching and Session State Management
Bu soruyu puanla