Building the Next Evolution of Cloud Networks at Slack – A Retrospective
A year after launching Whitecastle, its AWS network redesign built on Transit Gateway, Slack found that proxy environment variables (http_proxy/no_proxy) were the biggest migration drag. Languages honor them inconsistently: Java ignores them, and CIDR support differs between Ruby, Go and Python. Partial migrations pushed huge, bursty traffic through Transit Gateway, which required CloudWatch attachment-level monitoring and help from AWS to scale. The team replaced VPC peering with Transit Gateway without downtime by adding a less-specific 10.0.0.0/8 route before deleting the peering routes. Later improvements included multiple workload VPCs per region, cross-account private Route53 zone associations, a self-discovering network tester backed by DynamoDB, and a Slack bot for looking up network details.
Related posts
- How DeepL keeps closest-exit routing during maintenance with AWS Cloud WAN
AWS Architecture Blog hardMasterDeepL drains a single AWS Direct Connect link for maintenance by prepending AS_PATH on that link's virtual interface. The prepend shifts only the affected Region's egress to a peer core network edge, and every other Region keeps its closest exit. Local preference communities don't work for this because the Direct Connect gateway evaluates them before AS_PATH, and they would re-rank exits for all Regions at once. The core network edge, by contrast, picks paths by AS_PATH length. Use at least two prepends (DeepL uses five), since one prepend ties and Cloud WAN then still prefers the gateway path. Lower on-premises local preference so inbound traffic moves too, keep flows symmetric if a stateful firewall sits in the path, and budget for inter-Region transfer charges during the drain.
- Migrating Millions of Concurrent Websockets to Envoy
Slack Engineering mediumAdeptSlack moved its websocket ingress tier, serving millions of concurrent connections, from HAProxy to Envoy Proxy. HAProxy reloads spawned long-lived draining processes that had to be reaped and rate-limited. Envoy's dynamic clusters, hot restarts and panic routing removed that operational overhead. Envoy config was generated through custom Chef resources with --mode validate checks, and traffic shifted region by region via NS1 weighted DNS in 10–100% steps on a parallel stack, completing in six months with no customer impact. Key lessons: the organically grown HAProxy config hid behaviours services depended on, a test suite for load balancer routing would have saved effort, and limiting Chef libraries to a subset of Envoy features kept them simple but made later additions like vhosts awkward.
- Traffic 101: Packets Mostly Flow
Slack Engineering mediumAdeptA Slack request reaches its main region in AWS us-east-1 through a chain of hops. DNS answers come from Route53, or from NS1 for websocket records, and use edns-client-subnet to pick the nearest edge PoP. From there, Layer 4 NLBs pass traffic to Envoy-based Layer 7 tiers (envoy-wss for websockets, envoy-edge for API traffic), which route to internal services like Gatewayserver, Applink, Flannel, Imgproxy and Supra/Miata. Traffic from a PoP to the main region rides the AWS backbone, encrypted by Nebula. Failure handling is layered: a backup websocket domain uses an NS1 filter chain that shuffles among the three nearest regions to avoid thundering herds, a Degraded Mode falls back to the HTTP API when websockets fail, an Edge Pop Drain tool flips DNS to drain unhealthy PoPs automatically, and CloudFront has a backup CDN domain with client-side failover.
- Throwing Out The Phonebook
Fly.io hardMasterFly.io rebuilt 6PN, its private IPv6 network between Fly Machines, replacing a fleet-wide eBPF map of every migrated Machine's location (hundreds of thousands of entries kept in sync from Corrosion's gossip-replicated SQLite) with lazy, on-demand routes. VXLAN's netlink event for unknown addresses is passed through drift-agent to s6pnforwarderd, which queries local Corrosion and installs a single kernel route. Each host now carries only 100–200 routes, addresses no longer need rewriting, and routes can forward through intermediate hosts to tolerate stale entries or steer around bad links. udp-xdp now only validates same-network traffic and sets an fwmark so the design fails closed. The costs are a roughly one-second first-connection delay from TCP retransmission and broken new conversations if the daemons crash. The migration ran both paths side by side behind per-host flags, tolerating asymmetric routing.
- Hello, World: We’re Railway
Railway mediumAdeptRailway launches US-East, EU-West and Southeast Asia regions alongside its original US-West GCP zone, with one-click region moves that need no URL or DNS changes. Getting there required several building blocks: private networking built on a WireGuard mesh with eBPF NAT and per-project IPv6 /64 address spaces, a global edge that splits Envoy edge proxies from regional routing proxies behind GeoDNS, and lazy-loading L4 TCP proxies that subscribe to a memdb-backed control plane for cache invalidation. Volumes use ZFS send/receive snapshots, orchestrated with Temporal, to move databases across regions with minimal downtime. The team also restructured a copy-pasted, module-less Terraform and Ansible stack so new regions are cheap to add.