ElastiCache
Introduction
In-memory data stores on AWS.
Types:
Redis
Memcached
Feature
AWS takes care of the OS maintenance / patching, optimizations, setup, configuration, monitoring, failure recovery and backups.
Using ElastiCache involves heavy application code change.
Scenario steps:
Lifting load from DB
If data found from cache, return data.
If data not found from cache, read from DB. Then write it to cache.
Must have an invalidation strategy to avoid consistency problem.
ElastiCache - Memcached vs Redis
Memcached
Multi-node for partitioning of data (sharding)
Non-persistent
No backup and restore
Multi-threaded architecture
Redis
Can scale up / down dynamically through CLI / console
Multi AZ with auto-failover
With Read replicas to scale with high availability
Persistent durability:
Enable Append-only file (AOF) for manual backups: logs every write operation received by the server, that will be played again at server startup, reconstructing the original dataset.
Handling Extreme Rates
The more components are used in the right, more cost would occur. Try to utilize components in the left.
Last updated