.

Handling High Traffic Websites in Drupal. Recipe Website Case Study

Users visiting a website expect it to work quickly and smoothly. Therefore, it is the task of the website owners to ensure and maintain this. Such a challenge is even greater for websites with high traffic. Many visitors at the same time can cause problems not only with the website but also with the server infrastructure. We’ll show you how to deal with this using a popular recipe website as an example.

Challenge - one of the biggest recipe websites in Poland

The Kwestia Smaku portal collects a very extensive database of recipes and culinary inspirations that users can find and prepare in their own kitchens. A clear and user-friendly interface encourages them to use this website, which is why it’s one of the most often visited recipe websites in Poland. According to data available on the web, it reaches millions of hits a month.

First, the team of Kwestia Smaku approached us with new ideas to implement for their Drupal website. We analyzed them and then created the necessary functionalities. In subsequent stages of our cooperation, we had to take up the challenge of the growing popularity of the website. The traffic increases even more in seasonal holidays (Christmas, Easter). Despite high traffic, the platform had to generate and load rapidly so that the users could browse recipes comfortably.

Implementations on a high traffic website

When many users access the website while cooking, switching it off isn’t an option, even for a moment. Therefore, a high-quality process was needed for making even the smallest changes. Then, in order for the website to be available without interruptions before the implementation, we performed several tests to rule out any problems during the implementation and after its completion.

We ran several tests on a test environment using Jenkins to ensure that the implementation of changes on the production environment would progress successfully. It was performed during the night hours (10 p.m. - 6 a.m.), using the AEgir panel.

The results - performance optimization and new functionalities

High traffic on the website generates many queries to the database. To reduce the number of database operations during the content search, we used the Apache Solr platform. All result views that previously used the database directly, as well as the search engine and filters, have been modified and now use the Solr platform. It also enabled the implementation of the AJAX technique, i.e., updating individual elements without reloading the entire website.

Flexible searching

Using Apache Solr and the Drupal Search API module, we developed a flexible and precise search functionality tailored to the needs of the Kwestia Smaku website visitors. They can now search for recipes based on a phrase, ingredients, or the type of dish they want to cook.

Flexible search functionality which we developed for the KwestiaSmaku.com website

 

Optimization

The loading speed of the website plays an important role when many users are browsing it at the same time. Therefore, we had to take care of the very optimal collection of data displayed on the website. We’ve done countless different types of efficiency optimizations and database queries and set the temporary memory (cache) lifetime. We used New Relic and Blackfire tools for this purpose.

Graphical interface

Using Sass, Less, and JavaScript, we made front-end changes to adapt the graphical interface for clear display on various devices' screens (responsiveness). The users gained a straightforward and friendly interface, allowing them to freely use the website and browse the recipes.

Search engines and social media

Great emphasis has been placed on making the recipes look friendly in search engine results, as well as for sharing recipes on social media. We used the Drupal Metatag module for this purpose, along with configuration according to the customer's guidelines, including the number of reviews, the average rating of the recipe, and a photo adapted to search engines and social media.

A friendly look of the recipe from the Kwestia Smaku website in the search engine results

 

Favorites

It’s a very popular functionality that allows users to create their own lists of favorite recipes. To share the recipe list, they have the option to clone any list to their own account, send a link with the list to a specific email address and share the list on Facebook. The functionality has been based on the Flag module and the visual part on a library that allows the use of drag and drop function.

On the Kwestiasmaku.com website, users can create lists with their favorite recipes

 

Other conveniences for the users

To provide users with the best possible experience, we introduced the facility of logging in via your Facebook account.

Another feature we’ve prepared is a kitchen calculator. Thanks to it, the users can find basic information about measures and weights used in the kitchen and calculate the quantities of needed ingredients.

The kitchen calculator helps to calculate the amount of ingredients needed to make a given dish

 

Private notes

Users can add their own notes to the recipes to further customize them to their preferences. This makes Kwestia Smaku suitable for both beginners and experienced cooking fans.

A possibility to add notes to recipes on Kwestiasmaku.com - a high traffic website

 

Identification of mobile devices

To prevent the recipe website from blanking out the screen of mobile devices when preparing meals, we introduced the possibility of blocking the backlight.

 

The possibility of blocking the backlight when using the Kwestia Smaku website on mobile devices

 

Security support

At all times, we ensure that the website has the current version of Drupal core and modules. When security updates are released, we implement them immediately.

How to handle high traffic websites in Drupal?

Thanks to the optimization of the website, Kwestia Smaku can continue to develop without having to change servers or expand the server infrastructure. The speed of operation is very satisfactory, and the adapted functionalities are sufficient for clear and very easy use of the website.

During the development, we encountered several significant challenges that we had to overcome. All development was organized in such a way that it didn’t interfere with the operation of the production website and to meet the customer's expectations, despite heavy traffic. The changes to the production were released at night when there was little traffic. During the implementation of changes to the website, we worked with the hosting provider to ensure that unexpected issues were resolved promptly, and unavailability time was kept to a minimum.

If you need assistance with handling and implementing changes to a high traffic website in Drupal, see how our Drupal support team can support you.

As part of Drupal support, we maintain existing websites and expand them with new functionalities