O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Fabrizio Balliano: Tracking visitors despite Varnish

460 visualizações

Publicada em

  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Fabrizio Balliano: Tracking visitors despite Varnish

  1. 1. Fabrizio Balliano Tracking visitors despite Varnish MMeeeett MMaaggeennttoo PPoollaanndd 22001144
  2. 2. Meet Magento Poland 2014 Who am I Fabrizio Balliano PHP since 1999 Magento since 2007 MCD MCD+ MCFD MCSS magento.com/it admin Full time Magento since 2011 CTO of Sevenlike Srl @fballiano
  3. 3. What is Varnish Web application accelerator HTTP reverse proxy Cache server Maybe full RAM solution Tremendous speed gain Saves CPUs Saves network traffic Meet Magento Poland 2014
  4. 4. What is Varnish for Magento Full Page Cache Pre rendered HTML pages Static assets JS/CSS Images Meet Magento Poland 2014
  5. 5. A sample infrastructure Meet Magento Poland 2014
  6. 6. Visitor path – page not in cache Meet Magento Poland 2014
  7. 7. Visitor path – page in cache Meet Magento Poland 2014
  8. 8. The problem is... The web servers never know about a visit to a cached page Meet Magento Poland 2014
  9. 9. Most modern tracking softwares (actually services) are javascript based anyone said Google Analytics? Meet Magento Poland 2014
  10. 10. What about tracking visitors inside Magento? Customize browsing experience based on visitor's behavior Meet Magento Poland 2014
  11. 11. An example Meet Magento Poland 2014
  12. 12. But... if the frontend server are not getting the request... Simple, this feature and any other tracking will not work. Meet Magento Poland 2014
  13. 13. But... notice anything here? Meet Magento Poland 2014
  14. 14. Dynamic blocks! Meet Magento Poland 2014
  15. 15. Dynamic blocks Meet Magento Poland 2014 ESI: Edge Side Includes Not visible to client Before page load Can be cached – whole site/one page – each user/all NO COOKIES! Little data transported AJAX Visible to client After page load Can NOT be cached COOKIES! A lot of data
  16. 16. Configuration reference Meet Magento Poland 2014
  17. 17. Let's add a new dynamic block! Meet Magento Poland 2014 Hey, wait! Every call to the frontend servers matters!
  18. 18. Can we reach our goal without adding a new ESI/AJAX dynamic block? Meet Magento Poland 2014
  19. 19. Flash messages! Meet Magento Poland 2014
  20. 20. Flash messages: let's extend them Meet Magento Poland 2014
  21. 21. Flash messages: let's extend them class Fballiano_TurpentineRecentlyViewed_Block_Messages extends Nexcessnet_Turpentine_Block_Core_Messages { public function _prepareLayout() { Meet Magento Poland 2014 // code to do whatever we want return parent::_prepareLayout(); } }
  22. 22. Meet Magento Poland 2014 Dziękuję! http://fabrizioballiano.it http://twitter.com/fballiano http://linkedin.com/in/fabrizioballiano http://www.sevenlike.com

×