diff options
Diffstat (limited to 'src/certifications/aws-solutions-architect/elasticache.md')
-rw-r--r-- | src/certifications/aws-solutions-architect/elasticache.md | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/certifications/aws-solutions-architect/elasticache.md b/src/certifications/aws-solutions-architect/elasticache.md new file mode 100644 index 0000000..a17626b --- /dev/null +++ b/src/certifications/aws-solutions-architect/elasticache.md @@ -0,0 +1,53 @@ +# ElastiCache + +## Overview + +ElastiCache is Amazon's offering for managed Redis or Memcached. + +Caches are in-memory dbs with high perf and low latency. They allow quick access to data without having to reach the DB disk. + +This helps: + +- Latency +- Reduce load on DB resources +- Makes application stateless + +> AWS will take care of maintenance, patching, optimisations, monitoring, failure etc for you + +## Architecture + +Apps query the cache, but if it misses, then it will read from DB. + +Caches should have an invalidation strategy + + + +## Use session store + +Another good use case is for a session store for a user's session: + + + +## Elasticcache security + +- ElastiCache support IAM Auth for Redis +- IAM is only used for API level access, though +- There is also Redis auth, which allows you to create a user/pw combination for Redis cluster and is an extra layer of security +- Memcached supports SASL based auth + +## ElastiCache patterns + +1. **LazyLoading**: this involves writing all data to cache for quick access. Data can quickly become stale. +1. **Write Throgh**: When data is written to the the db, also write to cache +1. **Session store**: Store temporary data in cache (such as session info) + +## Redis use case + +> Important for the exam + +- Gaming leaderboards are computationally complex +- **Redis sorted sets** guarantees uniqueness and element ordering +- Each time an element is added, it's ranked in realtime, then added in correct order: + + + |