Skip to main content
InterviewHubPRO
Section Overview
Q28

Question 28 of 50

Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)

56%
RabbitMQ & AMQP (50 Qs)•Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)

Connection and Channel Management at Scale: Diagnosing Channel Leaks and Churn.

senior LevelSystem DesignGolang

In Simple Words:

  • Channel Leak Anti-Pattern: An application creates a new channel for every single incoming HTTP request and forgets to call channel.close(). Within hours, RabbitMQ hits Erlang process limits (max_processes = 1048576) and crashes!
  • Mitigation:
    • Enforce channel limits per connection (channel_max = 2047).
    • Use a Channel Pool or maintain one dedicated channel per thread.
    • Monitor channel churn in Prometheus: rabbitmq_channels_opened_total vs rabbitmq_channels_closed_total.