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?

  • msage@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    ·
    7 days ago

    Not seeing LGSM, so dropping it here: https://linuxgsm.com/

    I have a Matrix server with Jitsi installed, works for gaming and everything else.

    Also, some older games (like Warcraft 3) require L2 connections to play multiplayer, which I managed to get working with OpenVPN, for both Linux and Windows players.

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

  • hendrik@palaver.p3x.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    8 days 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.

  • Kairos@lemmy.today
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 days 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.

    • mnemonicmonkeys@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      7 days ago

      The game has to be made for it

      Just for clarity, do you mean the game has to be made for self-hosted servers, or do you mean it has to be made to handle self-hosted servers across a cluster?

      The former is already a thing with Minecraft, 7 Days to Die, etc. The latter… Yeah I’d have to do digging on that

      • Kairos@lemmy.today
        link
        fedilink
        English
        arrow-up
        3
        ·
        7 days ago

        Actually I can provide a little more detail. Check out how Matrix handles event graph resolution/desync. It’s why messages sometimes come in out of order. This is a fundamental problem with decentralization: authority breakdown. The homesever in Matrix is considered the authority for the clients, but within the Federation itself there is no true authoritative party or event history. If a server goes off federation for a while, a room will split, and once it re-federates it and other servers will have different event graphs, assuming something happened in those rooms in the meantime for both the defederated server and federated server(s).

        Basically: videogames assume that within a certain amount of latency the server’s state is permanent and authoritative. Federation breakdowns even for 500ms can destroy a games running state.

      • Kairos@lemmy.today
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 days ago

        The game has to be made for distributed servers. The game software expects that everything the server says is authorative, including for rollback. Multiple servers introduces an extra source of latency and it’s just so hard to deal with.

        I don’t know too much about this.

  • passenger@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 days 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.