Skip to content
BleemeoBleemeo

SquirrelDB High Availability

SquirrelDB HA SquirrelDB HA

SquirrelDB can provide both a scalable and highly available Prometheus remote store, on top of either storage backend.

In both cases, you will need:

  • A Redis cluster (start at 6 nodes)
  • A load-balancer in front of SquirrelDB (e.g. nginx)
  • Two or more SquirrelDB instances
  • A cluster of the database backend, detailed below

For further details on how to configure a Cassandra cluster, a ClickHouse cluster or a Redis cluster, look at their respective documentation.

The long term storage needs 3 or more Cassandra nodes, with a replication factor greater than 1 (3 is recommended).

Each SquirrelDB will need to be configured to find the Cassandra and Redis clusters. For example, the configuration may look like this:

cassandra:
# You should have enough addresses here to have at least one that responds.
# Once connected, SquirrelDB will get all other Cassandra nodes from the one it connected to.
# So either have a majority of node addresses or a virtual address always reachable (load-balancer, Kubernetes service, ...).
addresses:
- "cassandra1:9042"
- "cassandra2:9042"
# Replication factor should be odd, since SquirrelDB relies on quorum for its consistency.
replication_factor: 3
redis:
# Like for Cassandra addresses, you just need to have enough addresses to connect to one
# working Redis node, from here the client will discover all nodes in the cluster.
addresses:
- "redis1:6379"
- "redis2:6379"

A Docker compose is available to test this setup on the SquirrelDB repository.