Elastic Cache
REDIS VS MEMCACHED
| RDS | MEMCACHED |
|---|---|
| MultiAZ with auto-failover | Multi Node for partition of Data(Sharding) |
| Read Replicas to Scale and Have High Availability | No High availability(Replication) |
| Data Durability using AOF persistence | Non Persistent |
| Backup and restore features | Backup and Restore(Serverless version only) |
| Support Sorted Sets and Sets | Multi-Threaded architecture |
REDIS SECURITY
IAM Authentication
IAM authentication can be use for API level security.
Redis Auth
password/token can be set when creating redis cluster
This is extra level of security on top of security groups.
Support SSL in flight encryption
Memcached
Support SASL based authentication
Elastic Cache Patterns
Lazy Loading
read data is cached. Becomes stale in the cache
Write Through
Add or update data to the cache. When we update DB.
Session Store
Temporary Session data are stored in cache(using TTL features)
Elastic Cache - Redis Usecase
For example- Gaming leaderboards
Redis Sorted sets guarantee both uniqueness and element ordering.