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?

  • oddlyqueer@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 minutes 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.

  • passenger@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 minutes ago

    Kubernetes is too much. You could set up a matrix server for chat with jitsi for video meetings. Use element as client. Then add your game server(s).

    For matrix/jitsi server setup use this playbook https://github.com/spantaleev/matrix-docker-ansible-deploy

    It installs all you need for video, audio, and text chat.

    Maybe change the config to be unfederated if you want a private server.

    100% uptime is really not feasible so forget that. Even the commercial servers have downtimes.

  • monkeyman512@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    11 minutes 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.

  • Kairos@lemmy.today
    link
    fedilink
    English
    arrow-up
    10
    ·
    3 hours ago

    Chat server is easy: Matrix (actually multiple servers but same effect)

    Game server is very hard. The game has to be made for it or you have to be very good at network application engineering to hack it in.

  • hendrik@palaver.p3x.de
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    3 hours ago

    I’d rent one (small) VPS for $10 a month and split the bill. As far as I know that’s how most people do it. It’s going to have >99.6% uptime, a fast datacenter internet connection at some central location and runs on enterprise hardware… The Kubernetes approach adds a lot of complexity, you’ll have your games disconnect anyway once it fails over as you can’t migrate the IP addresses. And there will be some additional traffic between the locations to keep everything in sync. And 4x chance of some of the hardware failing and someone needs to fix it. Unless I’m mistaken about how Kubernetes works.

    • mnemonicmonkeys@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      3 hours ago

      I’d rent one (small) VPS for $10 a month and split the bill.

      We don’t want to pay for a VPS. We’ve been burned by that too often in the past were you go months paying for a minecraft server that noone is using after the first month

      • hendrik@palaver.p3x.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 hour ago

        Fair enough. I mean I’d pay about 200€ a year in electricity to run 3 efficient computers. And my VPS is only 73€ and I never have to pay for replacement parts (SSDs, harddisks) which I had to replace at home. And then they have gigabit network, low latency, a proper IP address, it didn’t fail yet so their reliability >99.6% seems to be correct. And that’s all way better than what I have at home. So it’s a no-brainer to go for that. But your calculation might be different.

        I mean ultimately there is no harm in trying. If you have 3 old computers laying around, you might as well try setting up a kubernetes cluster. I think it’s going to prove difficult to handle the IP addresses but I’m not an expert on high availability and gaming clients.

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

      And 4x chance of some of the hardware failing and someone needs to fix it. Unless I’m mistaken about how Kubernetes works.

      I’m pretty sure half the point of kubernetes is to have the server automatically reroute traffic when one node goes down

      • NowThatsWhatICallDadRock@slrpnk.net
        link
        fedilink
        English
        arrow-up
        1
        ·
        15 minutes ago

        That would be a load balancer but is not integral to the working of kubernetes. I wouldn’t consider kubernetes unless you have a need for autoscaling. It’s a lot of overhead for such a limited use case.

        You can front any three un-clustered nodes with a load balancer to the same effect

      • hendrik@palaver.p3x.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        2 hours ago

        But doesn’t that require some software-defined networking or a special network setup? I’m pretty sure with the average home internet connection, you’ll fail over to the replica at your friend’s home. But that has an entirely different IP address and the game client will not handle that gracefully. It’s going to disconnect. And you need to do some DNS as well to always point at the active server and forbid caching. In a datacenter or enterprise setting, sure. you’ll just reroute the traffic and nobody will notice.

  • rozodru@piefed.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 hours ago

    should be find depending on the chat server.

    I mean hell we used to do this way back in the day with IRC and Quake servers. it’s not hard at all and you don’t need to over think it. I mean it’s not like the thing is going to crash often so I’m not sure why you want to spread it out. I generally reboot my server like once a month and it takes all of 5min.

    Depending on the game and the type of chat server you’re looking to run I don’t think you need to over think it. Just start out with like a VPS, see how it goes, maybe switch it up to a dedicated. neither are expensive.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    4 hours 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.

  • Brkdncr@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 hours 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.

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

      Keeping it all one one LAN would defeat the point. I’m looking at avoiding downtime from internet and power outages, which would require separate locations