Making Symfony.com 3 times faster thanks to Blackfire Monitoring
Get a sneak peek into the upcoming Blackfire Monitoring feature: Services Monitoring.
We are currently beta-testing a new, really exciting feature in Blackfire. It 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:
We’re now fine-tuning this feature and should release it very soon to all of our Blackfire Monitoring users.
Start Monitoring your site now! (Requires a Premium or Enterprise subscription)