What is AWS ElastiCache?
Why Interviewers Ask This
This tests whether you can apply AWS / Cloud Computing knowledge to real-world scenarios. Interviewers are looking for clarity of thought and evidence that you've encountered this in production code.
Answer
Amazon ElastiCache is a fully managed, in-memory caching service that significantly improves application performance by making data retrieval fast. Supports two engines: Redis: advanced data structures (strings, lists, sets, sorted sets, hashes, geospatial, streams). Persistence (AOF, RDB snapshots). Pub/Sub messaging. Multi-AZ with automatic failover. Read replicas. Cluster mode (horizontal sharding up to 500 nodes). Lua scripting. Best for: session caching, leaderboards, real-time analytics, pub/sub, complex data structures. ElastiCache for Redis vs Amazon MemoryDB for Redis (stronger durability — transactions logged to Multi-AZ log); Memcached: simpler, multi-threaded. Pure cache (no persistence). Auto discovery of nodes. Horizontal scaling (add nodes). Best for: simple caching, multi-threaded applications. No replication or persistence. Common use cases: Database query caching — results of expensive SQL queries cached for seconds to minutes; Session store — user session data accessible across multiple app servers; API response caching — reduce downstream calls; Distributed locking — atomic Redis commands (SETNX) for distributed locks; Real-time leaderboards — Redis sorted sets (ZADD/ZRANGE). Cluster mode disabled vs enabled: disabled — single shard (primary + replicas), simpler, up to 500GB. Enabled — data partitioned across multiple shards, up to 500 nodes. Access: only from within the same VPC (not public internet). Pricing: per node-hour + data transfer. No charges for data at rest.
Common Mistake
Don't just define the term — demonstrate that you understand when to use it and when not to. Showing awareness of trade-offs is what separates average from strong AWS / Cloud Computing candidates.