Making Symfony.com 3 times faster thanks to Blackfire Monitoring
Discover the power of the Blackfire Monitoring feature: Services Monitoring.
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!
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.
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:
Start Monitoring your site now! (Requires a Premium or Enterprise subscription)