Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
RabbitMQ Essentials

You're reading from   RabbitMQ Essentials Build distributed and scalable applications with message queuing using RabbitMQ

Arrow left icon
Product type Paperback
Published in Aug 2020
Publisher Packt
ISBN-13 9781789131666
Length 154 pages
Edition 2nd Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Lovisa Johansson Lovisa Johansson
Author Profile Icon Lovisa Johansson
Lovisa Johansson
David Dossot David Dossot
Author Profile Icon David Dossot
David Dossot
Arrow right icon
View More author details
Toc

Networking over connections and channels

Thousands of connections add up to a heavy burden on a RabbitMQ server, causing it to run out of memory and crash. A large number of connections and channels can also negatively impact the RabbitMQ management interface due to the large number of performance metrics being processed. To avoid this, configure each application to create an extremely small number of connections – 1, if possible. Instead of using multiple connections, establish a channel for each thread. Each connection should be long-lived and the following best practices should be considered depending on the application structure.

Remember that even if new hardware offers hundreds of threads, only the number of channels set can be established and this number should be kept from growing too large. As some clients don't make channels thread-safe, it is best not to share channels between threads. Doing so may create a race condition, which could completely crash the application...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime