Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Varnish

666 views

Published on

Jerzy Biernacki - HTTP Cache to nie wieczór pensjonarki...

… żeby do czegoś dojść, trzeba PROJEKTOWAĆ! Varnish jest jednym z najpopularniejszych HTTP Cache dostępnych na rynku. Jego konfiguracja nie jest jednak trywialna, lecz wymaga przygotowań nawet na etapie tworzenia aplikacji. Podczas wykładu omówimy sobie podstawy Varnisha, przykładowe zastosowania, a także efekty działania tego narzędzia.

Published in: Technology
  • Be the first to comment

Varnish

  1. 1. VARNISH JERZY BIERNACKI
  2. 2. VARNISH THE PLAN ▸ Intro ▸ Basic example ▸ Wordpress example ▸ Tips and tricks ▸ Things I should talk about but had no time or will to do so ;)
  3. 3. VARNISH / INTRO VARNISH? THEFUCKISTHIS?
  4. 4. VARNISH / INTRO VARNISH? THEFUCKISTHIS? ▸ CACHE ▸ REVERSE PROXY ▸ HTTP SERVER ▸ JACK OF ALL MANY TRADES (MODULES)
  5. 5. VARNISH / INTRO I DON’T USE VARNISH BECAUSE:
  6. 6. VARNISH / INTRO I DON’T USE VARNISH BECAUSE: ▸ IT SUCKS ▸ IT’S DIFFICULT TO USE ▸ I ALREADY USE X ▸ I DON’T NEED NO CACHE ▸ I NEED SSL / HTTP2 / SPDY / WebSockets ▸ IT SUCKS
  7. 7. VARNISH / INTRO THE STACK NGINX PHP MYSQL INTERNET
  8. 8. VARNISH / INTRO THE STACK NGINX PHP MYSQL INTERNET APP WWW
  9. 9. VARNISH / INTRO THE STACK WWW APP INTERNET
  10. 10. VARNISH / INTRO THE STACK VARNISH WWW APP INTERNET
  11. 11. VARNISH / INTRO THE STACK VARNISH WWW APP INTERNET BACKEND CACHE
  12. 12. VARNISH / INTRO THE STACK CACHE BACKEND INTERNET
  13. 13. VARNISH / EXAMPLE DIRTY POODLE ▸ FULL PAGE CACHE ▸ ESI ▸ GET vs POST ▸ COOKIES!!!
  14. 14. VARNISH 4 FIN
  15. 15. VARNISH 4 FIN? ▸ HTTP POST + ESI ▸ Cookies
  16. 16. VARNISH / EXAMPLE DIRTY POODLE WP ▸ VHOSTS ▸ FULL PAGE CACHE ▸ BACKEND / DASHBOARD ▸ ESI ▸ GET vs POST ▸ COOKIES!!!
  17. 17. VARNISH 4 FIN
  18. 18. VARNISH 4 FIN? ▸ ESI “MULTIPLIES” BACKEND REQUESTS ▸ ESI REQUIRES US TO REWRITE PARTS OF THE APP ▸ “ESI WIDGETS” INFLUANCE OUR VCL HEAVILY ▸ There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton ▸ BACKEND TIMEOUTS / GURU MEDITATIONS
  19. 19. VARNISH / SUMMARY THE OLD STACK VARNISH WWW APP INTERNET BACKEND CACHE
  20. 20. VARNISH / SUMMARY THE NEW STACK VARNISH WWW APP INTERNET APP
  21. 21. VARNISH 4 FIN
  22. 22. VARNISH 4 FIN?
  23. 23. VARNISH 4 THINGS I SHOULD TALK ABOUT BUT HAD NO TIME OR WILL TO DO SO ;) ▸ VARNISH MODULES (round robin etc.) ▸ NGINX FastCGI Cache (some say it’s faster then Varnish) ▸ SSI (built in ESI-like thing) ▸ Varnish + SSL Termination (nginx, haproxy) ▸ HTTP/2, SPDY ▸ Google PageSpeed mod ▸ Many, many, many more…
  24. 24. VARNISH 4 FIN
  25. 25. VARNISH 4 FIN?
  26. 26. VARNISH 4 TIPS AND TRICKS ▸ CACHE EVERYTHING FOR 1s ▸ NGINX FastCGI Cache (some say it’s faster then Varnish) ▸ SSI (built in ESI-like thing) ▸ Expires-At ▸ Cache-Control ▸ ETag
  27. 27. VARNISH 4 FIN
  28. 28. VARNISH 4 FIN, SERIOUSLY
  29. 29. VARNISH 4 FIN, SERIOUSLY ▸ http://varnish-cache.org/ ▸ https://varnish-cache.org/vmods/ ▸ https://blog.bigdinosaur.org/ ▸ https://www.digitalocean.com/community/tutorials/

×