SAA-C03 exam dumps

SAA-C03 practice question 111 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 111

Single answer

You are designing a microservices-based application on AWS. One of the services processes user requests and stores session data temporarily. The team is debating whether to use a stateless or stateful architecture for the service. Which design choice aligns with microservices best practices?

  1. A

    Design the service as stateless and store session data in an external data store like Amazon DynamoDB or ElastiCache.

  2. B

    Design the service as stateful and store session data within the service's local memory.

  3. C

    Design the service as stateful and use Amazon S3 for session storage.

  4. D

    Design the service as stateless but store session data directly in each service instance's local disk.

Show answer and explanation

Correct answer: A

Explanation

Microservices should be stateless to ensure they can scale horizontally and handle failures effectively. This involves offloading any stateful information, such as session data, to external systems like DynamoDB or ElastiCache. By doing so, individual service instances remain independent and replaceable, which supports fault tolerance and scalability.

  • A. Correct.

    This is correct. Microservices are best designed to be stateless, as this allows them to scale horizontally and be more resilient. Storing session data in an external store like Amazon DynamoDB or ElastiCache ensures session data is available independently of the service instance.

  • B. Incorrect.

    This is incorrect. A stateful service ties session data to a specific instance, which makes horizontal scaling and failover more difficult, violating microservices best practices.

  • C. Incorrect.

    This is incorrect. While Amazon S3 is a great storage solution for many use cases, it is not suitable for session storage due to its higher latency compared to in-memory stores like ElastiCache or databases like DynamoDB.

  • D. Incorrect.

    This is incorrect. Storing session data directly on the local disk of each instance makes the service stateful, as the data is tied to specific instances. This approach does not align with microservices best practices.

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