Elasticache (Redis) Workshop Call for Questions/Topics to Cover
When: To be finalised ~We’re planning a 2 hour session on the 2nd or 3rd week of January
Who: ElastiCache SME from AWS
How: Via Zoom
Proposed Agenda (Feel free to add/modify topics & ask questions)
Data categories and common use cases
- Relational
- Key-value
- Document
- In-memory
- Graph
Redis vs Memcached
What’s New w/ Redis 5.x and 6.x
What’s New w/ ElastiCache this 2020
Coming Soon / Roadmap
Redis Overview
- Fast
- Open Source
- Easy to learn
- Highly Available
- Atomic operations
- In Memory Key Value Store
- Various Data Structures
- Backup/Restore (Snapshotting)
Self-managed Redis is Challenging
- Difficult to Manage
- Difficult to make Highly Available
- Difficult to Scale
- Higher TCO
ElastiCache Redis
- Extreme Performance
- Fully Managed
- Easily Scalable
- Reliable
- Secure & Compliant
- Redis 6.x Compatible
Redis Use Cases
- Caching
- Real-time analytics
- Gaming leaderboards
- Geospatial
- Media Streaming
- Session store
- Chat apps
- Message Queues
Redis cluster-mode disabled (vertically scale) vs enabled (horizontally scaled)
- Configuration & Redis Compliance
- Cluster Size
- Scalability and performance
- Max Connections
- Scaling operations
- Failover
- Failover risk
- Cost
Failover & Operational
- Cluster-mode enabled failoveri
- Zero downtime - Online re-sharding - scale out * scale in
- Online re-sharding - Amazon CloudWatch alarm trigger
Redis Common Architecture Patterns
- Caching
- Real-time: Sentiment analysis
- Real-time Kinesis filtering
- Mobile
- Rate limiting
- Graph & Search integration
Caching Strategies
- Caching patterns
- Lazy Loading
- Write-Through
- Adding TTL
Redis max-memory policies
- noeviction, allkeys-lru, volatile-lru, allkeys-random, volatile-random, volatile-ttl, volatile-lfu, allkeys-lfu
Cluster sizing best practices
- Storage - Clusters should have adequate memory
- Performance - Performance should not be compromised
- Cluster Isolation (apps sharing key space) - Choose a strategy that works for your workload
CloudWatch Monitoring
- Metric: BytesUsedForCache
- Resolution: Scale up / out
- Metric: CacheHits / Metric: CacheMisses
- Resolution: Optimise TTL & Cache Strategy
- Metric: CurrConnections
- Should be stable
- Resolution: Scale Out
- Metric: EngineCPUUtilization
- Should not exceed 90% allocation
- Resolution: scale out
- Metric: Evictions > 1
- Resolution: scale up / out
- Metric: SwapUsage > few MBs
- Resolution: scale up / out
Elasticache Security
- In-Transit Encryption
- At-Rest Encryption
- Authenticating Users (Redis AUTH, RBAC)
- Security Groups
TODO: Analyze at AWS ElastiCache Redis Cases this year 2020
Questions from Traveloka Engineers