Is there a maximum number of concurrent network connections?
by Bruno Campolo · in Torque Game Builder · 07/08/2009 (6:18 pm) · 6 replies
I read a few posts that say the max # of connections was removed for TGE, but is there currently a max number of network connections for TGB? I searched for about an hour in the forums and couldn't find an answer. Is it 128, 1024, no limit?
Thanks
Thanks
About the author
Creator of Bantam City Games, a one-man independent game development studio. To learn more, check out 'A Game Developer's Saga', a game development blog at: http://www.bantamcity.com/blog
#2
Sorry to be nit picky, but if I don't find out the answer to this now and there is a max limit then it will be too late to do anything about it once I hit that limit.
07/09/2009 (12:48 pm)
So, just to be clear... there's no limit imposed by TGB at all? For instance, if I had the most powerful super computer in the world and only needed to send packets every so often, would I be able to have 1M clients connected or does TGB have some hard coded number as the maximum?Sorry to be nit picky, but if I don't find out the answer to this now and there is a max limit then it will be too late to do anything about it once I hit that limit.
#3
Since it is an integer value, I am guessing in the ten thousands.
But do not worry, it is higher then you will ever need.
You are going to need to do some testing and figure out how many clients your game can hold without lagging.
07/09/2009 (7:36 pm)
I believe there is a limit, but it is EXTREMELY high...Since it is an integer value, I am guessing in the ten thousands.
But do not worry, it is higher then you will ever need.
You are going to need to do some testing and figure out how many clients your game can hold without lagging.
#4
Realistically, a typical home computer can't support many heavy-duty clients (FPS sending projectiles). Over 100 is doable if the bandwidth allows, though.
The real answer to the original question is "it depends" ;)
The long-winded answer:
MMO architectures have 3000 to 5000 players per cluster, with a cluster being any number of servers either handling a number of players each, or more typically, a selection of zones each. The end result is a few hundred players per computer, with a common chat server and player database server connected to them all.
Without a load-balancing server in front of a small cluster of servers, you shouldn't be trying many hundred clients for heavy operations. A web server or MUSH/MUD server can handle more than an FPS server, because they don't rely on low-latency responses, for example.
So the variables you have are:
-Server latency (How much time it takes to process the actions of a client in the world. How much stuff does the server need to track for each player? How much interaction is there between clients to calculate?)
-Network latency and bandwidth (How optimised are the communication packets? Any compression? Is the server on a 10Mbit, 100Mbit or even gigabit network?)
...and probably a few more.
From a programming perspective, the number of ports you can have might top out at 65000, but that doesn't mean the hardware can handle it. If you manage to squeeze down player communication to 100-500 bytes per communication (maybe 10 updates per second), the hardware probably craps out before your bandwidth does.
Linux is the easiest to set up, by the way. Easier on the wallet, and a hosting company hands you a working server. VPS to start testing, semi-dedicated or dedicated when going full-scale testing. A good hosting company hands you a working server, configured for the network (and when do you EVER set up your own server's networking anymore when renting rackspace?).
Don't think in powers of two, either. A particular server may work fine with 1233 players for a MUSH and collapse entirely at 1234 :)
The engine doesn't put a limit on connections, but real-world issues do. You might also want to write your own dedicated server in some cases.
07/09/2009 (11:15 pm)
The short answer:Realistically, a typical home computer can't support many heavy-duty clients (FPS sending projectiles). Over 100 is doable if the bandwidth allows, though.
The real answer to the original question is "it depends" ;)
The long-winded answer:
MMO architectures have 3000 to 5000 players per cluster, with a cluster being any number of servers either handling a number of players each, or more typically, a selection of zones each. The end result is a few hundred players per computer, with a common chat server and player database server connected to them all.
Without a load-balancing server in front of a small cluster of servers, you shouldn't be trying many hundred clients for heavy operations. A web server or MUSH/MUD server can handle more than an FPS server, because they don't rely on low-latency responses, for example.
So the variables you have are:
-Server latency (How much time it takes to process the actions of a client in the world. How much stuff does the server need to track for each player? How much interaction is there between clients to calculate?)
-Network latency and bandwidth (How optimised are the communication packets? Any compression? Is the server on a 10Mbit, 100Mbit or even gigabit network?)
...and probably a few more.
From a programming perspective, the number of ports you can have might top out at 65000, but that doesn't mean the hardware can handle it. If you manage to squeeze down player communication to 100-500 bytes per communication (maybe 10 updates per second), the hardware probably craps out before your bandwidth does.
Linux is the easiest to set up, by the way. Easier on the wallet, and a hosting company hands you a working server. VPS to start testing, semi-dedicated or dedicated when going full-scale testing. A good hosting company hands you a working server, configured for the network (and when do you EVER set up your own server's networking anymore when renting rackspace?).
Don't think in powers of two, either. A particular server may work fine with 1233 players for a MUSH and collapse entirely at 1234 :)
The engine doesn't put a limit on connections, but real-world issues do. You might also want to write your own dedicated server in some cases.
#5
07/10/2009 (4:22 am)
Thanks for the detailed replies. I understand that there will be hardware issues, but this is something that can be scaled with customer growth. If TGB had some hard limit then in order to scale up I would have to move to a different engine at that point which is ~probably~ harder than adding more servers.
#6
The only reason I said it is a power of 2 is because of this:
If you have a game with 32 players, then it will only send out to those ports.
If you have a game with 33 players, then it will send to 64 ports. So to get every bit out of the game, I suggest a power of 2.
07/10/2009 (10:00 am)
@RonnyThe only reason I said it is a power of 2 is because of this:
If you have a game with 32 players, then it will only send out to those ports.
If you have a game with 33 players, then it will send to 64 ports. So to get every bit out of the game, I suggest a power of 2.
Torque Owner Tyler Slabinski
Extremely latency sensitive games (fast paced with alot of physics, projectiles, etc.): Around 64 players... Maybe 128 if you don't mind lag.
Latency sensitive games (normal fps game with no real physics): Around 256.
Low latency sensitive games (MMOs): Depends... 1024, maybe 2048 if you make everything very simple.
If you change the update time to 64 seconds rather then 32, then you can double the player amount... But your game will look sort of choppy.
It depends on your server speed and bandwidth...
-High Intel Processor
-Mac OSX Server
-FiOS
A powerful Intel Processor is a MUST if you want to get every single bit of power out of the game.
I only suggest Mac OSX Server because Linux is sort of hard to get set up on a network (although that may just be me). And forget Windows for a server... Might as well try and use Commadore 64...
FiOS is just an example. It is really fast, but High-speed is getting faster too. If you don't mind taking the time for them to dig up your yard, I suggest the fastest speed for FiOS.
Also, I don't know if the server is considered to be a client... Anyone know? If it is, then just take whatever you have and subtract 1.