HAProxyConf 2022 Presentation

Load Balancing and High Availability on Postgres using HAProxy

Cloudflare Logo
Vignesh Ravichandran

This talk explores how Cloudflare uses HAProxy for health checks, load balancing and reading traffic among nodes set up with Postgres streaming replication in hot standby mode. Cloudflare operates multiple Postgres Clusters across four data centers, and all of these clusters are made up of six nodes.

During a primary failure, Cloudflare’s high availability system promotes a replica to become a primary, and HAProxy makes sure there is no write traffic between two primaries to avoid a split-brain scenario.

The presentation also explores how HAProxy helps improve Cloudflare’s security by encrypting traffic between data centers using SSL, ensuring no traffic across data centers is clear text.

Slide Deck

Here you can view the slides used in this presentation if you’d like a quick overview of what was shown during the talk.

Cloudflare Logo
Vignesh Ravichandran Engineering Manager, Databases, Cloudflare
Vignesh is an Engineering Manager @Cloudflare responsible for a team of database engineers across the world. Vignesh built high availability on Postgres across multiple data centers with availability zone, and contributed to Postgres, stolon and other open source projects. Vignesh is the creator of spinup.host.

Organizations rapidly deploy HAProxy products to deliver websites and applications with the utmost performance, observability and security at any scale and in any environment. Looking for more stories?

Explore All User Spotlights