SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Cache me if you can
                       Make your Website fly with Varnish




Sonntag, 6. Mai 12
Warum Cachen
                     • Moderne Webseiten arbeiten meist mit
                       komplexen CMS Systemen
                     • Jeder Request erzeugt Datenbankabfragen
                     • 80-90 % aller Requests sind nicht
                       individualisiert und damit Cachebar
                     • Gute Performance = bessere Conversion
                     • Google bewertet auch die Geschwindigkeit
Sonntag, 6. Mai 12
Was ist Varnish
                     • Webbeschleuniger für dynamische Seiten
                     • Entwickelt von Poul-Henning Kamp
                     • Reverse Proxy
                     • Loadbalancer
                     • Überlässt Thread und Speicherverwaltung
                       dem Betriebsystem
                     • Schreibt in der Standardkonfiguration kein
                       Logfile
Sonntag, 6. Mai 12
Aufruf einer Webseite
                               Request
                                           CMS
                     Browser              LAMP
                               Response




Sonntag, 6. Mai 12
Aufruf einer Webseite
                                Request
                                           CMS
                     Browser              LAMP
                               Response



                                           CMS
                 Browser       Varnish    LAMP




Sonntag, 6. Mai 12
Aufruf einer Webseite
                                           Request
                                                                 CMS
                     Browser                                    LAMP
                                           Response



                                                                 CMS
                 Browser               Varnish                  LAMP



                                Nginx                            CMS
                 Browser       incl. SSL              Varnish   LAMP


Sonntag, 6. Mai 12
Was tun mit
                     dynamischem Content
                     • ESI (Edge Side Includes)




                     • Content über AJAX nachladen
Sonntag, 6. Mai 12
Was bringt es ?




 Quelle: Fabrizio Branca http://bit.ly/l2HGPc
Sonntag, 6. Mai 12
BSP ca. 10.000 PI / Tag




Sonntag, 6. Mai 12
85% aus dem Cache




Sonntag, 6. Mai 12
Cached Requests < 0,0001s




Sonntag, 6. Mai 12
Probleme / ToDos

                     • Cache Invalidierung
                     • Überwachung / Analyse -> verbesserung
                     • Typo3 -> MOC_VARNISH Extension (ESI)
                     • Magento -> AOE_STATIC
                     • VCL etwas komplex aber gut dokumentiert

Sonntag, 6. Mai 12
Weitere Vorteile

                     • Hohe Skalierung möglich
                     • Load Balancing
                     • Reverse Proxy für mehrere Backends


Sonntag, 6. Mai 12

Weitere ähnliche Inhalte

Andere mochten auch

Doc filtres mach filter
Doc filtres mach filterDoc filtres mach filter
Doc filtres mach filter
youri59490
 
Tabloid rj - 4 pages
Tabloid   rj - 4 pagesTabloid   rj - 4 pages
Tabloid rj - 4 pages
Juanico
 
Gouverance Internet Standardisation Coordination
Gouverance Internet Standardisation CoordinationGouverance Internet Standardisation Coordination
Gouverance Internet Standardisation Coordination
remy3131
 
Spécificités et enjeux d’un projet de mise en œuvre d’un aps
Spécificités et enjeux d’un projet de mise en œuvre d’un apsSpécificités et enjeux d’un projet de mise en œuvre d’un aps
Spécificités et enjeux d’un projet de mise en œuvre d’un aps
CITWELL
 
Acq iut nov06-avr07
Acq iut nov06-avr07Acq iut nov06-avr07
Acq iut nov06-avr07
Wael Ismail
 

Andere mochten auch (16)

Erstein 2008
Erstein 2008Erstein 2008
Erstein 2008
 
Un Peu D Astronomie
Un Peu D AstronomieUn Peu D Astronomie
Un Peu D Astronomie
 
Freiraum by Georg Bednorz
Freiraum by Georg BednorzFreiraum by Georg Bednorz
Freiraum by Georg Bednorz
 
Book
BookBook
Book
 
Mobile Effects 2012-1
Mobile Effects 2012-1 Mobile Effects 2012-1
Mobile Effects 2012-1
 
Doc filtres mach filter
Doc filtres mach filterDoc filtres mach filter
Doc filtres mach filter
 
Tabloid rj - 4 pages
Tabloid   rj - 4 pagesTabloid   rj - 4 pages
Tabloid rj - 4 pages
 
ANIVERSARIS DEL MES DE FEBRER!
ANIVERSARIS DEL MES DE FEBRER!ANIVERSARIS DEL MES DE FEBRER!
ANIVERSARIS DEL MES DE FEBRER!
 
Poe
PoePoe
Poe
 
Gouverance Internet Standardisation Coordination
Gouverance Internet Standardisation CoordinationGouverance Internet Standardisation Coordination
Gouverance Internet Standardisation Coordination
 
OFICI DEL PARE D'EN TARIKU: CONDUCTOR DE CAMIÓ
OFICI DEL PARE D'EN TARIKU: CONDUCTOR DE CAMIÓOFICI DEL PARE D'EN TARIKU: CONDUCTOR DE CAMIÓ
OFICI DEL PARE D'EN TARIKU: CONDUCTOR DE CAMIÓ
 
Lb Tome2
Lb Tome2Lb Tome2
Lb Tome2
 
Starter Kit VSI
Starter Kit VSIStarter Kit VSI
Starter Kit VSI
 
5-Cm24
5-Cm245-Cm24
5-Cm24
 
Spécificités et enjeux d’un projet de mise en œuvre d’un aps
Spécificités et enjeux d’un projet de mise en œuvre d’un apsSpécificités et enjeux d’un projet de mise en œuvre d’un aps
Spécificités et enjeux d’un projet de mise en œuvre d’un aps
 
Acq iut nov06-avr07
Acq iut nov06-avr07Acq iut nov06-avr07
Acq iut nov06-avr07
 

Caching with Varnish

  • 1. Cache me if you can Make your Website fly with Varnish Sonntag, 6. Mai 12
  • 2. Warum Cachen • Moderne Webseiten arbeiten meist mit komplexen CMS Systemen • Jeder Request erzeugt Datenbankabfragen • 80-90 % aller Requests sind nicht individualisiert und damit Cachebar • Gute Performance = bessere Conversion • Google bewertet auch die Geschwindigkeit Sonntag, 6. Mai 12
  • 3. Was ist Varnish • Webbeschleuniger für dynamische Seiten • Entwickelt von Poul-Henning Kamp • Reverse Proxy • Loadbalancer • Überlässt Thread und Speicherverwaltung dem Betriebsystem • Schreibt in der Standardkonfiguration kein Logfile Sonntag, 6. Mai 12
  • 4. Aufruf einer Webseite Request CMS Browser LAMP Response Sonntag, 6. Mai 12
  • 5. Aufruf einer Webseite Request CMS Browser LAMP Response CMS Browser Varnish LAMP Sonntag, 6. Mai 12
  • 6. Aufruf einer Webseite Request CMS Browser LAMP Response CMS Browser Varnish LAMP Nginx CMS Browser incl. SSL Varnish LAMP Sonntag, 6. Mai 12
  • 7. Was tun mit dynamischem Content • ESI (Edge Side Includes) • Content über AJAX nachladen Sonntag, 6. Mai 12
  • 8. Was bringt es ? Quelle: Fabrizio Branca http://bit.ly/l2HGPc Sonntag, 6. Mai 12
  • 9. BSP ca. 10.000 PI / Tag Sonntag, 6. Mai 12
  • 10. 85% aus dem Cache Sonntag, 6. Mai 12
  • 11. Cached Requests < 0,0001s Sonntag, 6. Mai 12
  • 12. Probleme / ToDos • Cache Invalidierung • Überwachung / Analyse -> verbesserung • Typo3 -> MOC_VARNISH Extension (ESI) • Magento -> AOE_STATIC • VCL etwas komplex aber gut dokumentiert Sonntag, 6. Mai 12
  • 13. Weitere Vorteile • Hohe Skalierung möglich • Load Balancing • Reverse Proxy für mehrere Backends Sonntag, 6. Mai 12