MemoryDB is an AWS in-memory database compatible with Redis. It writes data to disk while serving reads from memory, using a distributed transaction log across multiple data centers. This persistence makes it suitable as a primary database when a key-value store is sufficient. section 11.2.5
Persistence increases write latency from microseconds to milliseconds. Suitable workloads include shopping carts, CMS content and comments, and IoT device status. Compared with ElastiCache, MemoryDB favors persistence guarantees over use as a secondary data store. section 11.2.5 section 11.7
Store sessions and sorted-set scores
Install the Redis client and connect with redis-cli. SET session:gamer1 online EX 15 stores a session for 15 seconds; GET then returns the value before expiration and (nil) afterward. ZADD and ZRANGE maintain and retrieve a scored high-score list.
