Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question [Architecture] Compartmentalizing my game server with MQ?

Discussion in 'Game Design' started by vriog, Jul 9, 2023.

  1. vriog

    vriog

    Joined:
    Dec 6, 2014
    Posts:
    29
    Hello, I am making a multiplayer game with Unity, using the Websocketsharp library for the game server and Unity WebGL for the game client.

    I get a lot of server crashes with no exception output because I suspect the crashes happen on a separate thread in Websocketsharp. Also performance isn't ideal, I'd love to have 200+ players in a game server room without lag.

    I was thinking about compartmentalizing my architecture so instead of having the websocket library run inside Unity, I could have a websocket microservice. The networking code would run a separate process and stream messages to the Unity process using a message queue software. Here is a proposed architecture diagram:

    microservice-unity-game-server-design.png

    You can find a link to the game here if you are curious: https://animals.bio
     
    Last edited: Jul 11, 2023