Cache instance scaling
Scaling Reference Metrics
The smallest shard in a Montplex Cache cluster is 1 shard, with each shard supporting a minimum capacity of 1GB. The current cluster's MemUsage is displayed on both the overview and detailed pages of the cluster.
This metric is calculated as follows:
redis_memory_used_rss_bytes / redis_memory_max_bytes * 100%
- QPS (Commands Executed / sec)
QPS: indicates the number of command executions per second of the Cache instance.
Number of client connections to the Cache instance.
When to Scale
- High MemUsage: When MemUsage reaches 100%, business read/write performance will degrade, and errors may occur. In this case, it's necessary to scale up the cache.
- Low MemUsage: If MemUsage is very low and the number of shards is 2 or more, you can scale down.
- Moderate MemUsage with High Traffic: If MemUsage is moderate but business traffic is very high, and the cache cannot meet current demands, scaling up can improve the business's QPS capabilities.
- High Connection Count: If the number of connections is too high, you need to scale up the cache or reduce the connection configuration on the frontend.
Scaling Limitations
- Exponential Scaling: Currently, Montplex Cache supports only exponential scaling, such as 1, 2, 4, 8, 16, 32, etc.
- Single Shard Limitation: When the number of shards is 1, only scaling up is possible, scaling down is not an option.
- Single-Step Scaling: Currently, only single-step exponential scaling is supported. For example, scaling from 1 shard to 2 shards or from 2 shards to 1 shard. Scaling from 1 shard directly to 4 shards or from 4 shards directly to 1 shard is not supported.
INFO
Future Plans: More scaling options will be supported in the future.
Scaling Methods
Estimated Time: The time required for scaling the Cache is related to the current memory usage of the Cache cluster.
Enabling Cluster Mode
- Select a Cache to be scaled, enter the Overview page, and click the Scale button.
- Select the desired number of shards.
You can see the current number of shards. After selecting the shards, you can view the new cluster memory capacity.
When the shard status changes to Running, it indicates that the Cache scaling operation is complete.
Disabling Cluster Mode:
When the Cluster Mode of the Cache is disabled, direct scaling operations are not supported.