Programmer's Blog: What Happens Under the Hood of gamer.ru

content auto translated from {from}

A Brief Historical Overview

The site gamer.ru has already undergone its third (and possibly even fourth) complete code rewrite. The project was originally written in Ruby-on-Rails back in the distant 2000s. The architecture was monolithic, so each user request "pulled" along a huge number of additional database queries and loaded all possible libraries. To ensure the resource could handle 100,000 visitors per day, it was necessary to deploy as many as five powerful servers, utilize memcache, Redis, and replicate databases across several servers. This allowed us to barely hold on until 2018, when the company began to experience financial problems, and the development team scattered.

Around 2020, the site lost its SSL certificate. Updating it turned out to be impossible because the old version of Ruby-on-Rails depended on an outdated version of OpenSSL, while new certificates required a more recent version. No one was particularly worried—the site continued to function, albeit poorly. From 2015 to 2025, traffic gradually fell from 100,000 to 1,000 visitors per day. In hidden blogs and comments, a huge amount of spam began to appear, including some rather inappropriate content. Yandex completely lost interest in us, and the webmaster console was filled with critical error messages.

What We Did to Fix Everything

The site needed serious optimization since the old architecture no longer matched the realities. About 100,000 posts and 1.6 million comments had accumulated in the database, which needed to be carefully migrated to the new engine. We decided to switch to a microservices architecture on both the backend and frontend, while employing modern technologies, including trendy HTMLElement's.

The project was completely rewritten from scratch in NodeJS without the use of third-party libraries, which guarantees us a peaceful existence for the next 10–20 years. Now we don’t have to worry that updating some trendy library like ExpressJS or React will break the entire site and require yet another massive refactor. Even the visual post editor had to be written from scratch, as we couldn’t find anything ready that would meet our modest requests. Now the engine renders HTML pages for old devices and search engines while delivering content to users via AJAX.

As of today, the site successfully handles an average load of about 150 requests per second, with a lion's share of traffic coming from search bots and other crawlers. Bots like Semrush and OpenAI behave particularly aggressively, acting as if they are trying to download the entire site in a day. While Yandex indexes us slowly, at a rate of 1-2 requests per second, these fellows can easily request up to 50.

However, the engine turned out to be so optimized that this entire bot army can be easily serviced by just one inexpensive virtual machine costing about 500 rubles per month.

Of course, the site periodically reminds us of itself with 502 and 504 errors, which are gradually identified and eliminated. Sometimes it turns out that someone forgot to add an index to the database, sometimes a complex query has to be broken down into several simpler ones, and sometimes there is simply no more space left on the server. But we don’t give up—the work continues, and the process, as they say, is "under control".