SlideShare a Scribd company logo
Ruby Meditation #19
Microservice
communication with
RabbitMQ
Tetiana Chupryna
Disclaimer. Language
Татьяна Чуприна
Татьяна Чуприна
Person of a million names
Тетяна Чуприна
Тетяна Чуприна
Tetiana Chupryna
Tetyana Chuprina
Tetjana Chuprina
Tetyiaana Chuprina
Tetiana Chupyra
Tetiana Chuprynas
Microservice communication with RabbitMQ - Tetiana Chupryna
Tania
Agenda
❖ Inter-service communication problematics
❖ JSON over HTTP option
❖ Message queues option
❖ RabbitMQ
❖ Integration with Ruby
–Steven McConnell, Code complete
“Important developments often arise out of
analogies. By comparing a topic you understand
poorly to something similar you understand better,
you can come up with insights that result in a
better understanding of the less-familiar topic.”
The importance of Metaphors
Luggage for dummies
Luggage for dummies
Luggage for dummies
Drop-off
Luggage for dummies
Drop-off
Sorting
Luggage for dummies
Drop-off
Sorting
Luggage for dummies
Drop-off
Sorting
Sorting
Luggage for dummies
Drop-off
Sorting
c a r o u s e l
Sorting
Luggage for dummies
Drop-off
Sorting
c a r o u s e l
Sorting
Game changer
Microservice communication with RabbitMQ - Tetiana Chupryna
Event-based system
Scalable
Maintainable
Back to clouds
Microservice communication
??
?
?
? ?
?
?
?
?
?
??
?
? ?
Inter-service communication
❖ New problem which doesn’t exist in monolith
❖ So many ways to success
❖ So many pitfalls
JSON over HTTP
Re use API
at least Basic Auth
100% control
JSON over HTTP
You can’t be 100% sure
Microservice communication with RabbitMQ - Tetiana Chupryna
Design failure to success
Sidekiq to the resque
❖ Handle “other side” failures gracefully
❖ Retry if needed
Procs
❖ Easy
❖ Quick
❖ Dirty
❖ Great choice for small apps
Cons
❖ Bad in scaling
❖ Pain for maintenance
❖ Net::HTTP
Inter-service communication
Break it. Make it.
❖ Decouple service interaction
❖ Keep messages in temporary storage (mailbox?)
❖ Make all asynchronous
Message queues
❖ Message-oriented middleware
❖ Applicable not only for web-applications
❖ Async communication protocol
Kafka
JBossMessaging
Oracle OpenMQ
mail.ru Tarantool
RabbitMQ
Reasons to use
❖ Written in Erlang
❖ Fast&Reliable
❖ Easy to setup
❖ Client libraries on all major languages (Ruby yippee!)
❖ Advanced Message Queuing Protocol
In a nutshell
Direct exchange routing
Fanout exchange routing
Topic exchange
Queue properties
❖ Name
❖ Durable
❖ Exclusive
❖ Auto-delete
❖ Arguments
Bindings
❖ Direct: by routing_key
❖ Multiple bindings
❖ Mask routing
Security
❖ TLS (transport layer security)
❖ SSL
❖ authentication
❖ authorization
Setup Rabbit
❖ Install and run
❖ No painful dependancies
Bunny
❖ Ruby client for RabbitMQ
❖ Lightweight
❖ Up&go
Bunny usage
Sneakers
❖ Background processing framework for Ruby and
RabbitMQ
❖ Can be used for high workload
❖ Up&go (as always)
Worker
Procs
❖ Scalable
❖ Maintainable
❖ Lightweight
Cons
❖ Need additional infrastructure eq(Money)
❖ Overkill for small projects
❖ Need additional knowledge
Afterwords
❖ Decoupling message flow from app changes app design
and in general makes all easier.
❖ Decoupling message flow makes programs more safe
and scalable.
❖ Message queues are a save choice for inter-service
communication where RabbitMQ is a solid option.
❖ Ça dépend
Share your stories of inter-service
communication
Massive thanks
Thanks Thanks
ThanksThanks
Thanks Thanks
Thanks
Thanks
Thanks
Thanks
ThanksThanks
Thanks
Thanks
ThanksThanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
ThanksThanks
Thanks Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks

More Related Content

PDF
Messaging Standards and Systems - AMQP & RabbitMQ
PDF
Messaging Standards and Systems - AMQP & RabbitMQ
KEY
The Cloud's Hidden Lock-in: Network Latency
PPTX
RabbitMQ and EasyNetQ
PDF
Going Multiplayer With Kafka With Ben Gamble | Current 2022
PDF
Experiences with Microservices at Tuenti
PDF
From Mainframe to Microservice: An Introduction to Distributed Systems
PPTX
Time to say goodbye to your Nagios based setup
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
The Cloud's Hidden Lock-in: Network Latency
RabbitMQ and EasyNetQ
Going Multiplayer With Kafka With Ben Gamble | Current 2022
Experiences with Microservices at Tuenti
From Mainframe to Microservice: An Introduction to Distributed Systems
Time to say goodbye to your Nagios based setup

Similar to Microservice communication with RabbitMQ - Tetiana Chupryna (15)

PDF
OSMC 2014: Time to say goodbye to your Nagios setup | Oliver Jan
PDF
Enterprise Messaging with RabbitMQ.pdf
PPTX
Realtime web2012
PPTX
Rabbit MQ
PDF
Rigadevdays - Communication in a microservice architecture
PDF
P2P for mobile devices
PDF
Evaluating persistent, replicated message queues
PDF
The Java Microservice Library
PDF
API Design and WebSocket
PDF
Microservices: Benefits, drawbacks and are they for me?
PDF
NoSQL afternoon in Japan kumofs & MessagePack
PDF
NoSQL afternoon in Japan Kumofs & MessagePack
PDF
Ride The Bus!
PDF
OSMC 2014 | Time to say goodbye to your Nagios based setup? by Oliver Jan
PDF
Django in enterprise world
OSMC 2014: Time to say goodbye to your Nagios setup | Oliver Jan
Enterprise Messaging with RabbitMQ.pdf
Realtime web2012
Rabbit MQ
Rigadevdays - Communication in a microservice architecture
P2P for mobile devices
Evaluating persistent, replicated message queues
The Java Microservice Library
API Design and WebSocket
Microservices: Benefits, drawbacks and are they for me?
NoSQL afternoon in Japan kumofs & MessagePack
NoSQL afternoon in Japan Kumofs & MessagePack
Ride The Bus!
OSMC 2014 | Time to say goodbye to your Nagios based setup? by Oliver Jan
Django in enterprise world
Ad

More from Ruby Meditation (20)

PDF
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
PDF
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
PDF
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
PDF
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
PDF
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
PDF
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
PDF
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
PDF
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
PDF
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
PDF
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
PDF
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
PDF
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
PDF
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
PDF
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
PDF
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
PDF
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
PDF
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
PDF
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
PDF
Rails App performance at the limit - Bogdan Gusiev
PDF
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Rails App performance at the limit - Bogdan Gusiev
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
Ad

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Big Data Technologies - Introduction.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPT
Teaching material agriculture food technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
KodekX | Application Modernization Development
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
cuic standard and advanced reporting.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Big Data Technologies - Introduction.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Teaching material agriculture food technology
Per capita expenditure prediction using model stacking based on satellite ima...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Understanding_Digital_Forensics_Presentation.pptx
A Presentation on Artificial Intelligence
KodekX | Application Modernization Development
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Digital-Transformation-Roadmap-for-Companies.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Empathic Computing: Creating Shared Understanding
Unlocking AI with Model Context Protocol (MCP)
NewMind AI Monthly Chronicles - July 2025
cuic standard and advanced reporting.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Advanced methodologies resolving dimensionality complications for autism neur...
Chapter 3 Spatial Domain Image Processing.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

Microservice communication with RabbitMQ - Tetiana Chupryna