Game Server Stress Testing

Categories: Bingo Game Server

Over the last few weeks, I have made (and continues to tweak) a stand alone java application to aid in stress testing the bingo game server. Stress testing puts the game server under heavy load. Due to time constraints, this is something that I have not really done in more detail in my previous site projects, but for BingoGems I decided to develop a separate java application so I can do some stress tests before the bingo site is launched.

The application does the following:

  • Create socket connections to the game server, at random intervals
  • Simulate player sign in to the game server, joining a random room (since a game server may be running more than 1 game room)
  • Buy cards to join the game, the purchase is also done at random intervals to simulate joining during a valid buy event, in the middle of an existing game, and when buying is no longer allowed
  • Player names are randomized, so names of different lengths can be tested in the Flash chat and games
  • Random chats are also sent at random intervals, which is actually even based on a valid dictionary of words to better simulate chatting, with some random characters thrown in for more variety
  • Random smileys are also sent in the chat, at random lengths
  • Chat will simulate normal and capitalized (when the player has the CAPS LOCK key on)
  • For Spin Bingo, spins are also simulated at random intervals so scores are also generated
  • Connections are also dropped randomly to simulate a player logging out of game (who may or may not have a game in progress)
  • Multiple connections dropping out simultaneously is also simulated (this happens in cases when a bingo jackpot has been won, and most players end up leaving to go into other bingo rooms with higher jackpots), this has actually been a major issue on HB when it was initially launched since it was crashing the game server unexpectedly
  • Simulate a player dropping out, then logging in to continue an interrupted game
  • Simulate slow internet connection (e.g. the Flash games will experience some delay in receiving some packets)

So basically, the stress testing simulates how the game server reacts to multiple players in a live environment, especially at high loads. The time I spent developing this java application was well worth it, as most of the game updates I have done this month are actually because of issues I encountered during stress testing. There’s just A LOT of issues that only appear when already testing with multiple players, since I usually just test with a single player connection.

All the issues I noted have been fixed. This also includes a very rare occurrence of the game server becoming unresponsive due to synchronization issues, which has been very hard to reproduce. While I am sure some problems will only appear when I have the site launched, I can safely say this bingo game server has undergone better internal testing compared to the other projects I have done before.

So far, the game server is looking stable, and thanks to the stress tests, many issues (in the game server and the Flash bingo games) are now resolved prior to site launch.

Tags: ,

Search Blog