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 pollsbash
export MISE_SERVER_PRIMARY_URL=https://primary.mise-server.internal
export MISE_SERVER_SYNC_INTERVAL=10How Syncing Works
- Follower polls
{primary_url}/internal/sync/events?since={last_id}&limit=100 - Events include user/ACL changes and hosted package uploads
- Follower applies events to its local state
- 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