autoscale marathon services based on a rabbitmq queue size.
1M+
autoscale marathon services based on a rabbitmq queue size using a cronable metronome job requires RabbitMQ’s HTTP Management API as it's the only sane way I've found to pull a queue length without forcing to declare the queue if it doesn't exists.
required envs:
example metronome job config:
{
"id": "marathon-rabbit-autoscale",
"run": {
"cmd": "docker pull naorlivne/marathon-rabbit-autoscale:latest && docker run --rm -e MARATHON_APP=/app_name -e MIN_TASK_SIZE=5 -e SCALE_EVERY_X_WAITING_MESSAGES=500 -e RABBIT_HOST=your_rabbit_host -e RABBIT_API_PORT=your_rabbit_api_port -e RABBIT_VHOST=your_rabbit_vhost -e RABBIT_PASSWORD=your_rabbit_pass -e RABBIT_USER=your_rabbit_user RABBIT_QUEUE=rabbit_queue_to_scale_by -e MARATHON_URL=leader.mesos -e MARATHON_PORT=8080 naorlivne/marathon-rabbit-autoscale:latest",
"cpus": 0.1,
"mem": 256,
"disk": 100
},
"schedules": [
{
"id": "default",
"enabled": true,
"cron": "*/5 * * * *",
"timezone": "UTC",
"concurrencyPolicy": "ALLOW",
"startingDeadlineSeconds": 30
}
]
}
Content type
Image
Digest
Size
29 MB
Last updated
almost 6 years ago
docker pull naorlivne/marathon-rabbit-autoscale