In the ever-evolving digital landscape, optimizing web application and website performance is not just a necessity but an imperative. Drupal, a dynamic online platform catering to a diverse user base, recognized the need to elevate its performance standards. This case study delves into the multifaceted approach to enhancing Drupal backend and frontend operations, aiming for a seamless user experience, efficient system functionality, reducing computing costs, and improving search engine optimization.

Objectives

The backend optimization’s primary objective is to identify the source of the bottlenecks within the architecture running the Application that significantly degrade user experience due to poor performance. Our goal is to pinpoint those issues and take decisive action to enhance the site’s response time, ensuring seamless and efficient user interaction.

Methodology

In order to execute the task of increasing the poor site performance, we used the following procedures: Dividing the work into two parts; the first part was to analyze the backend efficiency using APM tools installed on the production servers and local tools to audit the code quality. The second part was to audit the front-end performance.
Backend audit includes

  • Resources: Storage, CPU, memory, network
  • OS configuration
  • Application Servers
  • Database servers
  • Memcached
  • MySql Caches
  • Nginx Caches
  • PHP Caches
  • Proxy Cache
  • Drupal Caches

Below is an example of a huge improvement in average response time across all webpages generation divided by a factor of 2 after configuring and tuning properly Drupal cache layers.

 

Reviewing fully all cache layers allowed us to decrease drastically the amount of SQL requests. Divided by a factor of 10!

Also, Memcache requests were divided by a factor of 2.5!

 

All page not-found request were divided by a factor of 10, and their generation were cached too.

Sometimes, simple DNS records are not enough. We offer services to delegate domain names to some WAF systems like Cloudflare, Incapsula, etc. After the records are transferred, we configure security, SSL, cache, and other options that make the site more secure.

We used the following tools:

  • AppDynamics (APM)
  • Zabbix (Network and resources monitoring).

Frontend audit includes:

  • Listing all assets and their sizes, including HTML, images, CSS, JS, fonts, XHR requests…
  • Listing all 3rd party libraries and domains(DNS) in use by ex: Analytics, CRM, Docs.
  • Loading Priority of all assets, mainly Images, JS, and CSS files.
  • Compression used per assets: images, fonts, text files…
  • Images dimensions
  • Aggregation
  • Minifications
  • Caching headers

We used two types of frontend performance auditing tools
The first are the ones that test websites with Emulated devices (CPU, Memory, Network, and screen resolution) (Lighthouse, webpage test, etc.)

 

The second type is other online tools that provide real user experience metrics ( Google page speed insights, Search console, etc.)

Those tools aim to obtain Core Web Vitals representing the performance efficiency of the website(s) and to optimize each one.

Backend Improvement: A Pillar of Performance

The Drupal optimization was based on several backend enhancements. A pivotal initiative involved a meticulous overhaul of the Drupal framework, focusing on optimizing page caching for anonymous users. By transitioning from session-based mechanisms to more efficient cookie-based approaches, Drupal’s page cache was extended to encompass a wider array of pages on the front end. This strategic shift significantly reduced MySQL queries, benefiting both anonymous and logged-in users, and streamlined resource-intensive processes involving PHP and MySQL.

Furthermore, the optimization efforts delved deep into Drupal’s core, spotlighting the need for efficient SQL loading of entities. By caching Drupal entities such as nodes, taxonomy terms, and files, the platform experienced a drastic reduction in SQL queries, enhancing the experience for logged-in users, including editors and administrators.

Complementing these enhancements was a robust cache management strategy, ensuring the timely purging and proxy cache invalidation of Drupal pages. This meticulous approach improved cache efficiency and streamlined the overall user experience.

Empowering DevOps: Fine-Tuning for Efficiency

A meticulous review of the DevOps landscape parallelled the backend optimizations. Drupal Multisites’ infrastructure witnessed substantial improvements through the tuning of database engines. Specifically, MySQL/MariaDB configurations were fine-tuned, emphasizing increasing cache sizes for InnoDB. This enhancement and an audit of other settings contributed significantly to database efficiency.

Additionally, the caching mechanisms were revamped, strategically separating cache_page bins from other bins and enhancing cache invalidation processes. The underlying web server, Nginx, underwent meticulous tuning, focusing on cache headers, asset compression, and other HTTP settings.

Furthermore, upgrading PHP to version 7.4, while requiring an intricate code refactor, paved the way for extensive benefits, as highlighted by performance benchmarks.

Decreased operation and employment costs


Became a tech-centered hotel using the same operational software

Frontend Innovation: Elevating User Experience

Drupal’s commitment to an unparalleled user experience extended to front-end innovations. A comprehensive audit of network payloads led to optimizing CSS, JavaScript, and font file loading, ensuring they were loaded only when necessary. Image optimization strategies, including using image styles and external tools for compression, further streamlined the platform’s performance.

Efforts were also directed towards reducing the number of requests through improved aggregation of CSS and JavaScript. Implementing lazy loading for images not only conserved bandwidth but also improved page loading times significantly.

Moreover, strategic initiatives such as lazy loading CSS and critical CSS for essential website sections enhanced speed perception, ensuring a smooth and uninterrupted browsing experience for users.

Summary

Through backend enhancements, DevOps fine-tuning, and frontend improvements, Drupal has emerged as a fast and stable system with user experience at the center.

In this case study, we illuminate the transformative journey we embarked on with Drupal, establishing new standards in digital performance optimization.

Share
Skip to content