# RabbitMQ Cluster ## Schema ![](https://i.imgur.com/rRklU4J.png) ## Load balancers | PORT | groups | Scaling rule | description | ---- | ------ | ------------ | ----------- | 15672 | - | - | UI balancer | 5672 | - | - | RabbitMQ connections | 443 | rabbitmq-cluster-web-stomp | CPU usage > 60% | Web-Stomp connections ## Main set of instances Description: This group used only for servers and UI 1. (node-0) CPU x4 RAM 4GB 2. (node-1) CPU x2 RAM 4GB 3. (node-2) CPU x2 RAM 4GB Group type: unmanaged Each instance attached to the load balancer manual. For scaling, we need to add in manual mode a new instance to load-balancer ## WEB-Stomp group Minimal count of instances: 3 Template instance: - CPU x2 - RAM 4GB Group type: managed Groups: * rabbitmq-cluster-web-stomp Q: Time to enabled new instance? A: 10-15s for create VMs and upload image. 10s for healthcheck from load balancer(load balancer will not send any requests, while it don't get success healthcheck ). Total time: 30s+- Q: Why one instance has all connection? NGINX? ## Deployment process 1. Create new managed group: rabbitmq-cluster-web-stomp 2. Attach to load balancer WEB-Stomp 3. De-attach group: rabbitmq-cluster-group 4. Add scaling rule: CPU usage 5. Stop instances and remove from cluster * node 3 * node 4 * node 5 * node 6 * node 7 ## Questions ### Borys 1. Google balancer. Як він менеджить трафік між машинами кластера? Round Robin? 2. Google balancer.Scaling trigger. * Які правила ми буде використовувати? * За який час піднімаєть нова машина? * Яка машина буде тушитися після спаду трафіку? 3. Чому виникає ситуація з CPU 100%, якщо трафік розкидує Google balancer 4. Описати план робіт ### Nazar 1. Список сервісів Grafana * Google app engine * Google compute engine * RabbitMQ cluster * MongoDB * Redis * Elastic search 2. Використання Google memcache замість редісу * ціна * прослуховування експайрених ключів * перехід з редіса на memcache 3. Список нотифікацій які ми можемо мати з Grafana 4. Формування списку алертів з різних систем