I am about to make an online game that will be played by about 1500 people at the same time. It will be a simple AJAX based quiz for a college competition. But the last time I made such a quiz, due to heavy traffic, the server kept crashing. We had to restart the server several times during the game. Still, access to the site was very slow. I have seen other college websites and their games don't seem to have such problems. Can anyone tell what might be our mistake? Since I am a student at college (not even of computer science), I am not very much aware of server administration.
Simply put, you are overloading your server with hits so you may want to look at the server stats to see where the bottleneck was/is. Only then can you decide if going with a larger server is more beneficial, or splitting out the application into another tier ...web and application.
this will spread load more evenly and reduce your bottlenecks.
Called smart programming.
- Get a profiler.
- Find out where the time in your code is spent.
- Fix it.
That is all you can do. THis is not server administration, thisis bad programming bogging down the server, and you ahve to make an analysis and fix it. 1500 people on a quiz is something a mobile phone should be able to handle, so whatever server you ahve is big enough.
精彩评论