I'm running Frigate NVR at two locations. Site A has enough compute power for services like Authentik, while Site B is dedicated to just Frigate and doesn't have much spare power. I'm looking for some redundancy in case Site A goes down, and I want to have a centralized status page on an Oracle Cloud VM. I'd also like to run another Authentik instance over there. All three sites are connected using Tailscale subnet routers. I know Docker Swarm can provide high availability and failover, but I'm okay without seamless transitions. My main goal is to replicate my databases easily across the sites. Automatic load balancing and failover would be nice, but I'd prioritize simplicity. I'm not an IT professional, so technical solutions like Kubernetes or Keepalived seem daunting. I've looked into Cloudflare's load balancing service as a possible solution which I already use for DNS. I'm looking for guidance and high-level concepts to get started with this setup.
5 Answers
Database replication can get pretty complicated, as each database engine has its own quirks. While I know you’re leaning towards Docker Swarm, a simple Kubernetes setup might actually be your best bet because there are really good operators available that simplify the process of database management.
One major concern is that Frigate uses SQLite, which doesn't support replication at all. If you're planning on using Swarm primarily for container failover, remember it has to work in conjunction with a clustered file system like GlusterFS or Ceph. For databases, using the native replication features is usually a better bet than using shared storage.
What database are you using? It’s important to know because different databases have different replication needs.
I wouldn't recommend using Swarm across higher latency connections (like >5ms). It tends to hit replication issues in such setups. Swarm can manage container replication but not volumes or storage—that's on you to set up. Think about using something like ZFS replication to manage backups and environment configuration. If Site A is down, you can disable replication on Site B and mount your backup volumes to get everything running again.
Honestly, I’d say no to Swarm for your needs. It requires a majority of nodes to function correctly; your setup only has two sites. For resilience, you should consider a cluster with at least three nodes as it can withstand the failure of one. If you’re not keen on Kubernetes, perhaps explore centralized orchestrators like Percona Orchestrator for database management, but remember the solution has to match your specific database requirements.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures