The Connection Churn CPU Killer
criticalFrequent opening and closing of connections and channels consumes excessive CPU due to TCP handshake overhead, authentication, and Erlang process initialization. Each operation takes 100-110ms, creating massive overhead when repeated per message.
Monitor connection creation/deletion rate and CPU usage of rabbitmq-server process. High CPU (approaching 100%) combined with frequent connection state changes indicates churn. Protocol handler CPU time will be disproportionately high.
Implement connection pooling with reused long-lived connections. Configure connection heartbeat (60s recommended) and TCP keepalive settings. Use 10-50 connections max per producer/consumer application with 5-10 channels per connection. Enable connection pooling libraries in client applications.