Calculate server requirements based on programming specifications

Have you ever come across something that was easy to develop but stopped to think about the server requirements for your project? It's my business.

I want to compete with a gambling site, they have multiplayer flash games like poker, rommy, backgammon and other card games, 8 games in total. They have rooms and tables for each game.

I will be using Silverlight with Sockets. I have already managed to develop a Policy Server, Socket Server Application using WinForms, Client Socket Application in Silverlight. I have a VPS for tests, so no problem in developing what I want, problem How to calculate server requirements, RAM, bandwidth, internet speed based on the following requirements:

  • The server must support 24,000 users per day or 1,000 users per hour
  • Each playroom should have its own tables in which users can play
  • Users should not lose points and the game speed should be fast at all

I'm just wondering how to handle the following situation: if 1000 users are connected via a Socket connection to a room full of tables and one user leaves the table, all 1000 users should be updated and the UI should reflect the changes. Let's say that I will update clients by sending a small message of 100 bytes to each user, this will have 100 bytes * 1000 users = 100 kb and this is just for 1 UI, for 1 game and for 1 room, not counting all mine other games and rooms. Also, 1000 iterations sending bytes to clients should be very time consuming.

I am a developer but am not experienced in these situations. Please advise. The rooms will be large.

+2


source to share


5 answers


The best answer I can offer you is to run stress tests and see how much load one server can handle. During these tests, check memory, I / O activity, processor, and disk activity (if necessary) to understand which resource is running out first.



We deploy our applications on Amazon EC2 cloud infrastructure. This allows us to easily (within minutes) add or remove capacity as needed. It might be worth considering your situation.

+2


source


Until you have built and optimized your applications, you cannot predict much about the hardware required for a given level of performance.



You must complete applications first. Then you can measure their performance under load. Then you can decide how much to spend on which performance levels.

+4


source


Always follow these two rules

"First rule of program optimization: don't do this. Second rule of program optimization (for experts only!): Don't do it yet." - Michael A. Jackson

+1


source


First of all, you should think more about how and when to send what information to clients. Not every client needs to be informed about every table change.

That there is only so much information that the client needs and you need to decide when / how it will be communicated. Also, you should pack the information into meaningful packages. What happens at the table is only interesting for this table.

You also need to profile your application to make sure you know what resources it is consuming. Card games shouldn't be eating as many resources. But the important point is that FIRST will create it, and when you have a bottleneck, try to fix it.

0


source


It is very difficult to guess about these things at this moment.

From a pragmatic point of view, you might end up looking into: a) a cloud hosting type service to increase the bandwidth for you, or b) a very experienced full service hosting company that can help you calculate your needs based on previous experience ...

Disclaimer: I work for Rackspace Hosting, which provides both of the above.

0


source







All Articles