
Answer-first summary for fast verification
Answer: Copy the data from both EBS volumes to Amazon EFS. Modify the application to save new documents to Amazon EFS
## Explanation The problem described is a classic **data consistency issue** in a distributed architecture with multiple EC2 instances and separate EBS volumes. ### Key Issues: 1. **Separate Storage**: Each EC2 instance has its own EBS volume with different subsets of user documents. 2. **Load Balancer Distribution**: The Application Load Balancer distributes requests across both instances, but each instance only has access to its local EBS volume. 3. **No Shared Storage**: There's no centralized storage that both instances can access. ### Why Option C is Correct: - **Amazon EFS (Elastic File System)** provides a fully managed, shared file system that can be mounted by multiple EC2 instances across multiple Availability Zones. - By migrating data to EFS, both EC2 instances can access all documents from a single shared storage location. - New documents saved to EFS will be immediately available to both instances. - This solution provides **data consistency** and **high availability**. ### Why Other Options are Incorrect: - **Option A**: Copying data to both EBS volumes creates data duplication and synchronization issues. It doesn't solve the problem of new documents being written to only one volume. - **Option B**: Directing users to specific servers based on document location is complex, requires sticky sessions, and doesn't solve the fundamental problem of fragmented data. - **Option D**: Application Load Balancers cannot send requests to both servers simultaneously for the same request. This would create duplicate responses and doesn't address the storage architecture issue. ### Best Practices Implemented: 1. **Shared Storage**: EFS provides a centralized, shared file system. 2. **High Availability**: EFS is designed for high availability across multiple AZs. 3. **Scalability**: Both EC2 instances can scale independently while accessing the same data. 4. **Data Consistency**: All users see the same complete set of documents regardless of which instance serves their request.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company is hosting a web application on AWS using a single Amazon EC2 instance that stores user-uploaded documents in an Amazon EBS volume. For better scalability and availability, the company duplicated the architecture and created a second EC2 instance and EBS volume in another Availability Zone, placing both behind an Application Load Balancer. After completing this change, users reported that each time they refreshed the website, they could see one subset of their documents or the other, but never all of the documents at the same time. What should a solutions architect propose to ensure users see all of their documents at once?
A
Copy the data so both EBS volumes contain all the documents
B
Configure the Application Load Balancer to direct a user to the server with the documents
C
Copy the data from both EBS volumes to Amazon EFS. Modify the application to save new documents to Amazon EFS
D
Configure the Application Load Balancer to send the request to both servers. Return each document from the correct server