Magento: I varnish you

21
ecommerce solutions Sylvain Rayé Meet Magento Germany 2014

description

Improve the performance of your Magento installation thanks to Varnish software. This presentation give you an overview of the knowledge necessary to understand this technology. Presented at Developers Paradise and Meet Magento Germany in 2014

Transcript of Magento: I varnish you

Page 1: Magento: I varnish you

ecommerce solutions

Sylvain RayéMeet Magento Germany 2014

Page 2: Magento: I varnish you

ecommerce solutions

VARNISH?!!!

Page 3: Magento: I varnish you

ecommerce solutions

Servers Architecture

Source: http://edoceo.com/howto/nginx-varnish-ssl

Page 4: Magento: I varnish you

ecommerce solutions

Without Varnish200 requests / 5 concurrent clients Result: ~2 req / sec

Page 5: Magento: I varnish you

ecommerce solutions

With Varnish200 requests / 5 concurrent clients Result: ~1400 req / sec

Page 6: Magento: I varnish you

ecommerce solutions

• The GoodPeak of visitors (Christmas, Sales period, TV show, etc),low or heavy traffic, grace mode, load balancer, health check#

• The Bad SSL, configuration, wrong web server logs, debugging (web app, varnish), FPC deactivated (EE)#

• The UglyUse for static content, hide bad coding practices

Page 7: Magento: I varnish you

ecommerce solutions

Hey idiot !!#Did you mentioned Ivan’s Magento Performance tweaks from eComDev?!#http://bit.ly/1abipgf (Presentation)!http://bit.ly/1d2nDPz (Module)!#Or $product->addAttributeUpdate()!http://bit.ly/1eIK5fb (in german)!#Use OpCode, Redis / Memcached, etc

ecommerce solutions

Page 8: Magento: I varnish you

ecommerce solutions

HTTP Protocol#

Varnish Configuration#

Web Application

Page 9: Magento: I varnish you

ecommerce solutions

HTTP Protocol

Source: Varnish Book

Request Response

Page 10: Magento: I varnish you

ecommerce solutions

HTTP Cache headers• Expires / Cache-Control

• ETAG / Last-Modified

• If-Modified-Since / If-None-Match

• Vary

• Age

Page 11: Magento: I varnish you

ecommerce solutions

Configuration• /etc/default/varnish

#

#

• /etc/varnish/default.vcl

• /usr/bin/varnishadm

ecommerce solutions

Page 12: Magento: I varnish you

ecommerce solutions

VCL & Routines

Source: http://www.fabrizio-branca.de

Page 13: Magento: I varnish you

ecommerce solutions

Christmas time!#Hum, sorry… shopping time!##Your shop is fast now?

ecommerce solutions

Page 14: Magento: I varnish you

ecommerce solutions

Page 15: Magento: I varnish you

ecommerce solutions

Edge Side IncludesHTML generated from server side

Your VCL should have

Page 16: Magento: I varnish you

ecommerce solutions

Magento Extensions

• Nexcess Turpentine

• Phoenix Media PageCache

• Aoe_Static (forked by S. Hoyer)

Dammit!!!

Page 17: Magento: I varnish you

ecommerce solutions

Varnish or

not Varnish? #

That’s the question

Page 18: Magento: I varnish you

ecommerce solutions

Alternatives• Full Page Cache of Bubble Code:

http://bit.ly/1kxRUvc

• Lesti FPC: http://bit.ly/1axNMFb

• Litespeed

• HipHop VM (work in progress)

Page 19: Magento: I varnish you

ecommerce solutions

THANK YOU

ecommerce solutions

I can do shopping much faster now

Page 20: Magento: I varnish you

ecommerce solutions

Links• Varnish Book

https://www.varnish-software.com/book

• Nexcess Turpentine http://bit.ly/1cFAIxe

• Phoenix Media PageCachehttp://bit.ly/19fYzoQ

• Aoe_Static (forked)http://bit.ly/19fYNMO

Page 21: Magento: I varnish you

ecommerce solutions

Copyright - Jeff Dunham

Achmed the dead terrorist http://www.youtube.com/watch?v=R_jU3FdnNoc