SlideShare a Scribd company logo
Clustering RabbitMQ using Consul
Valentin Fadeev
DevOps Engineer @ Student.com
@ValFadeev HashiCorp Meetup, London 20 Jun 2017 1 / 10
Clustering in RabbitMQ
A RabbitMQ broker is a logical grouping of one or several Erlang nodes,
each running the RabbitMQ application and sharing users, virtual hosts,
queues, exchanges, bindings, and runtime parameters. Sometimes we refer
to the collection of nodes as a cluster1.
1
https://www.rabbitmq.com/clustering.html
@ValFadeev HashiCorp Meetup, London 20 Jun 2017 2 / 10
Autocluster Plugin1
automated clustering
declarative configuration
pluggable backends
1
https://github.com/rabbitmq/rabbitmq-autocluster
@ValFadeev HashiCorp Meetup, London 20 Jun 2017 3 / 10
Startup Sequence v1
start with a random delay
discover registered nodes
choose a node to cluster with and join
register with the backend
begin updating own health check
@ValFadeev HashiCorp Meetup, London 20 Jun 2017 4 / 10
Startup Sequence v2
acquire startup lock
discover registered nodes
choose a node to cluster with and join
register with the backend
begin updating own health check
release startup lock
@ValFadeev HashiCorp Meetup, London 20 Jun 2017 5 / 10
Why Consul?
DNS-based service discovery
decentralised health checking
configuration store
synchronisation primitives
event propagation
@ValFadeev HashiCorp Meetup, London 20 Jun 2017 6 / 10
Locking in Consul1
create a session associated with a node
begin refreshing session TTL
try to acquire the session for a key in KV store
if lock is held by someone else watch for changes
acquire session
release session
1
https://www.consul.io/docs/guides/leader-election.html
@ValFadeev HashiCorp Meetup, London 20 Jun 2017 7 / 10
Plugin Enhancements
use long node names
allow health checks in warning status
use start up locking instead of randomized delay
@ValFadeev HashiCorp Meetup, London 20 Jun 2017 8 / 10
Deployment
Consul Server
Consul ServerConsul Server
RabbitMQ Consul Client
RabbitMQ Consul Client
RabbitMQ Consul Client
@ValFadeev HashiCorp Meetup, London 20 Jun 2017 9 / 10
DNS Configuration
Docker Bridge
BIND
ConsulApp
Host network
Container network
@ValFadeev HashiCorp Meetup, London 20 Jun 2017 10 / 10

More Related Content

PPTX
London Hug 20/6 - Vault production
PDF
London HUG 19/5 - Kubernetes and vault
PPTX
Hug #9 who's keeping your secrets
PDF
Your secret's safe with me
PDF
Your (container) secret's safe with me
PPTX
Container secrets talk from DevSecCon
PDF
Kubernetes Security
PPTX
Vert.x for Microservices Architecture
London Hug 20/6 - Vault production
London HUG 19/5 - Kubernetes and vault
Hug #9 who's keeping your secrets
Your secret's safe with me
Your (container) secret's safe with me
Container secrets talk from DevSecCon
Kubernetes Security
Vert.x for Microservices Architecture

What's hot (20)

PDF
Your secret's safe with me
PDF
Istio Playground
PDF
Control Plane: Continuous Kubernetes Security (DevSecOps - London Gathering, ...
PPTX
Istio Cloud Native Online Series - Intro to Istio Security
PDF
Security threats with Kubernetes - Igor Khoroshchenko
PDF
Vault 1.1: Secret Caching with Vault Agent and Other New Features
PDF
BRISK_Network_Pentest_
PDF
Смарт-контракты: базовые инструменты для разработки и тестирования. Спикер: Д...
PDF
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...
PPTX
PDF
Running Resillient Workloads with Istio - OpenInfra Days 2019
PDF
TW SEAT - DevOps: Security 干我何事?
PPTX
5 Hidden Performance Problems for ASP.NET
PDF
Xen and OpenStack
PPT
Securing Network Access with Open Source solutions
PPTX
PDF
Simplestack
PPTX
Node Session - 1
PPTX
AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleed...
KEY
Shibuya,trac セッション
Your secret's safe with me
Istio Playground
Control Plane: Continuous Kubernetes Security (DevSecOps - London Gathering, ...
Istio Cloud Native Online Series - Intro to Istio Security
Security threats with Kubernetes - Igor Khoroshchenko
Vault 1.1: Secret Caching with Vault Agent and Other New Features
BRISK_Network_Pentest_
Смарт-контракты: базовые инструменты для разработки и тестирования. Спикер: Д...
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...
Running Resillient Workloads with Istio - OpenInfra Days 2019
TW SEAT - DevOps: Security 干我何事?
5 Hidden Performance Problems for ASP.NET
Xen and OpenStack
Securing Network Access with Open Source solutions
Simplestack
Node Session - 1
AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleed...
Shibuya,trac セッション
Ad

Similar to London Hug 20/6 - Clustering RabbitMQ using Consul (20)

PDF
Microservices Application Tracing Standards and Simulators - Adrians at OSCON
PPTX
Technical Introduction to IBM's Open Blockchain (OBC)
ODP
Nfv primer v2
PDF
Beyond static configuration
PDF
The Big Cloud native FaaS Lebowski
PDF
Travis-CI - Continuos integration in the cloud for PHP
ODP
Persistent Storage in Openshift using GlusterFS
PDF
Summit 16: Keynote: HPE Presentation- Transforming Communication Service Prov...
PPTX
[JOI] TOTVS Developers Joinville - Java #1
PDF
NIO-Grizly.pdf
PDF
FreeSWITCH as a Microservice
PDF
Yet another json rpc library (mole rpc)
PPTX
Scaling application with RabbitMQ
PDF
Testing applications with traffic control in containers / Alban Crequy (Kinvolk)
PPTX
Tacker vancouver project update
PPTX
Vert.x devoxx london 2013
PPTX
Spring Boot on Kubernetes/OpenShift
KEY
Concurrency in ruby
PPTX
Java Stammtisch Würzburg - CONAIR
PPTX
Workshop MSF4J - Getting Started with Microservices and Java
Microservices Application Tracing Standards and Simulators - Adrians at OSCON
Technical Introduction to IBM's Open Blockchain (OBC)
Nfv primer v2
Beyond static configuration
The Big Cloud native FaaS Lebowski
Travis-CI - Continuos integration in the cloud for PHP
Persistent Storage in Openshift using GlusterFS
Summit 16: Keynote: HPE Presentation- Transforming Communication Service Prov...
[JOI] TOTVS Developers Joinville - Java #1
NIO-Grizly.pdf
FreeSWITCH as a Microservice
Yet another json rpc library (mole rpc)
Scaling application with RabbitMQ
Testing applications with traffic control in containers / Alban Crequy (Kinvolk)
Tacker vancouver project update
Vert.x devoxx london 2013
Spring Boot on Kubernetes/OpenShift
Concurrency in ruby
Java Stammtisch Würzburg - CONAIR
Workshop MSF4J - Getting Started with Microservices and Java
Ad

More from London HashiCorp User Group (10)

PDF
London HUG 15/8/17 - Elseviers World using Nomad
PDF
London HUG 15/8/17 - Lifeguard
PDF
PPTX
PDF
London Hug 19/5 - Terraform in Production
PDF
London HUG 14/4 - Infratructure mgmt
PDF
London HUG 14/4 - Deploying and Discovering at Scale with Consul and Nomad
PDF
London HUG 8/3 - Nomad
PDF
London HUG 8/3 - Developing a (VCD) Terraform Provider
PDF
London HUG 8/3 - JustEat - Andrew Brown / Alberto Blanco
London HUG 15/8/17 - Elseviers World using Nomad
London HUG 15/8/17 - Lifeguard
London Hug 19/5 - Terraform in Production
London HUG 14/4 - Infratructure mgmt
London HUG 14/4 - Deploying and Discovering at Scale with Consul and Nomad
London HUG 8/3 - Nomad
London HUG 8/3 - Developing a (VCD) Terraform Provider
London HUG 8/3 - JustEat - Andrew Brown / Alberto Blanco

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Approach and Philosophy of On baking technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Network Security Unit 5.pdf for BCA BBA.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...
Chapter 3 Spatial Domain Image Processing.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Spectroscopy.pptx food analysis technology
Spectral efficient network and resource selection model in 5G networks
Mobile App Security Testing_ A Comprehensive Guide.pdf
Encapsulation theory and applications.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Diabetes mellitus diagnosis method based random forest with bat algorithm
MYSQL Presentation for SQL database connectivity
Approach and Philosophy of On baking technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

London Hug 20/6 - Clustering RabbitMQ using Consul

  • 1. Clustering RabbitMQ using Consul Valentin Fadeev DevOps Engineer @ Student.com @ValFadeev HashiCorp Meetup, London 20 Jun 2017 1 / 10
  • 2. Clustering in RabbitMQ A RabbitMQ broker is a logical grouping of one or several Erlang nodes, each running the RabbitMQ application and sharing users, virtual hosts, queues, exchanges, bindings, and runtime parameters. Sometimes we refer to the collection of nodes as a cluster1. 1 https://www.rabbitmq.com/clustering.html @ValFadeev HashiCorp Meetup, London 20 Jun 2017 2 / 10
  • 3. Autocluster Plugin1 automated clustering declarative configuration pluggable backends 1 https://github.com/rabbitmq/rabbitmq-autocluster @ValFadeev HashiCorp Meetup, London 20 Jun 2017 3 / 10
  • 4. Startup Sequence v1 start with a random delay discover registered nodes choose a node to cluster with and join register with the backend begin updating own health check @ValFadeev HashiCorp Meetup, London 20 Jun 2017 4 / 10
  • 5. Startup Sequence v2 acquire startup lock discover registered nodes choose a node to cluster with and join register with the backend begin updating own health check release startup lock @ValFadeev HashiCorp Meetup, London 20 Jun 2017 5 / 10
  • 6. Why Consul? DNS-based service discovery decentralised health checking configuration store synchronisation primitives event propagation @ValFadeev HashiCorp Meetup, London 20 Jun 2017 6 / 10
  • 7. Locking in Consul1 create a session associated with a node begin refreshing session TTL try to acquire the session for a key in KV store if lock is held by someone else watch for changes acquire session release session 1 https://www.consul.io/docs/guides/leader-election.html @ValFadeev HashiCorp Meetup, London 20 Jun 2017 7 / 10
  • 8. Plugin Enhancements use long node names allow health checks in warning status use start up locking instead of randomized delay @ValFadeev HashiCorp Meetup, London 20 Jun 2017 8 / 10
  • 9. Deployment Consul Server Consul ServerConsul Server RabbitMQ Consul Client RabbitMQ Consul Client RabbitMQ Consul Client @ValFadeev HashiCorp Meetup, London 20 Jun 2017 9 / 10
  • 10. DNS Configuration Docker Bridge BIND ConsulApp Host network Container network @ValFadeev HashiCorp Meetup, London 20 Jun 2017 10 / 10