scaling woocommerce - wordcamp mumbai 2016
Post on 15-Apr-2017
2.889 Views
Preview:
TRANSCRIPT
WooCommerce @ NGINX level
- Output depends on customers
- Same URL, different output
- /cart/
- /checkout/
- /my-account/
- /* (user specific element in header,
sidebar)
- If your theme has user-specific elements in
header/footer/sidebar, ajaxify them
- If you cannot ajaxify, use “Window Shopping
Technique”
NGINX - Cache Product Pages
1. Start with entire site cached
2. Monitor woocommerce cookie for cart items
3. As soon as a visitor adds something to cart,
start bypassing cache for them only.
http://rt.cx/wcwst
Window Shopping Technique
- Faster site for folks who are “Just Looking”
- Can handle more traffic, specially spikes!
But... What about folks who are actually buying?
NGINX Tier Summary
Easy Part
1. WordPress Object Cache FTW!
a. https://wordpress.org/plugins/redis-cache/
b. Object cache also speed-up Transients API
c. ee site create/update example.com --wpredis
2. PHP7
a. ee site create/update example.com --php7
Tough Part
1. Architecture
a. AJAX
b. AngularJS/React
2. Code Quality
a. Fast and readable (in order)
b. Debug - Like A Hero
1. SSD. Always. Period. One more Period.
2. RAM > mysql database size
3. CPU cores (enough of them)
Hardware
Software
1. Slow Query (ee debug --mysql)
2. ElasticSearch - elasticpress-woocommerce
3. WordPress Object Cache Again
4. MySQLTuner
WooCommerce 3.0
https://github.
com/woothemes/woocommerce/issues/10071
Get Involved!
top related