Sign in to follow this  

Server Throttling

Recommended Posts

wilberolive    381

So, I'm wondering how I might approach the problem of throttling the server to make best use of the bandwidth. I honestly have no idea where to start with this and my google fu has turned up very little, probably because I don't know what I'm looking for exactly.


At the moment, I have the server locked to send updates at 100ms for connected clients. This has been working fine, but it made me realise that when I'm playing on a LAN with a couple of players, the server could afford to send updates faster than this without overloading the network or the clients. However, if I'm connecting to a server on the net with many other players, then the server should back off so as not to overload anything. Is this a reasonable idea? Do other games do things like this or should I just stick with my hard coded 100ms?


I can already do things like throttle updates on objects based on their game-play effects and their relevance to a particular client, so not to worried about that. I just feel like that in cases where there are fewer clients or low pings for example, the server can afford to turn things up and thus give the players a better experience with less correction going on.


Does anyone have any ideas or experience with doing this? Is it a good or bad idea? If it is a good idea, how might I approach this? Would it involve some algorithm taking into account the connected client pings to work out how fast the server can safely send updates?

Share this post

Link to post
Share on other sites
Krohm    5030

Your server must tick at a rate you decide. Period.

The task of updating client state is another thing and the two are loosely coupled.

I'm currently playing with a protocol which guarantees updates every 60 seconds, considering the data changes consistently every 150 seconds, I think it's a bit easygoing, but ok-ish given the rate of change.


For your application you'll have to consider the data you send. It's not just "let's drop those packets or not", it's a matter of figuring out how  important the data to be sent is. In general however, a server will rarely be able to stream enough data to drive the clients without having them run some sort of interpolation. 100ms seems fine (if not already overkill) in that regard. 


For all other your questions however I have no answer and I'm keeping an eye on this thread to see what it turns out to be.

Share this post

Link to post
Share on other sites
hplus0603    11347
Games like Counter-Strike often allow the server/host to set parameters like physics and network update rates. Although if your behaviors are highly tuned to a particular physics time step, changing that may not be desirable.
Thus, for the "server setup" screen, you might want to have a slider, or a pop-up menu with a few choices, if you want to provide a different experience for different network situations.
That being said -- if the game is fun at 100 ms ticks, why muck with it? And if it's not fun at 100 ms ticks, you probably should be focusing on THAT instead :-)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this