The Redis Cloud Autoscaler helps you to scale your Redis Cloud instances to new Memory / throughput limits based on current usage or a pre-set schedule.
The Redis Cloud Autoscaler is and application designed to run in your own environment, it will scale your Redis Cloud in / out based one of two trigger types
-
Prometheus Alerts You can configure your Prometheus Alert Manager ot send webhook alerts to the Redis Cloud Autoscaler, the Autoscaler’s rule-based scaling system will then scale your Redis Cloud instance out / in based off of the alerts it receives.
-
Scheduled Scaling You can configure the Redis Cloud Autoscaler to scale your Redis Cloud instance out / in based on a schedule you define.
Name | Description |
---|---|
REDIS_HOST_AND_PORT |
The private endpoint of the Redis Cloud subscription database. |
REDIS_PASSWORD |
The password for accessing the Redis Cloud database. |
REDIS_CLOUD_API_KEY |
The API key for interacting with Redis Cloud services. |
REDIS_CLOUD_ACCOUNT_KEY |
The account key for authenticating with Redis Cloud. |
REDIS_CLOUD_SUBSCRIPTION_ID |
The ID of the Redis Cloud subscription. |
ALERT_MANAGER_HOST |
The public IP address of the Prometheus Alert Manager instance. |
ALERT_MANAGER_PORT |
The port on which Alert Manager is running (default: 9093). |
The Redis Cloud Autoscaler uses a JSON-based rule system to define how a given Redis Cloud Database should be scaled.
Field Name | Type | Required | Description |
---|---|---|---|
|
String |
Yes |
The Redis Cloud Database ID. |
|
String |
Yes |
This is the type of rule - |
|
String |
Yes |
The way the new scale will be calculated - |
|
String |
Yes |
The way a scaling operation will be triggered - |
|
cron |
No |
Value that triggers the scaling action - currently only pertinent for scheduled triggers, the cron expression to schedule the scaling operation. |
|
double |
Yes |
The value used to scale the Redis Cloud instance in / out. For |
|
No |
The limit to which the Redis Cloud instance can be scaled out to. |
|
|
No |
The minimum limit to which the Redis Cloud instance can be scaled in to. |
Rule to increase memory to 1gb for a Redis Cloud Database with ID 123456
:
{
"dbId": "123456",
"ruleType": "IncreaseMemory",
"scaleType": "Deterministic",
"scaleValue": 1,
"scaleCeiling": 1,
"triggerType":"webhook"
}
Rule to decrease memory to 0.5gb for a Redis Cloud Database with ID 123456
:
{
"dbId": "123456",
"ruleType": "DecreaseMemory",
"scaleType": "Deterministic",
"scaleValue": 0.5,
"scaleFloor": 0.5,
"triggerType":"webhook"
}
Rule to double the throughput for a Redis Cloud Database with ID 123456
:
{
"dbId": "123456",
"ruleType": "IncreaseThroughput",
"scaleType": "Exponential",
"scaleValue": 2,
"scaleCeiling": 100000,
"triggerType":"webhook"
}
Rule to Scale Redis to 50gb at 7:00am every weekday:
{
"dbId": "123456",
"ruleType": "IncreaseMemory",
"scaleType": "Deterministic",
"scaleValue": 50,
"scaleCeiling": 50,
"triggerType":"scheduled",
"triggerValue":"0 7 * * 1-5"
}
Rule To Scale Redis up 3 GB:
{
"dbId": "123456",
"ruleType": "IncreaseMemory",
"scaleType": "Step",
"scaleValue": 3,
"scaleCeiling": 50,
"triggerType":"webhook"
}
-
The Redis Cloud Autoscaler is currently only available for Redis Cloud Pro Subscriptions
-
The Redis Cloud Autoscaler will currently only operate on Subscriptions with as single database
-
The Redis Cloud Autoscaler will currently only scale a database in (down) deterministically (
Deterministic
is the only valid setting forDecreaseMemory
andDecreaseThroughput
)
The Redis Cloud Autoscaler is available as a Docker image, you can pull the image from GitHub’s Docker registry:
docker pull ghcr.io/redis-field-engineering/redis-cloud-autoscaler:latest
You can also download the JAR file from the GitHub Releases Page