Jorge Luis Betancourt
Success of Blackfire and
Continuous PHP
performance monitoring at
@jorgelbgm1
@jorgelbgm
Who am I
Software Engineer / Performance Team
Apache Nutch Committer & PMC
Member of @TheASF
Passionate about Search (Solr/ES),
metrics and performance
55 PLATTFORMS
1TB LOGS
/DAY~200ms
RESPONSE
TIME
@jorgelbgmSource: Google Trends
@jorgelbgmSource: Google Trends
• PHP & Symfony application
• Some services in other
languages (Java)
• HTML/CSS/JS
200 commits
per day +100 active
A/B tests
Performance Team
Observability
@jorgelbgm
Providing feedback to the developers as
soon as possible about the impact of
their changes on the performance of the
application.
Make trivago faster and spread the
culture of performance.
Mission
Our team provides support for …
• We’re not a performance company
• But … performance is important for
our business
@jorgelbgm
Blackfire
• Performance
Management Solution
• Easy to install and use
• Provides an easy to use
UI
@jorgelbgm
• Assertions & Tests
• Scenarios
Scenarios
Tests
Assertions
… over the collected metrics
and dimensions
Features
A bit of history
@jorgelbgm
Low hanging fruits …
https://www.slideshare.net/XoanVilas/how-synthetic-monitoring-helps-optimize-web-performance
@jorgelbgm
Before Blackfire
Current setup
@jorgelbgm
PHP extension that collects resource consumption metrics
& keeps track of the call graph (only when the profiling is
enabled).
Agent to manage communication with the Blackfire
servers.
Configuration management
@jorgelbgm
• Total independence between
environments
• Allow for changes in credentials/
agent config without restarting the
web servers
• Keeps configurations on the web
server to a minimum
@jorgelbgm
Every server on the
company can have
Blackfire provisioned in a
few minutes
Blackfire
In our Workflow
@jorgelbgm
Bitbucket Integrations
• Bitbucket Server
• Jenkins
• InfluxDB
• PR based workflow
No official integration
No official integration
Webhook integration
!
"
!
! No official integration
@jorgelbgm
Final workflow
@jorgelbgm
Developers point of view
• Build status of the merge commit
• Comment on the Pull Request
@jorgelbgm
• Notification in Slack
• Send the metrics to InfluxDB
More feedback
@jorgelbgm
Trigger a build if …
Trigger a build when the response
time goes above a threshold
Let’s see some examples
@jorgelbgm
Some examples
Something happened #
@jorgelbgm
Call Graph/
Memory
Timeline
@jorgelbgm
Caching the SEO module
The contents of the SEO Module doesn't change often so we
should cache the Twig output in memcached.
This saves the Twig translation calls, etc.
@jorgelbgm
Caching the SEO module (after we deployed)
@jorgelbgm
Conclusions
@jorgelbgm
• Detect performance bottlenecks before they’re deployed to
production.
• Enforce a backend performance budget to stop performance
degradation over time.
• Offer a common platform for PHP developers to discuss
performance related issues.
• Provides an easy syntax for writing/understanding the tests.
Conclusions
@jorgelbgm
@jorgelbgm
Analyse ImproveMeasure
@jorgelbgm
Do you want to know more?
• https://tech.trivago.com/2017/10/27/continuous-performance-
monitoring-for-php---the-tale-of-blackfire-at-trivago/
• https://tech.trivago.com/2018/10/12/building-fast-and-reliable-web-
applications/
@jorgelbgm
Thanks!

Success of Blackfire and Continuos PHP performance monitoring at trivago