Master your own destiny! Command a nation!

How do we actually show you this webpage?

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

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.

  1. Gaurav251Gaurav25111-21-2012

    “web designer robotron3000 cool dude bye the way”


    Just posted to tell you that, huehuehuehue.

  2. StrausserStrausser11-28-2012

    Do you guys actually have your own servers? Or do you use something like Amazon Web Services?
    I could go on for hours about how much I love AWS! We currently use it for our projects at work.
    Not sure if the pricing is ideal for a site like this though :p
    How quickly did you guys need to scale up to a tier with 3 servers? and what was the hit rate like?

    • Reto.Robotron3000Reto.Robotron300011-29-2012

      We had to scale up rather quickly due to the backend servers handling other things as well.
      And it is always nice to have more machines to shovel things around between :-)

      We have been using AWS for some things, but we’ve found that it gets rather expensive very quickly with the way our setup is configured. As we get to know more and more about exactly what we need (and how fast we need it), we are looking to cloud based services in combination with running stuff off the data centers where the war servers and action servers are located.

What are you waiting for soldier? We need heroes on the battlefield and generals to lead them!