SAA-C03 exam dumps

SAA-C03 practice question 114 of 553

AWS Certified Solutions Architect - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

SAA-C03 Question 114

Single answer

You are designing a microservices-based architecture for a new e-commerce application that handles frequent user sessions and shopping cart data. Which design approach should you follow to ensure scalability and fault tolerance in the application?

  1. A

    Store session state and shopping cart data in the microservice's memory to reduce latency.

  2. B

    Use a distributed cache or database to store session state and shopping cart data for scalability.

  3. C

    Design microservices to maintain user session states locally to avoid external dependencies.

  4. D

    Use a stateful design for microservices to maintain a persistent connection with the client.

Show answer and explanation

Correct answer: B

Explanation

Microservices should be designed to be stateless whenever possible to maximize scalability and fault tolerance. For scenarios requiring state management, such as session state or shopping cart data, an external distributed cache or database (e.g., Amazon ElastiCache or DynamoDB) should be used. This ensures that data is not tied to any specific microservice instance and can be accessed by other instances if needed.

  • A. Incorrect.

    Storing session state and shopping cart data in the microservice's memory is not scalable because the data is tied to a specific instance. If the instance is terminated or restarted, the state would be lost.

  • B. Correct.

    Using a distributed cache or database allows session state and shopping cart data to be centralized and accessible across multiple instances, enabling scalability and fault tolerance.

  • C. Incorrect.

    Maintaining user session states locally in microservices limits scalability and increases the risk of data loss if a microservice instance fails or is terminated.

  • D. Incorrect.

    Stateful designs are generally avoided in microservices architectures as they reduce scalability and fault tolerance by requiring persistent connections between clients and specific service instances.

Timed practice exam

Take a SAA-C03 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam