Monitoring Elasticache
- Consists of 2 different engines:
- Memcached
- Redis
- When it comes to monitoring cache engines, there are 4 monitoring points:
- CPU Utilization
- Memcached:
- Multi-threaded
- Handles loads of up to 90% CPU utilization
- If > 90% CPU utilization add more nodes to the cluster
- Redis:
- Single-threaded
- Take 90% and / number of cores to determine scale point
- Will not have to calculate Redis CPU utilization in exam
- Swap Usage
- Memcached:
- Should be around 0 most of the time and should not exceed 50MB
- If 50MB is exceeded, you should increase the memecached_connections_overhead parameter
- memecached_connections_overhead defines the amount of memory to be reserved for Memcached connections and other misc. overhead
- Redis
- No SwapUsage metric, instead use reserved-memory
- The amount of the Swap file that is used.
- Swap file is the amount of disk storage space reserved on disk if your computer runs out of RAM
- Typically the size of the swap file = the amount of RAM available
- Evictions
- Memcached:
- No recommended setting
- Choose a threshold-based off your application
- Scale up (increase the memory of existing nodes) or Scale out (add more nodes) to avoid evictions
- Redis:
- No recommended setting
- Choose a threshold-based off your application
- Only scale out (add read replicas) to avoid evictions
- Like clowns stuffed in a car, There, is a finite number of empty seats that slowly fill up. Eventually, the car is full and if more seats are needed, then an Eviction will occur
- Evictions occur when a new item is added and an old item must be removed due to lack of free space on the system
- Concurrent Connections
- No recommended setting
- Choose a threshold-based off your application
- If there is a large and sustained spike in the number of concurrent connections, this can either mean a large traffic spike or your application is not releasing connections efficiently
- CPU Utilization