we are developing an iOS-based game with multiplayer support. so far everything seems real good but now we want to make sure if server could handle 10000 clients or not. any idea how can I make sure server will survive that much traffic?
For traffic load testing there are many tools, but you're going to need to test other things as well that will be specific to your game server because network traffic is only one part of the equation -- the processor utilization and constant database queries are two others that immediately come to mind as important factors that you'll want to measure (there will undoubtedly be other factors as well, which you'll have to determine based on your knowledge of how your game server works).
A really good way to do this might be to write a "game player simulation" client program and run multiple instances of it on multiple computers. The down side is that this could require the use of a lot of computers, but some local universities might have big computer labs that you could run these on (the professor might be interested in your test results since university professors tend to be genuinely curious about good research).
Your client may not need to be as sophisticated as a player, but you may want to make sure it does the following things (it doesn't have to be very intelligent as long as it can be slightly more functional than a drunk software developer who really shouldn't be driving herself home, so you might also want to flag the characters in a special way so that they can do silly things like walk through walls, have unlimited budgets to buy randomly selected goods from in-game merchants, have endless supplies of ammunition, and whatnot):
- Send random chat text on a randomly timed basis
- Navigate in random directions throughout the world (but tend to stay closer to major cities)
- Randomly choose to fire weapons in random directions when other players are nearby
- Buy/sell random goods from merchants, and occasionally dump items throughout the world
- Randomly light things on fire (or cause other forms of localized destruction)
- Get hordes of wild animals upset and run into a busy town with them chasing after, then randomly decide whether or not to logout (if chosen to logout, perhaps those wild animals will start attacking others in the town?)
- Heal injured players
- Set off randomly selected magic spells in crowded places
- Cook raw food, process raw lumber and other materials (such as from mining), etc.
- ...other simple tasks that your players are likely to do regularly
If you estimate that you'll have 9,000 players at one time, try to test this out with at least 3 times that number so that you'll know how your servers can handle a load of 27,000 simulated busy players (a lot of players tend to idle, especially the social types).
Also (and this is very important), if you do this, please, please, PLEASE, login with a regular character and record a video of all these computerized players doing stupid things and share that video with us here so we can have a good laugh (I'm thinking that "drunken barn dance" might be a good title for this movie if you can find just the right in-game scenario)! ;-D
This is an answer for an old question, hope it can be useful for those who get here by search engine. Netgend has a performance test platform can emulate 50,000 VUsers and can do all the flexible client emulations.
See the blogs, especially
- Networking made easy
- extracts fields from server responses
- Performance testing with binary data
Note that the message processing is not restricted to http messages, it applies to all messages.
Hope it's helpful.