High Availability Setup #88
hhftechnology
started this conversation in
Feature Requests
Replies: 2 comments 1 reply
-
For SQLite replication with Pangolin, we can use a file-based replication approach: Set up a file sync tool like Litestream or rqlite that's specifically designed for SQLite replication. services:
pangolin:
# ... existing pangolin config ...
volumes:
- ./config:/app/config # Contains SQLite database
litestream:
image: litestream/litestream
volumes:
- ./config:/data # Mount same volume as Pangolin
command: replicate /data/db/db.sqlite /path/to/replica/db.sqlite |
Beta Was this translation helpful? Give feedback.
0 replies
-
In theory to setup HAProxy to load balance the Pangolin and Gerbil services themselves for high availability: services:
haproxy:
image: haproxy:2.4
ports:
- "80:80"
- "443:443"
- "51820:51820/udp" # WireGuard port
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
- ./certs:/etc/ssl/private:ro # For SSL termination if needed
depends_on:
- pangolin-1
- pangolin-2
- gerbil-1
- gerbil-2
# haproxy.cfg global
log stdout format raw local0
maxconn 4096
defaults
log global
mode http
option httplog
timeout connect 5s
timeout client 30s
timeout server 30s
frontend http_front
bind *:80
bind *:443 ssl crt /etc/ssl/private/cert.pem
# ACL for Pangolin web interface/API (this i am not sure of)
acl is_pangolin path_beg /api/v1
acl is_pangolin path_beg /auth
acl is_pangolin path_beg /dashboard
use_backend pangolin_servers if is_pangolin
default_backend gerbil_servers
backend pangolin_servers
balance roundrobin
option httpchk GET /api/v1/health
server pangolin1 pangolin-1:3000 check
server pangolin2 pangolin-2:3000 check backup
backend gerbil_servers
balance roundrobin
option httpchk GET /health
server gerbil1 gerbil-1:3003 check
server gerbil2 gerbil-2:3003 check backup
frontend wireguard_front
bind *:51820 udp
mode tcp
default_backend wireguard_servers
backend wireguard_servers
mode tcp
balance roundrobin
server gerbil1 gerbil-1:51820 check
server gerbil2 gerbil-2:51820 check backup In theory
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
for critical deployments
deploying multiple Gerbil instances:
Since Gerbil acts as the WireGuard endpoint, we need to ensure WireGuard clients can seamlessly switch to a backup endpoint if the primary fails.
implement DNS-based failover
For DNS-based failover of WireGuard endpoints:
Beta Was this translation helpful? Give feedback.
All reactions