SUMMARY :
We all have the contradictory feeling to deliver not-so-bad projects, with no-so-bad performances.
But what really is an perfectly optimized project ?
For you : optimized PHP code & SQL queries
For your boss : the customer who never complains
For the customer : own experience on his workstation
For the business : who really know and care ?
For end-user : who can really know the end-user experience (could be millions of users) ?
Without losing interest on technical aspects (PHP, MySql, Solr, Varnish, CDN, etc.) & softwares (new relic, jmeter, etc.), this presentation will send a feedback from real projects to :
How to integrate performances within the project scope ?
What & how to measure & collect smart metrics ?
Enlarge the scope : from your dev workstation to the end-user… in china !
Experience level: Intermediate
Session Track: Performance
2. HOSTING SERVICES CODE
XHTML
CRON3-PARTS
CSS
JavaScript
AJAX calls
DNS
Medias
OS
I/O perf
CPU
RAM
Network
Sizing
Backup
...
Back-end Front-end
DEVELOPER
SYS. ADMIN
FRONT-END
END-USER
CUSTOMER
DIGITAL
MARKETING
?
No 404 or 500 ?
Not so bad ?
Responsive ?
SEO ?
Elegant ?
Fast ? Slow ?
No alerts ?
Doesn’t burn ?
something to
care ?
Real life performance : concerns ?
NFS
SMTP
APIs Drupal tasks
Sys. tasks
DELIVERY
3. HOSTING SERVICES CODE
XHTML
CSS
JavaScript
AJAX calls
Medias
OS
I/O perf
CPU
RAM
Network
Sizing
Backup
...
APIs Drupal tasks
Sys. tasks
Back-end Front-end
Real life performance : common issues ?
DNS
CRON3-PARTS
NFS
SMTP
DELIVERY
Ok, you
mean
devOps...
Ok, you
mean
devOps...
4. devOps culture ?
SERVICES
Services config & finetune :
Who is supposed to setup Varnish ?
Is there some finetuning for memcached ?
Where can i read the services configs ?
5. Metrics :
Which metrics to collect ?
My customer ask for some metrics !?
Is possible to collect slow pages / SQL / Solr ?
devOps
culture ?
6. Metrics :
Which metrics to collect ?
My customer ask for some metrics !?
Is possible to collect slow pages / SQL / Solr ?
devOps
culture ?
7. Metrics :
Which metrics to collect ?
My customer ask for some metrics !?
Is possible to collect slow pages / SQL / Solr ?
devOps
culture ?
8. Metrics :
Which metrics to collect ?
My customer ask for some metrics !?
Is possible to collect slow pages / SQL / Solr ?
… Apache, nginx, elasticsearch, solr, haproxy, memcached, redis, APC, mongoDB, postgre...
devOps
culture ?
9. Metrics :
Which metrics to collect ?
My customer ask for some metrics !?
Is possible to collect slow pages / SQL / Solr ?
devOps
culture ?
10. Load test :
Which user stories to use ?
How to link the load & code impact ?
devOps
culture ?
14. modern application ?
HEADER
FOOTER
breadcrumb
User profilingContent listContent list
ANONYMOUS
ANONYMOUS
ANONYMOUS
USER GROUP USER
HTTP Cache
ESI Processing
http://foshttpcachebundle.readthedocs.org/en/latest/
15. HOSTING SERVICES CODE
XHTML
CSS
JavaScript
AJAX calls
Medias
OS
I/O perf
CPU
RAM
Network
Sizing
Backup
...
APIs Drupal tasks
Sys. tasks
Back-end Front-end
Real life performance : common issues ?
DNS
CRON3-PARTS
NFS
SMTP
DELIVERY
Why so
big ?
18. front-end
Optim.
Real life performance : RUM (Real User Monitoring)
W3C //
Navigation
timing API
https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
25. Tricky use-case
~50% of taric come from backlinks
(newsletter, socials, apps...)
What about RUM ?
Do i have to care about DNS lookup ?
Do i have to care about browser ?
Do i have to care about domReady ?
Newsletter
backlink
website
Article
CN/Asia
HTTP 302
CN/Irland
HTTP 302
CN/Irland
HTTPS 302
SSL
CNCN
Need SSL SSL
Smooth
login
?
Tracking
26. Tricky use-case
~50% of taric come from backlinks
(newsletter, socials, apps...)
What about RUM ?
RUM can not track HTTP redirections
RUM does not work with IE8
Newsletter
backlink
website
Article
CN/Asia
HTTP 302
CN/Irland
HTTP 302
CN/Irland
HTTPS 302
SSL
CNCN
Need SSL SSL
Smooth
login
?
Tracking
27. Tricky use-case
~50% of taric come from backlinks
(newsletter, socials, apps...)
Do i have to care about DNS lookup ?
YES ! Especially with china / india, etc.
Think about DNS-Prefetch
Newsletter
backlink
website
Article
CN/Asia
HTTP 302
CN/Irland
HTTP 302
CN/Irland
HTTPS 302
SSL
CNCN
Need SSL SSL
Smooth
login
?
Tracking
<link rel="dns-prefetch" href="http://www.mydomain.com/">
28. Tricky use-case
~50% of taric come from backlinks
(newsletter, socials, apps...)
Do i have to care about browser ?
Do i have to care about domReady ?
YES ! IE8 is still the 1st browser in china
IE8 does not support ASYNC JavaScript (domready killer)
IE8 Selectivizr is a perf killer (avoid)
Do you know 360 Browser & WeChat apps ?
Newsletter
backlink
website
Article
CN/Asia
HTTP 302
CN/Irland
HTTP 302
CN/Irland
HTTPS 302
SSL
CNCN
Need SSL SSL
Smooth
login
?
Tracking
33. HOSTING SERVICES CODE
XHTML
CRON3-PARTS
CSS
JavaScript
AJAX calls
DNS
Medias
OS
I/O perf
CPU
RAM
Network
Sizing
Backup
...
Back-end Front-end
YOU
YOU
YOU
YOU
YOU
YOU
YOU
YOU
No 404 or 500 ?
Not so bad ?
Responsive ?
SEO ?
Elegant ?
Fast ? Slow ?
No alerts ?
Doesn’t burn ?
something to
care ?
Advices / approach ?
NFS
SMTP
APIs Drupal tasks
Sys. tasks
DELIVERY
Is “perf master” a new job ?
Rebirth of “fullstack developer ?”