php in the enterpriseblog.preinheimer.com/talks/php in the enterprise... · gomez vs other frontend...
TRANSCRIPT
![Page 1: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/1.jpg)
PHP in the EnterpriseStories from the Front LinePaul Reinheimer
Wednesday, March 10, 2010
![Page 2: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/2.jpg)
Paul Reinheimer @[email protected]
http://preinheimer.comhttp://wonderproxy.com
Wednesday, March 10, 2010
![Page 3: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/3.jpg)
Mansef Group
Wednesday, March 10, 2010
![Page 4: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/4.jpg)
"Enterprise" Stats
70 Million Uniques/Day
Four Major Properties from "tube" sites to dating
Wednesday, March 10, 2010
![Page 5: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/5.jpg)
Topics
Memcached
Sphinx
GeoIP
Gomez vs Other
Frontend Performance
HipHop
MySQL
Circonus
Mobile Content Protection
Wednesday, March 10, 2010
![Page 6: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/6.jpg)
Using PHP
Wednesday, March 10, 2010
![Page 7: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/7.jpg)
Wednesday, March 10, 2010
![Page 8: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/8.jpg)
Wednesday, March 10, 2010
![Page 9: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/9.jpg)
Memcached
Data Federation
Slabs, stores, promises
Serializer
Wednesday, March 10, 2010
![Page 10: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/10.jpg)
Promises
Wednesday, March 10, 2010
![Page 11: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/11.jpg)
Promises
memcached doesn't lie, it just doesn't make promises
Wednesday, March 10, 2010
![Page 12: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/12.jpg)
Promises
it makes a promise
Wednesday, March 10, 2010
![Page 13: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/13.jpg)
Promises
data will no longer be available after it expires
Wednesday, March 10, 2010
![Page 14: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/14.jpg)
Promises
When memcached doesn't have the information you need, get it elsewhere.
Use a read-through caching callback or put it in your caching object.
memcached is allowed to lose data!
Wednesday, March 10, 2010
![Page 15: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/15.jpg)
Wednesday, March 10, 2010
![Page 16: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/16.jpg)
Wednesday, March 10, 2010
![Page 17: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/17.jpg)
48
60
75
96
120
150
187
234
292
366
460
0 25 50 75 100
Wednesday, March 10, 2010
![Page 18: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/18.jpg)
48
60
75
96
120
150
187
234
292
366
460
0 25 50 75 100
Wednesday, March 10, 2010
![Page 19: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/19.jpg)
Sphinx
There's another talk, it's good
Wednesday, March 10, 2010
![Page 20: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/20.jpg)
GeoIP
Big Deal for us
Price selection
Billing Cascades
Internal and External systems
QA Nightmare
Wednesday, March 10, 2010
![Page 21: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/21.jpg)
Challenge
Aid appropriate teams to make dealing with GeoIP as trivial as possible without
affecting workflow
Wednesday, March 10, 2010
![Page 22: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/22.jpg)
Problem - Proxies Suck
Slow
Buy Now
Wednesday, March 10, 2010
![Page 23: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/23.jpg)
Problem - Web Proxies Suck
Wednesday, March 10, 2010
![Page 24: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/24.jpg)
Solution
Find a real Proxy Service
Wednesday, March 10, 2010
![Page 25: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/25.jpg)
Solution
Create a real Proxy Service
Wednesday, March 10, 2010
![Page 26: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/26.jpg)
Gomez vs Other?
Download performance from clients
Use google for real client data
Find bottlenecks
Wednesday, March 10, 2010
![Page 27: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/27.jpg)
Methodology
Generate an exact 10KB file
Place it on all PH web servers
Place it on the CDN
Place it on all media servers (NY and NL)
Write a test script to runs on 0.1% of requests
Report the time it takes to load that image (in ms) from each server
Wednesday, March 10, 2010
![Page 28: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/28.jpg)
Redacted
Wednesday, March 10, 2010
![Page 29: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/29.jpg)
Wednesday, March 10, 2010
![Page 30: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/30.jpg)
Wednesday, March 10, 2010
![Page 31: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/31.jpg)
Frontend Performance
YSlow
Website Optimizer
CSS Sprites
Request Minimization & Compression
Wednesday, March 10, 2010
![Page 32: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/32.jpg)
Mandate
Increase sales
Decreasing page load time
Don't interfere with current work flow
Leave infrastructure behind for trivial future use
Wednesday, March 10, 2010
![Page 33: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/33.jpg)
Read
Wednesday, March 10, 2010
![Page 34: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/34.jpg)
Read Moar
Wednesday, March 10, 2010
![Page 35: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/35.jpg)
Stats
Wednesday, March 10, 2010
![Page 36: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/36.jpg)
Stats
Wednesday, March 10, 2010
![Page 37: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/37.jpg)
Stats
47 48 49 50 51 52 1
Normal Optimized
10-20% Increase in Sales
40% Decrease in Bounce Rate
Wednesday, March 10, 2010
![Page 38: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/38.jpg)
Wednesday, March 10, 2010
![Page 39: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/39.jpg)
HipHop for PHP
Twice as fast
Not yet using it in production
Wednesday, March 10, 2010
![Page 40: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/40.jpg)
MySQL
Wednesday, March 10, 2010
![Page 41: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/41.jpg)
Data Federation
Wednesday, March 10, 2010
![Page 42: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/42.jpg)
Data Federation - Functional Partitions
Users Website
Content
Wednesday, March 10, 2010
![Page 43: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/43.jpg)
Data Federation - Functional Partitions
Users Website
Content
Wednesday, March 10, 2010
![Page 44: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/44.jpg)
Circonus
Systems Monitoring Demo
Wednesday, March 10, 2010
![Page 45: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/45.jpg)
Mobile Content Protection
Wednesday, March 10, 2010
![Page 46: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/46.jpg)
Challenge
$key = magicSauce($ip);
Wednesday, March 10, 2010
![Page 47: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/47.jpg)
Problem
Wednesday, March 10, 2010
![Page 48: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/48.jpg)
Problem
Wednesday, March 10, 2010
![Page 49: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/49.jpg)
Problem
Wednesday, March 10, 2010
![Page 50: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/50.jpg)
Problem
Wednesday, March 10, 2010
![Page 51: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/51.jpg)
Problem
Wednesday, March 10, 2010
![Page 52: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/52.jpg)
Solution
$session['ip'] = $_SERVER['REMOTE_ADDR'];
Wednesday, March 10, 2010
![Page 53: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/53.jpg)
if($SERVER['REMOTE_ADDR']) != $session['ip']){ $key = magicSauce(FALSE);}else{
$session['ip'] = $_SERVER['REMOTE_ADDR'];
}
Wednesday, March 10, 2010
![Page 54: PHP in the Enterpriseblog.preinheimer.com/talks/PHP in the Enterprise... · Gomez vs Other Frontend Performance HipHop MySQL Circonus Mobile Content Protection Wednesday, March 10,](https://reader034.vdocuments.net/reader034/viewer/2022051512/603cf313b00d8a4d7d2ad985/html5/thumbnails/54.jpg)
Thank You
We're Hiring!
Intermediate & Senior front end integrators
Intermediate & Senior back end (PHP) developers
Wednesday, March 10, 2010