martin anderson - fast we promise
DESCRIPTION
TRANSCRIPT
![Page 1: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/1.jpg)
BETFAIR'S SITE REBUILD: FAST - WE PROMISE Martin Anderson LJC Open Conference 2011
![Page 2: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/2.jpg)
2
![Page 3: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/3.jpg)
THE EXCHANGE
3
![Page 4: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/4.jpg)
OUR PRODUCTS
4
![Page 5: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/5.jpg)
3.7M+ registered customers
140 locations
17 languages
£300M funds on deposit
30,000 bets placed one minute
88,000 http requests per second
INTERESTING STATS
5
![Page 6: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/6.jpg)
WHAT’S THE PROBLEM?
“during the world cup the site has run like treacle”
“the site is frequently slow and freezes too often”
“very slow and glitchy”
“I find Betfair slow”
We lost focus on our website
6
![Page 7: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/7.jpg)
http://bit.ly/bf-cc OUR CUSTOMER COMMITMENT
7
![Page 8: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/8.jpg)
PERFORMANCE – 95 PECENTILE
8
![Page 9: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/9.jpg)
OPTIONS?
• Fix • Rebuild
• We chose to rebuild with a new architecture
• Started earlier this year
9
![Page 10: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/10.jpg)
It Works
It’s Fast
It’s Useful
It’s Cool
HIERARCHY OF WEBSITE NEEDS
10
![Page 11: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/11.jpg)
FIVE FUNDAMENTALS OF A WORLD CLASS WEB SITE
• Operational Monitoring • Performance • Customer Analytics • SEO • Experimentation Framework
11
![Page 12: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/12.jpg)
DOT COM ERA ARCHITECTURE
Single component responsible for data
access, business logic and presentation
12
![Page 13: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/13.jpg)
CURRENT ARCHITECTURE
Data Services
Lightweight web servers for cached
HTML and JS
Heavy use of client-side rendering with
JavaScript
13
![Page 14: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/14.jpg)
NEXT GENERATION ARCHITECTURE
Data Services
Server-side rendering using Java
No client-side rendering only updates
via JavaScript
14
![Page 15: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/15.jpg)
TECHNOLOGY STACK
• Java, JavaScript (YUI), FreeMarker, Spring 3.0, Tomcat 7
• TestNG, Mockito, Groovy, Selenium2, Jasmine, PhantomJS
15
![Page 16: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/16.jpg)
WHY CHOOSE JAVA?
• Good knowledge already at Betfair • Real concurrency – great for heavy server
workload • Large Community • Great Toolset • Operations Teams understand Java – stats,
GC logs, deployment process
16
![Page 17: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/17.jpg)
JAVA IN THE WEB TIER
• Java is obviously great at server tasks but does it work well in the web tier?
• Can it be as flexible as Ruby or Python?
17
![Page 18: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/18.jpg)
MODULE CONFIGURATION FRAMEWORK
• Deals with the impendence mismatch between the web and statically typed languages
• Hugely flexible • Easy to work with heterogeneous skillsets
18
![Page 19: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/19.jpg)
MODULE CONFIGURATION FRAMEWORK
• All pages are an aggregation of modules in a layout
• Modules are the smallest measure of functionality on a page
• Modules can live within other modules • Configuration controls the service calls and
the rendered modules
19
![Page 20: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/20.jpg)
MODULE CONFIGURATION FRAMEWORK
20
![Page 21: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/21.jpg)
CONCURRENCY MODEL
dispatch service calls
controller’s job done
rendering starts early
21
![Page 22: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/22.jpg)
PERFORMANCE OPTIMIZATIONS
• Reduce HTTP requests • Minify and compress assets (WRO4J) • Split requests across domains • Use cookie-free CDN hostnames • Flush the buffer early • Defer loading of content • Etc…
22
![Page 23: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/23.jpg)
CUSTOMER ANALYTICS
• Omniture Tagging • Server side clickstream
• Able to generate heatmaps of site usage
23
![Page 24: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/24.jpg)
SEARCH ENGINE OPTIMISATION
• Single HTML response • “Pretty” URLs • Tasty bot fodder • No redirects • No duplications • Crafted content
24
![Page 25: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/25.jpg)
EXPERIMENTATION FRAMEWORK
• An extension of the MCF • Allows A/B or Multivariate testing • Allows business to make decisions based on empirical data
• Winning experiments can be rolled out without a redeployment
25
![Page 26: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/26.jpg)
CONTINUOUS DELIVERY
• Its not about changing the product daily • Its about confidence in the quality of your
product • Its about eliminating waste from your
development cycle
26
![Page 27: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/27.jpg)
CHALLENGES
• Automation is key • Branch in code • Feature Toggles • Technology only takes you so far; it’s a
cultural shift • “Developers aren’t done until the tests
pass”
27
![Page 28: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/28.jpg)
28
![Page 29: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/29.jpg)
OPERATIONAL MONITORING
• Analytics • Trending • Fault-detection / alerting • Capacity planning
29
![Page 30: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/30.jpg)
PERFORMANCE MEASUREMENT
30
![Page 31: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/31.jpg)
LOG MINING
Access logs: User agents, response times, payload sizes Performance logs: Timings of code paths and dependent service calls Correlation IDs to trace requests across tiers
31
![Page 32: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/32.jpg)
GRAPHS
32
![Page 33: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/33.jpg)
SERVER-SIDE WATERFALL GRAPH
33
![Page 34: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/34.jpg)
FLUSHING THE BUFFER
Networking device thwarting flush() code Magic setting: httpcompressonpush=1
34
![Page 35: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/35.jpg)
RESULT
35
![Page 36: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/36.jpg)
SO WHAT CHANGED?
36
![Page 37: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/37.jpg)
FEEDBACK
Customer: “Faster”
Customer: “Seems faster and more user friendly”
Customer: “page loaded quicker”
Ops Guy: “Our current down time is zero!”
37
![Page 38: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/38.jpg)
RESULTS
• Sessions that bet: up 2 percentage points
• Bounce rate: improved 40% • Page views: 2x • 1% opt-out rate
38
![Page 39: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/39.jpg)
WHAT HAVE WE LEARNED?
• Performance improvements are tangible • Measurably improves the bottom line • Operational Monitoring and Customer
Analytics provides essential visibility • There’s lots more to do but we now have the
platform to do this
39
![Page 40: Martin Anderson - Fast We Promise](https://reader034.vdocuments.us/reader034/viewer/2022051610/549283e7b479597e6a8b5937/html5/thumbnails/40.jpg)
THANK YOU
Email: [email protected] Twitter: @mdjanderson Blog: http://bloodredsun.com/ Betfair Blog: http://views.betfair.com/
40