Drupal and high-load projects. Myth or reality?


One of spring days 2012 brought us a new project. One of our regular customers recommended our company to a very ambitious and engaged Moscow businessman. After reading the specifications we were at a loss… after 5 years of active web-development! HiConversion project demanded the following:

  • advertisement posting and administration in VK social network;
  • statistics gathering from all the ads published on outer resources: VK, Google Analytics, Yandex.Metrica;
  • ability to monitor statisitcs on all the published ads for any time period;
  • depending on results of the above-mentioned statistics - automatic or manual ads administration;
  • access to all targeting settings (both one-by-one or bulks);
  • interfaces for advertising agencies, hierarchical roles and permissions system;
  • control over user account: ability to replenish account, automatic publishing blocking if there is budget is not full.

And that is just tip of the iceberg. But let’s now concentrate at the architectural approach to implementation of such a complicated project.

As you see all the above-mentioned demands are far from trivial web-application, not to mention Drupal default functionality. Necessity to update dozens of thousands queries per minute with outer resources information forced us to look for roundabouts to overcome both Drupal core and other services limitations.

To get the most of these limitations we had to re-think queries saving and processing formats in Drupal. Various data formats, principles of their communication and authentication needed to be taken into consideration, of course. As a final result - our queries had been processed not by cron scheduled tasks but by php-demon. It had been monitoring elements presenсe in queue and implemented tasks at the very maximum speed which could have been achieved. A complicated ‘semaphore’ system (based on Drupal Lock API) was in charge of monitoring resource limits. Also our interface allowed to easily add the new types of queries’ elements.

We also were forced to modify the very principle of fields processing in Drupal due to enormous statistical data storages (~1 million queries). At the same time we wanted to stick to Drupal philosophy and to have the possibility to use standard implementations. That is why we created new types of fields which were more adjusted to our needs and used 100% of Drupal Field Storage API solutions. In our case the majority of operations demanded a vast amount of fields to be updated with one-type kind of information in one go. This condition actually helped us to optimise the system - we added the functionality of fields mass updating and the posterior calling of the needed hooks. Advantages of such approach showed up very soon - we were able to use modules to build views with very complicated and interdependent filters and save them.

Regardless of system complexity we have left enough space for further functionality enlargement, e.g. queue event handler with flexible setting was added easily. On user-interface it looked like addition of Field Collection element with set of field settings. From the code perspective we only needed to add these settings and reaction rules handler expanding its basic behavior class.

Of course despite the above-mentioned non-typical tasks we needed to implement more common ones. For example, ads editing via exported Excel files; Yandex-market feeds scheduled parsing; and lots of other challenges concerning complicated user interface. Also it is worth mentioning that during this project implementation we made several patches for contribution modules (famous Views - among them).

high load drupal site

Now pure statistics of all the high-load this ‘monster’ handled easily when our contract with this client was almost over:

  • 400.000 nodes;
  • from 4.000 to 20.000 new ads daily;
  • 2.000 active advertising campaigns;
  • 145.000 published ads;
  • 8.000 ads published simultaneously;
  • 21.000 ads where statistics is gathered from and targeting tactics are worked on less than 1 minute;
  • up to 90.000 queries to VK API daily, average amount - 30.000;
  • database size of 8GB, up to 2 million queries in one table;
  • 1 year of development by the team of 4 developers;
  • more than 32.000 code lines.

Of course quality of work is not measured by the number of lines. So here are some facts for our not-involved-into-development audience:

  1. This project is the 7th advertisement networks which managed to gain VK accreditation;
  2. HiConversion was nominated for “Startup 2012’ award in Russia;
  3. Half a year after the first iteration launch this service-provider managed to gain such famous clients as MTS (rus.  МТС), Euroset (Евросеть), Teamo, Sotmarket, Alfa-Bank (Альфа-Банк), etc.

This startup owners’ role can not be underestimated: their proficient approach to business architecture bore fruits. Later the second iteration had been implemented via absolutely another development technology. The project is continuing to grow and holds its positions on targeted advertising market in social networks. We wish everybody has such clients and challenging projects!

6 votes, Rating: 5

Read also


One of the main issues after making decision to launch a website is development platform - CMS or custom coding? Let's elucidate Drupal framework advantages.


Very often a lot of developers face the issue of flexible materials sorting on the site. One of the solutions to solve this issue is Radioactivity module. Learn more about this tool.


We use "Git Flow" repository operations model quite often in our work. Let’s consider the scheme in detail.


Changes in Drupal 8 have also affected the process of creating your own widgets and formatters. The new Plugin API significantly simplifies this procedure.


Continuing review of Panels module functionality, this blog deals with unique context creation with help of Chaos tool suite.

Need a quote? Let's discuss the project

Are you looking for someone to help you with your Drupal Web Development needs? Let’s get in touch and discuss the requirements of your project. We would love to hear from you.

Join the people who have already subscribed!

Want to be aware of important and interesting things happening? We will inform you about new blog posts on Drupal development, design, QA testing and more, as well news about Drupal events.

No charge. Unsubscribe anytime