High Availability

An active/standby gateway pair with Redis leader election.

How it works

Gateways elect a leader through Redis. Only the leader connects the tools, because most tools accept a single HSMS host; the standby serves the API and takes over when the leader’s lease lapses. A standby answers manual connect requests with 409 NOT_LEADER.

yaml
ha:
  enabled: true
  redis:
    addrs: [sentinel-1:26379, sentinel-2:26379, sentinel-3:26379]
    master_name: fabconnect
    tls: { enabled: true, ca_file: /run/secrets/redis-ca.crt }

Redis is part of availability

A leader that cannot reach Redis steps down and disconnects its tools before a standby could take over, so two hosts never drive one tool. That makes Redis a dependency: run Sentinel or Cluster, not a single instance.

The buffer

With buffer.enabled, data bound for integrations (webhooks, Kafka, MQTT) goes through a durable, encrypted outbox on disk and is delivered in order when the receiver is back. GET /api/v1/buffer/status shows the backlog.

Status

GET /api/v1/ha/status shows the leader. docker-compose.ha.yml runs a pair, each gateway with its own protocol engine. Failover is tested in the gateway’s test suite; it has not yet been exercised in a production fab.

Something missing or wrong on this page? Tell us.