Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/naorlivne/marathon-rabbit-autoscale
autoscale marathon services based on rabbitmq queue length
https://github.com/naorlivne/marathon-rabbit-autoscale
Last synced: 20 days ago
JSON representation
autoscale marathon services based on rabbitmq queue length
- Host: GitHub
- URL: https://github.com/naorlivne/marathon-rabbit-autoscale
- Owner: naorlivne
- License: apache-2.0
- Created: 2018-08-16T07:46:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-29T09:25:53.000Z (about 4 years ago)
- Last Synced: 2024-12-10T11:48:44.577Z (24 days ago)
- Language: Python
- Size: 8.79 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# marathon-rabbit-autoscale
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:
* MIN_TASK_SIZE
* MAX_TASK_SIZE
* SCALE_EVERY_X_WAITING_MESSAGES
* RABBIT_HOST
* RABBIT_API_PORT (example: 15672)
* RABBIT_VHOST (example: /)
* RABBIT_QUEUE
* RABBIT_USER
* RABBIT_PASSWORD
* MARATHON_URL (example: leader.mesos for use inside mesos)
* MARATHON_PORT (example: 8080)
* MARATHON_APPexample 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
}
]
}
````````