Question #859
A company operates a social media platform with a backend hosted on-premises using virtual machines. The application exposes a REST API for user interactions, and session data is stored in a centralized file system. The backend uses API keys to manage throttling and differentiate between production and testing environments. During peak usage times, the backend experiences performance bottlenecks, and users report latency when accessing their session data. Management has tasked a solutions architect with redesigning the architecture using cloud services to handle traffic fluctuations and reduce latency without modifying the existing API structure.
Which solution addresses these requirements?
Use a Network Load Balancer (NLB) to route traffic to Amazon EC2 instances running the business logic. Store session data in Amazon Aurora Serverless and enable Auto Scaling for the EC2 instances.
Deploy the REST API behind an Application Load Balancer (ALB) and run the business logic in AWS Lambda. Store session data in Amazon ElastiCache for Redis with cluster mode enabled.
Implement the REST API using Amazon API Gateway. Execute the business logic in AWS Lambda. Store session data in Amazon DynamoDB configured with on-demand capacity.
Migrate the REST API to AWS AppSync and run the business logic in AWS Lambda. Store session data in Amazon S3 with Transfer Acceleration enabled.
Explanation
Option C is correct because:
- Amazon API Gateway manages REST APIs, throttling, and API keys, aligning with the existing setup without requiring API modifications.
- AWS Lambda automatically scales to handle traffic spikes, eliminating performance bottlenecks.
- Amazon DynamoDB (on-demand) offers low-latency access and seamless scalability for session data, addressing latency issues.
Other options are incorrect because:
- A: Aurora Serverless is not optimized for session data (better suited for relational data) and EC2 requires manual scaling management.
- B: ALB lacks built-in API key/throttling management (unlike API Gateway), and ElastiCache requires cluster management.
- D: AWS AppSync changes the API to GraphQL (violating the requirement), and S3 is unsuitable for low-latency session data.
Key Points:
1. Use API Gateway for REST API management and throttling.
2. Serverless (Lambda/DynamoDB) ensures scalability and low latency.
3. Avoid altering the existing API structure.
Answer
The correct answer is: C