Can Photon Cloud Server handle 64 concurrent connections

Options
buck
edited October 2013 in Photon Server
For example, using the demoworker example for testing.

Comments

  • dreamora
    Options
    It potentially could but it will not allow you to do any realtime networking under the current message limitations
  • buck
    Options
    @dreamora,

    Thanks again for your insight on this. I found that it seems to top out at around 12-15 concurrent connections and that's with demo worker. I'm not even instantiating anything.

    I am guessing this figure is way to small a number or my expectations are not correct with Photon and I am doing something wrong. Even with old and gone Torque TGE I was getting 20+ concurrent connections and it's a socket server out of the box with no optimization. That tech is several years old.

    If there is a way to test this with some proof of concurrent connections then I would feel better about what I want to do.

    Thanks for any help on this :D
  • dreamora
    Options
    There is no problem on either end.

    You can throw in 64 players if you host Photon yourself. The cloud has a 'messages per second and room' limit which will prevent you from going up to this many players. This is to prevent the cloud from being flooded.
    I brought this up on the related blog where the subscriptions and limits were mentioned, request / pointing out that there should be a scaling model for more messages / room / second
    If you host your own Photon server you don't have the limit and have to cope with the traffic and impact on latency and enduser latency yourself.

    That being said: With 64 and alike I would consider using something built on top of interest management, simply broadcasting to all will lead to massive amounts of traffic (unity networking would have this problem too thats why its impossible to get realtime networking with 64 players in a game unless you use the scope there to do your own interest manamagent).
    TGE has the worlds most advanced networking especially when it comes to interest management and traffic optimizations (I consider quake rank 2 not rank 1), you will not find anything able to compete out of my view - its not a incident that Tribes 2 was the only game to ever have 256 players on a single server and that back in 56k modem days!
  • Tobias
    Options
    buck:
    The Photon Unity Networking "plugin" is not optimal for large numbers of players per room. It can't avoid some overhead for being simpler and generic. This should be avoided if you build anything more complex.

    Maybe you take a look at our regular Unity library and the Server SDK. It contains a room based server logic (called "Lite" and "LiteLobby") and a "MMO Demo" which goes into the direction of interest management. This is far more complicated but also able to get more players into one seamless world.
  • buck
    Options
    @Tobias, thanks for the reply. I'm digging into Photon a bit more and will take a look at those specific demos.
  • I do really like the way photon cloud works..

    One thing I would really like to work out is what exactly is a message per second?

    For example, say I got the "position", "rotation" and "velocity" under a state sync, then is that classed as one message or three per second?

    **Update

    I think I worked I out, a state sync is classed as 1 message per second * updates per second * number of players. However I believe its also based on a send and receive structure.

    So it should look like this, 1 state sync for 10 players at 10 updates per second is 1 * 10 * 10 = 100 messages per player per second.

    So in other words at 10 updates per second and based on a match of 10 players, each player with one state sync will require 100 messages per second. The same for 5 player would be much less, like 1 * 10 * 5 = 50 messages per second.

    Is this correct, or did i miss understand something?
  • Got another question related to the one above!!

    As part of my development I was thinking of adding in AI. I do know how the AI can work with photon cloud as I have already made it, however would each AI also be classed as 1 message per second based on the question above? Or has it more due to the relay between the master client?

    I do already think I have outgrown the capability of photon cloud and will look into hosting my own photon server. But I will want to keep the same setup as the cloud.

    I think these questions provide much better insight in how the network layer works and should help others seeking the same information.
  • I did a test today and my results where far less than expected. Next weekend I will conduct a test with 5 players and 5 AI. I think that will be fine for my needs, and I can stick with photon cloud if it works out well.

    Answers to the questions above will still be very helpful.

    Thanks in advance
  • Messages are "incoming + outgoing messages":

    10 players x (1 incoming request + 1 outgoing response + 9 events to other players) x 10 msg/s

    That is, for 10 players / room:
    10 x (1 + 1+ 9) x 10 = 10 x 11 x 10 = 1100 msg/s

    In general:
    player x (player+1) x number of msg /s

    If you are using Photon Cloud and your AI is a master client that holds a physical connection to Photon (and sends data in the same frequency), then there is no difference if you have 5 players and 5 AIs, or 10 real players - it's the same for both.

    Hope this helps!
  • r_projects
    Options
    I seem to be getting less, messages per second than that but I will take your word for it.

    So what is the recommended target volume of players per room with photon cloud at 10 updates per second?
  • What happens if we go over the 500msg/s limit by a few messages? Let's say 550 msgs per second? Will the cloud just drop the messages or will be charged some extra $?
  • It's a soft limit - messages won't be dropped and you won't be billed an extra fee automatically if you exceed the limit occasionally, but if there is a constant over-usage, we'll need to talk and find a solution. We'll find a fair deal.
    But we encourage you to reduce the amount of data as much as possible - also from a client perspective: the less messages, the better the client performance, especially on bad networks or small mobile devices. :)
  • Attreyu
    Options
    I know it´s an old thread, but still relevant.

    Is there a way for configuring PUN (devs at Exit, I´m looking at you :smile: ) so as to only render the messages exchanged by the players in proximity to each other ? For example - if two guys are fighting or chatting, and the rest of 8 players are on the other side of the map (in a 10 ppl room), the message load could drop down significantly, right ?
  • Markus
    Options
    That is a separate topic, but you might want to have a look e.g. at http://www.m2h.nl/network-traffic-culling/