Soru

Zorluk: KolayApplication Caching and Session State Management

A developer is maintaining an application that runs on a fleet of Amazon EC2 instances and frequently retrieves configuration parameters from AWS Systems Manager Parameter Store. Due to a recent surge in traffic, the application is receiving HTTP 400 (ThrottlingException) errors when calling the Parameter Store API. Which of the following is the most cost-effective way to resolve this throttling issue with minimal latency?

  1. A
    Migrate the configuration parameters from AWS Systems Manager Parameter Store to AWS Secrets Manager.
  2. B
    Store the configuration parameters in an Amazon DynamoDB table and retrieve them using a Scan operation.
  3. Cache the configuration parameters locally in the application memory with a defined Time to Live (TTL).Cevap
  4. D
    Publish the configuration parameters to an Amazon Kinesis data stream using a single static partition key.

Cevap

Cache the configuration parameters locally in the application memory with a defined Time to Live (TTL).
Caching the configuration parameters locally in the application's memory with a Time to Live (TTL) prevents redundant API requests to Systems Manager Parameter Store. This resolves the throttling errors while reducing retrieval latency to sub-milliseconds without incurring additional AWS service charges.

Adım Adım Çözüm

1
Analyze the cause of the throttling error.
The application frequently reads the same configuration values from Parameter Store, exceeding API request limits.
Understanding why the ThrottlingException occurs helps identify that reducing external API calls is the primary goal.
2
Determine the optimal caching location.
In-memory local caching within the application provides sub-millisecond retrieval latency.
Local caching avoids network overhead and does not require provisioning additional AWS infrastructure.
3
Apply a Time to Live (TTL) policy.
The configuration parameters are stored in memory and only refreshed from Parameter Store after the TTL expires.
TTL ensures the application eventually receives updates to configuration values while drastically reducing API calls.

Anahtar Kavram

Caching Systems Manager Parameter Store values locally to prevent API throttling and improve retrieval latency.
Bu soruyu puanla