Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question [Architecture] Compartmentalizing my game server with MQ?

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

  1. vriog


    Dec 6, 2014
    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:


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