A travel booking service runs stateful sticky sessions on EC2 with local carts, causing lost bookings on scaling and AZ failure. It needs seamless failover, sub-10ms session reads, and durable itineraries. Which stateless design with externalized state meets resilience and performance goals?
Select an answer to reveal the explanation.
Short Explanation
Sticky servers are like keeping wallets in your pockets with holes. Externalized state puts sessions somewhere safe so any server can serve anyone.
Full Explanation
Stateless containers behind an Application Load Balancer eliminate affinity, ElastiCache for Redis provides sub-millisecond session reads with replication, DynamoDB offers durable highly available cart state with TTL and conditional writes, and S3 stores immutable itineraries with versioning for resilience across AZs. Stateful EC2 with sticky sessions and EBS volumes ties users to hosts and nightly snapshots, so scaling events and AZ failures lose in-flight carts and breach availability. In-memory gossip plus instance store is ephemeral, complex to keep consistent, and loses all state on termination or AZ loss. Lambda with EFS file locks introduces lock contention, higher latency, and POSIX semantics unsuited to high-concurrency session access compared to purpose-built key-value stores. For the exam default to managed state services over host-local storage for stateless scale, and in practice validate Redis eviction, DynamoDB capacity mode, and S3 lifecycle for cost and durability.