Parts of developing a game like Heroes & Generals is making sure everything around the game runs as smoothly as possible as well, so today I cornered Reto.HansG or a quick look at how that part of the operation works. – Reto.Robotron3000
Today I will tell you about the backend design of the homepage system on heroesandgenerals.com.
We use Apache and nginx as the backend system. There are 3 web servers to generate the pages you see. The pages layout is generated by the WordPress system with one nginx server as front-end cache server to send the pages to you. The nginx servers are working as one big cache server, we use nginx because it is super fast to send the pages to your browser.
We have to ensure that the speed to you is as good as possible all the time, and that the servers can handle the numbers of users online at the same time. Pages like the main news page need special attention to get the time you have to wait down. Some of the pages are quite big. (all the graphic have to be loaded fast) and that can give some problems with load time/memory use and the Apache setup on the web servers.
The cache server can not handle all types of page. Some of the pages will be generated on the fly while you are online by WordPress, for instance pages that relate to dynamic content.
All of this we have to take action on, by checking the load time for that type of special pages. This give some design work to the web designer robotron3000 cool dude by the way. While I will check the servers cpu and memory load on the web servers.
Last week we have some problems where some new layout was uploaded, the page load time was to slow. The issue then is to identify what is new, and what is wrong with it. Having identified the problem, sometimes it can be fixed by editing the code running on the webserver, and sometimes it is a feature that we need and another approach is required. A lot of the performance settings in Apache can be tweaked. If it was a car, you can imagine changing it from a fast sportscar to a heavy duty truck by turning some handles. It can’t do everything at the same time (so no 200 Km per hour gravel deliveries) though.
This setup is mainly done by changing some apache setting like MaxMemFree and MaxRequestPerChild in the apache config files. This time we could also make some change to the way the web graphics files are loaded by the Apache web server.
Here you can see the memory use be one of the web servers, you can see that the memory load is change over time by the week.