Slack has a global customer base, with millions of simultaneously connected users at peak times. Most of the communication between users involves sending lots of tiny messages to each other. For much of Slack’s history, we’ve used HAProxy as a load balancer for all incoming traffic. Today, we’ll talk about problems we faced with HAProxy,…
Overview
This article discusses Slack's migration of millions of concurrent WebSocket connections from HAProxy to Envoy Proxy. It outlines the challenges faced with HAProxy, the motivations for switching to Envoy, the migration process, and the outcomes achieved.
What You'll Learn
How to implement hot restarts in Envoy Proxy to avoid dropping connections
Why to choose Envoy Proxy over HAProxy for WebSocket connections
How to manage Envoy configurations using Chef
When to apply weighted routing for DNS during migration
Prerequisites & Requirements
- Understanding of WebSocket connections and load balancing concepts
- Familiarity with Envoy Proxy and HAProxy(optional)
- Experience with configuration management tools like Chef
Key Questions Answered
What were the main challenges faced with HAProxy during the migration?
How did Slack ensure a smooth migration to Envoy Proxy?
What benefits does Envoy Proxy provide over HAProxy?
What testing strategies were used for the new Envoy configuration?
Key Statistics & Figures
Technologies & Tools
Some links below are affiliate links. We may earn a commission if you make a purchase.
Key Actionable Insights
1Implement hot restarts in Envoy to maintain connection stability during configuration changes.This is crucial for applications with long-lived connections, such as WebSockets, where dropping connections can lead to poor user experiences.
2Utilize weighted routing for DNS to manage gradual traffic shifts during migrations.This approach minimizes risk by allowing for controlled rollouts and quick rollbacks if issues arise, ensuring a smooth transition for users.
3Leverage Chef for managing Envoy configurations to streamline deployment processes.Building custom Chef resources can simplify the management of complex Envoy configurations, reducing errors and improving deployment speed.