Skip to main content

📡 SquirrelDB High Availability

SquirrelDB HA SquirrelDB HA

SquirrelDB can provide both a scalable and highly available Prometheus remote store.

To achieve this goal, you will need:

  • A cluster of 3 or more Cassandra nodes
  • A Redis cluster (start at 6 nodes)
  • A load-balancer in front of SquirrelDB (e.g. nginx)
  • two or more of SquirrelDB instances

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

info

In this setup, SquirrelDB instances are stateless because short term data is stored in Redis.

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 a 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 SquirrelDB repository.