I’ve been kicking around the idea of running a server for games and chat woth some of my friends, but worry about everyone getting cut off when there’s a disruption.

I’ve started looking into kubernetes out of curiosity, and it seems like we could potentially set up a cluster with master nodes at 3+ locations to hose whatever game server or chat server that we want with 100% uptime, solving my concerns.

Am I misunderstanding the kubernetes documentation, and this is just a terrible idea? Or am I on the right track?

  • monkeyman512@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    4 days ago

    I think you are making it more complicated than needed. If you just want reliable service, just figure out who has the most reliable Internet and power and they can host the server. If you want to learn kubernets or docker swarm, you can try that but it will take a ton of upfront work.

    Edit: Also get a UPS for the server.

    • mnemonicmonkeys@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      3 days ago

      Going through some of the more detailed responses, yeah this is probably the best bet, and it’ll most likely be my server that’s the primary. I’ve got a Jellyfin server / NAS with an Intel 12700k, and I could either simply add a docker container or dedicate resources via Proxmox.

      Meanehile one of my friend is experimenting with an old $50 desktop with a 3rd gen i3. It’s… a decision, but he’s got more free time than I do

  • oddlyqueer@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 days ago

    I love this idea. As others have said, a distributed game server would be a really tall order, and AFAIK there’s not really anything already made that does what you’re describing. But you could have a setup where one server hosts the game and syncs the game state with the other servers in the network, and if one server fails the network decides which failover server to connect to, all the clients connect to that server and continue playing on the new host. But it would be a gargantuan task to implement something like that.

    • mnemonicmonkeys@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      3 days ago

      But you could have a setup where one server hosts the game and syncs the game state with the other servers in the network, and if one server fails the network decides which failover server to connect to, all the clients connect to that server and continue playing on the new host.

      This is kinda what I was hoping that kubernetes did. It’d be awesome if there was some software that automatically did the hand-off, but I haven’t heard of one either

      • oddlyqueer@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 days ago

        It does something similar, in that you can replicate servers and have one act as a failover for another, but I think you’d need a lot of extra code to sync the primary game host with the failover hosts, and more to make sure all the clients detect a failed host and all gracefully switch to the same failover host, and probably a hundred other things I’m not thinking of. If I were going to build something like this I probably would look to kubernetes as a foundation but there would be a lot of customization on top of that.

  • Brkdncr@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 days ago

    Assuming you were on the same lan you could probably set up chat with HA. A game server likely has a lot of change in memory and keeping that synced would be possible but it might not be cheap.

    Across a wan though is a different story and likely not reasonably possible.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 days ago

    I would argue k8s is overkill for this and the wrong tool for the job.

    Honestly I would never target 100% uptime. Ubisoft, Microsoft, Blizzard, EA, valve, Epic spend billions collectively on online services and still have unplanned outages.

    You can get a very cheap VPS from Heizner and you should run your game server there. You get proper cooling, networking, and support if something goes wrong.