Question

Difficulty: MediumAWS Database Services

An e-commerce company is migrating its monolithic application to a microservices architecture. They want to separate their temporary shopping cart session data from their primary transactional customer database to ensure loose coupling. The new shopping cart service requires a database that automatically scales horizontally to support millions of active users with predictable, single-digit millisecond latency for simple key-value lookups. Which AWS database service is best suited for this shopping cart service?

  1. A
    Amazon RDS
  2. Amazon DynamoDBAnswer
  3. C
    Amazon Redshift
  4. D
    Amazon Neptune

Answer

Amazon DynamoDB is the best choice because it is a managed NoSQL database designed for single-digit millisecond latency and seamless horizontal scaling, which aligns perfectly with key-value session data in a decoupled microservices architecture.
Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. For a shopping cart microservice requiring single-digit millisecond response times and automatic horizontal scaling to handle traffic spikes, DynamoDB's key-value data model is the ideal choice. It allows the microservices architecture to remain loosely coupled by offloading session state from the primary transactional relational database.

Step-by-Step Solution

1
Analyze the application requirements.
The workload requires storing temporary key-value data (shopping cart sessions) with single-digit millisecond latency and automatic horizontal scaling to handle promotional spikes.
Understanding the data structure and access patterns helps narrow down the database categories (relational vs. NoSQL).
2
Evaluate the architectural constraints.
The architecture must support loose coupling by separating the session microservice's database from the main transactional database.
Selecting a dedicated, purpose-built database service for the microservice prevents monolithic dependency bottlenecks.
3
Compare AWS database services.
Amazon DynamoDB is a fully managed NoSQL key-value database designed for single-digit millisecond latency and seamless horizontal scaling, matching all criteria.
Aligning the workload requirements with the capabilities of each AWS database service yields the optimal solution.

Key Concept

Matching database workloads (NoSQL key-value vs relational) to AWS database services based on scaling and latency requirements.
Rate this question