Skip to content

High Availability

mise-server supports primary/follower replication for high availability deployments.

Architecture

  • Primary — operates normally, handles all writes
  • Follower — proxies writes to primary, syncs auth/hosted state, serves cached reads independently

Both instances share the same PostgreSQL database and S3 storage.

Follower Configuration

toml
# follower mise-server.toml
[settings]
primary_url = "https://primary.mise-server.internal"
sync_interval = 10  # seconds between sync polls
bash
export MISE_SERVER_PRIMARY_URL=https://primary.mise-server.internal
export MISE_SERVER_SYNC_INTERVAL=10

How Syncing Works

  1. Follower polls {primary_url}/internal/sync/events?since={last_id}&limit=100
  2. Events include user/ACL changes and hosted package uploads
  3. Follower applies events to its local state
  4. Reads are served from the shared S3 backend + local cache

Multi-Instance Coordination

All instances listen on the PostgreSQL mise_server_auth channel via LISTEN/NOTIFY. When any instance modifies users or ACL rules, it sends a NOTIFY that triggers an immediate reload on all other instances.

Deployment Example

yaml
# Primary
services:
  primary:
    image: mise-server
    environment:
      DATABASE_URL: postgres://db/mise_server
      MISE_SERVER_S3_BUCKET: my-bucket

# Follower (separate host or region)
  follower:
    image: mise-server
    environment:
      DATABASE_URL: postgres://db/mise_server
      MISE_SERVER_S3_BUCKET: my-bucket
      MISE_SERVER_PRIMARY_URL: http://primary:3000

Licensed under FSL-1.1-ALv2. Maintained by @jdx.