Hello everyone!

My friend and I have each bought an optiplex server. Our goal is to selfhost a web app (static html) with redundancy. If my server goes down, his takes over and vice versa. I’ve looked into Docker Swarm, but each server has to be totally independent (each runs its own apps, with a few shared ones).

I can’t find a solution that allows each server to take over and manage loadbalancing between the two. Ideally with traefik, because that’s what we’re currently using. To me the real issue is the DNS A record that point to only one IP :(

  • lando55@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    13 days ago

    Where would you host the script? If it’s expected that the server that fires it off is always online and performing health checks, why not have it host a load-balancer? Or another local instance of the website? It’s something fun to play around with, but if this is for anything beyond a fun exercise there are much better ways to accomplish this.

    • cron@feddit.org
      link
      fedilink
      English
      arrow-up
      4
      ·
      13 days ago

      I’d host it on both webservers. The script sets the A record to all the servers that are online. Obviously, the script als has to check it’s own service.

      It seems a little hacky though, for a business use case I would use another approach.