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.
  2. Dismiss Notice

Question Help multiplayer scale?

Discussion in 'Multiplayer' started by Tx, Jan 8, 2023.

  1. Tx

    Tx

    Joined:
    Jul 4, 2012
    Posts:
    101
    Hello,
    I have currently a pair of games online (social card games) and they are both authoritative dedicated servers (one in c# with udp and one in java using smartfox).
    Currently I have almost 10000ccu on c# and almost 5000ccu on java on a dedicated windows servers (unfortunately somtimes there are hiccups of disconnections but logs are clear of slow queries and any real slow function).
    I'm not a networking expert tough and I think this setup has flaws and I wonder how to optimize. Is the only and next step going multi-server? I do not like the idea of clients hosting their game sessions since I think it would be a full rewrite of all the client and server code and could have huge issues of troubleshooting players' problems. Does anyone have success stories about this road?

    So... what could I do? I was thinking about splitting the games in areas.
    Autenthication, friendlist/club management, personal messages on a server (maybe in nodejs? request->response->close connection?).
    Maybe Matchmaking on a dedicated server (this server shouldn't have many connection live at the same time) that spawns game instances on a list games servers.
    I should need a shared DB server to synch all persistent data too.

    In the current implementation there are a lot of functions that know if an user is actually connected but with a setup with many server I wonder if this is possible anymore and how I can change features such as, "send a message to someone and update its 'message notification' if he's not connected"? Should every player poll a server for updates? How could be this scalable to 10000ccu and more?

    So, where I could find any tips about implementing a better architecture? Any tip?
    I have found presentations about very large architectures (such as instagram) but the number of users I have to deal with is much lower and I also have to think in terms of budget.Seems there isn't much documentation around about average CCU and the step from one server to many seems a bit of a mistery to me.