Monitoring ElastiCache for Performance and Availability Flashcards
ElastiCache supports two engines
Memcached and Redis
Monitoring Metrics
- -CPU Utiliazation
- -Evictions
- -CurrConnections
- -Swap Usage(Memcached)
CPU Utilization
CPU host-level metrics
CPU Utilization – Memcached
- multi-threaded]
- can handle loads of up to 90%
- above 90% becomes a problem
- Solution: increase the size of the node or scale out by adding more nodes;
CPU Utilization – Redis
– calculate the threshold:(90/# of CPU cores)
–Solution: for read-heavy workloads, increase the number of read replicas
for write-heavy workloads, use a larger cache instance.
Evictions
happen when a new item is added but there is no more memory space. an older item must be deleted to make space.
Evictions – cont.
- can be a caching technique used to make sure you do not run out of memory
- if items get evicted too frequently, it defeats the purpose and will decrease performance
- CloudWatch alarms can notify you of a certain threshold.
- Memcached solution: increase instance size or add nodes to your cluster
- Redis solution: increase the node size.
Current connections
an increase in currconnections could indicate a larger problem with your application
- the application may not be releasing connections
- Choose a threshold based off of your application requirements.
Swap Usage(Memcached)
caused because the memory allocated for connection information and other overhead items gets mazed out
– should stay at 0, and not exceed 50MB.
– affects performance and should be avoided.
Solution: increase node size
– increase our ConnectionOverhead parameter value(this will decrease memory available for caching data).