Making Symfony.com 3 times faster thanks to Blackfire Monitoring

By Christophe Dujarric, on Jun 25, 2021

The Services Monitoring feature gives detailed break-down of application response time in:

  • time actually spent in the application’s code
  • time spent in each service (SQL, HTTP, queues, Redis,…), as a list of most impactful services
  • detailed response time per service call, and linked transactions and profiles

Symfony.com, although already highly performant, is a great test case. Driving a huge amount of traffic, we can quickly see when something goes wrong, or needs some love.

Having details on the SQL queries in Blackfire Monitoring has been instrumental in 1) finding a bottleneck 2) measuring the impact of the fix. Outstanding result: caching one SQL query (via HTTP caching) led to dividing the median response time of the site by 3!

Global application response time graph

As innocent as a site footer can seem, it’s definitely a part that needs some love: it’s loading on most (if not all) of the pages!

On the Symfony.com website, the footer especially contains a list of Blog post categories. This list is dynamic, and the values are fetched with a SQL query.

Using Blackfire Monitoring, Fabien quickly realized that this SQL query was the most impactful. It accounted for more than 60% of the total time spent overall in services.

Global application response time broken down over services

By caching the HTML snippet via an ESI for 3 minutes periods, it offered a very flexible option. If ever the categories were to change (which happens rarely), that would be the maximum duration needed to refresh it.

And in return, here is the result:

Response time for a transaction, broken down over services
SQL call response time

Start Monitoring your site now! (Requires a Premium or Enterprise subscription)

Christophe Dujarric

Christophe is the Chief Product Officer at Blackfire. He's an engineer, but probably one of the least "tech" people in the company. He's wearing many hats, from product management to marketing and sales. He loves the beauty of simple solutions that solve actual problems.