4. System Architecture
Web Server (App)
Web Server (App)
Load Balancer
Load Balancer
Product
DB
Reviews
DB
Web Server (App)
Web Server (App)
SOLR FT Search
Web Server (Static)
Web Server (Static)
Product
Images
8. New System Architecture
Product
DB
Web Server (App)
Web Server (App)
Load Balancer
Web Server (App)
Load Balancer
Web Server (App)
Varnish
Varnish
Memcache
Memcache
Memcache
Reviews
DB
SOLR FT Search
Web Server (Static)
Web Server (Static)
Product
Images
9.
10.
11.
12. Testing Plan
● 14 Locations
● 3 “Representative” Pages
○
○
○
Landing Page
Search Results Page
Product Listing Page
● 1 Browser
● First View Only
● Every 5 Minutes (12 samples per hour)
34. Testing Plan
● 14 Locations
● 3 “Representative” Pages
○
○
○
Landing Page
Search Results Page
Product Listing Page
● 1 Browser
● First View Only
● Every 5 Minutes (12 samples per hour)
35. Go buy an SSD
@crucially
http://www.youtube.com/watch?v=H7PJ1oeEyGg
36. New New System Architecture
Product
DB (SSD)
Web Server (App)
Web Server (App)
Load Balancer
Web Server (App)
Load Balancer
Web Server (App)
Varnish
(SSD)
Web Server (Static)
Memcache
Reviews
DB (SSD)
SOLR FT Search
(SSD)
Web Server (Static)
Varnish
(SSD)
Memcache
Memcache
Product
Images
(SSD)
43. Testing Plan
Images always in edge cache
● 14 Locations
● 3 “Representative” Pages
○
○
○
Landing Page
Search Results Page
Product Listing Page
● 1 Browser
● First View Only
● Every 5 Minutes (12 samples per hour)
44. New Experience Testing Plan
● 14 Last-Mile Locations
● 3 “Representative” Pages
○
○
○
Landing Page
Random Search Results Page
Random Product Listing Page
● 2 Browsers
○ Desktop
○ Mobile (actual device)
● First View Only
● 20 Samples per day
45.
46. Measured Load Times still too slow
●
●
●
●
Social Sharing Widgets
Ads
Retargeting pixels
Analytics
All already Async and using best practices
47.
48. Ummm….
● Large drop in revenue
● Loss of tracking
● Doesn’t “feel” significantly faster
49. Speed Index FTW
● Measures visual experience
● Synthetic Only (WebPagetest)
51. Speed Index FTW
● Measures visual experience
● Synthetic Only (WebPagetest)
52. We got this...it’s only code
onload=”performance.mark(‘aft.Image Loaded’)”...
window.onload:
● performance.getEntriesByType(“mark”)
● Report latest aft.* as custom time
http://blog.patrickmeenan.com/2013/07/measuring-performance-of-user-experience.html
53. Roll-your-own
● Send http beacon to beacon server
○ All timings as query params
○ 204 or transparent 1px gif
○ Log requests to access log
● IP, User Agent and Timings all in each
record
● access log -> logster -> statsd -> graphite
● Profit!
58. Where does that leave us?
● Competitive testing with synthetic last-mile
○
After builds pushed to staging/prod
● Performance tracking with RUM custom measurements
○
○
Data can be noisy
No competitive capability (opportunity)
59. Where does that leave us?
● Competitive testing with synthetic last-mile
○
After builds pushed to staging/prod
● Performance tracking with RUM custom measurements
○
○
Data can be noisy
No competitive capability (opportunity)
60. Synthetic testing in CI
● PhantomJS + CI
● WebPagetest Private Instance + CI
○
https://github.com/marcelduran/webpagetest-api
● Graphing/Trending artifacts
○
○
○
○
httparchive
graphite
Show Slow
tsviewdb