Posts

Showing posts from October, 2021

High Availability Software Based Load Balancer for CockroachDB

Image
Recently, I was building an environment for a series of tests that used CockroachDB as the underlying data store.  This happens all the time, but in this instance I had the need to also build a high availability (HA) load balancer (LB) configuration.  The need was for the environment to continue to function even if one of the software based load balancers failed.  I will explain how to build redundant load balancers using keepalived and haproxy in this post. To start out, I built the DB cluster on a number of nodes, spread across multiple availability zones and multiple geographic regions.  For this, I followed the basic instructions from the CockroachDB documentation ( https://www.cockroachlabs.com/docs/v21.1/install-cockroachdb-linux ).  One of the huge benefits of CRDB is that it provides redundancy and distributed execution of queries across the DB cluster.  What it does not include is any kind of load balancing, as that is beyond its purpose.  If ...