Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Max CCU? multiple servers?

Discussion in 'Netcode for GameObjects' started by alasoo, Oct 26, 2022.

  1. alasoo

    alasoo

    Joined:
    May 10, 2019
    Posts:
    4
    Hello, I'm new more or less new
    in multiplayer mode and I currently have a project in which there may be 1,000,000 CCUs, the idea is to divide them into rooms of 50/100 players.
    My main approach is to use multiple servers for this but I don't know if Unity offers a way that when a server reaches 500 CCU for example, it creates another server.
    Exists? or does anyone know of another tool for this?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,533
    Most certainly not!

    Let's be realistic by checking the steam charts. The #1 spot (CS:GO) has a peak of around 1,000,000 CCU. This is an exceptionally popular game though. It starts dropping quickly from there. Below the Top 10 almost all the peak CCUs are below 100,000. Your project would likely be entering the Steam Top 200 chart with a peak CCU of just around 10,000.
     
  3. lavagoatGG

    lavagoatGG

    Joined:
    Apr 16, 2022
    Posts:
    229
    Netcode for game objects is for small scale co-op games so I don't think it is good for you. The multiplay service (dedicated server hosting) shuld support large amounts of players and it can create another server when the max capacity of the first server is reached. If the max capacity of a server is 500 CCU then it can do what you want.
     
  4. alasoo

    alasoo

    Joined:
    May 10, 2019
    Posts:
    4
    Thanks guys,

    My project will not be a game, it will be an international 3D environment where people will interact.
    I currently have a simple version with fishnet, this supports about 400CCU approx.
    My problem now is creating instances of them automatically as the server fills up.
    This is done automatically by AWS for example? Or do I have to use something like MasterServerToolkit?
     
  5. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,533
    What is supposed to happen if you have 400 CCUs and one more client enters?

    Do you:
    1. split the CCUs in half, with 200 going to server A and 201 going to server B? Based on what logic? How do you determine who stays together? Do you allow for family reunion if clients who like each other get separated?
    2. or: have client 401 enter a completely devoid, empty world, waiting for someone else to join?
    Short answer: you do not automatically scale up instances if the CCU goes up. You have to provide a minimum set of instances that are always online. You have to have a simple set of rules every client understands, like allowing them to choose the server location (eg US, Europe, Asia) and the system needs to make sure that their peers can join the exact same world - the easiest being to allow them to select the server or region they're in (or have it autodetected, though this will fail for example business users who use a VPN that routes all their traffic through their Japanese HQ).

    As the number of clients rack up day over day, you have to rent more servers. Sometimes, if some crazy Youtuber or the Washington Post features your app, you will see a sudden influx of ten to hundred to thousand times as many users as before, which will have servers crashing and users being frustrated, as you try to allocate more servers around the world, which takes between minutes to hours to days or even weeks for instances to become available. But of course, by this time, you will be able to afford a dozen staff to do that to split the load. ;)

    However, if that craze goes by, a week later you may find yourself paying for 1,000 more servers than needed, and now you need to scale back down otherwise you'd go bankcrupt within a month.


    I have a feeling you haven't thought this through (nor do you have the expertise based on the questions you ask) and should instead be talking to (better: hire) an expert in hosting Massively Multiplayer Online experiences to a) scale the project to something that's a realistic MVP and b) prevent you from wasting huge sums of money on servers and so on.

    Note that even WoW at its peak with 120 million players could only host 2,500 CCUs on a single server instance. And in that game, for the most part people just walked around and chatted, with the occasional spell fired here and there. Plus you couldn't just move your character to another server like that, you had to send a support ticket and wait for a couple days, and pay a fee too.
     
    lavagoatGG likes this.
  6. alasoo

    alasoo

    Joined:
    May 10, 2019
    Posts:
    4
    Thanks for the feed.
    Unfortunately I am the one they have hired, we are a young team.
    Currently I was planning to expand or shrink the servers "by hand" as tickets are sold.
    I'll tell my boss about hiring an expert on this.
    Thanks greetings!