$30 off During Our Annual Pro Sale. View Details »

Http Cache - Muss es immer gleich Varnish sein?

Http Cache - Muss es immer gleich Varnish sein?

Kurzvortrag zu Alternativen zu Varnish, gehalten an der Symfony User Group Basel.

Yanick Witschi

February 21, 2019
Tweet

More Decks by Yanick Witschi

Other Decks in Technology

Transcript

  1. terminal42 web development gmbh
    Muss es immer gleich Varnish sein?
    HTTP Caching
    7. PHP Symfony User Group Basel

    View Slide

  2. terminal42 web development gmbh
    Geschichte
    • Schweizer Newsportal
    • Mittelmässiger Traffic, Tendenz steigend
    • Cache für alle Besucher identisch
    • Möchten so lange cachen wie möglich, bis der
    Artikel verändert wird

    View Slide

  3. terminal42 web development gmbh
    Browser
    Server
    Private
    Cache
    Browser
    Private
    Cache
    Proxy
    Shared Cache

    Public Cache
    Reverse Proxy Cache

    View Slide

  4. terminal42 web development gmbh
    Die 3 Caching-Ansätze
    1. Cache Expiration
    Expires: 

    Cache-Control:
    2. Cache Validation


    Last-Modified: 

    If-Modified-Since: 


    ETag: 

    If-None-Match:
    3. Cache Invalidation (nur für Public Caches/Proxies)


    Cache-Tags: news-42

    View Slide

  5. terminal42 web development gmbh
    Caching in Symfony

    View Slide

  6. terminal42 web development gmbh
    FriendsOfSymfony/
    HttpCache(Bundle)

    View Slide

  7. terminal42 web development gmbh
    Varnish

    View Slide

  8. terminal42 web development gmbh

    View Slide

  9. terminal42 web development gmbh
    ???

    View Slide

  10. terminal42 web development gmbh
    Symfony HttpCache
    [y] Super easy!
    [y] Guter Start
    [x] PHP-Prozess
    [x] Nur Filesystem
    [x] Kein Housekeeping
    [x] Kein Cache Tagging

    View Slide

  11. terminal42 web development gmbh
    PSR-6 Store
    [y] PSR-6 (FS, Redis…)
    [y] Housekeeping
    [y] Cache Tagging
    [y] Volle FOS-Integration

    View Slide

  12. terminal42 web development gmbh
    • KEINE Affiliation(!)
    • Open Source, Enterprise-Version verfügbar
    • Apache Drop-In-Replacement (versteht bspw. Rewrite Rules)
    • Native PHP SAPI (mod_lsphp)
    • ESI-Support in Enterprise-Version
    • Brotli, HTTP/2 inkl. Server Push, PageSpeed, Load Balancing, Throttling
    etc. pp.
    • HTTP/3 am Horizont
    • Reverse Proxy mit Tagging-Support (!)

    View Slide

  13. terminal42 web development gmbh

    View Slide

  14. terminal42 web development gmbh

    View Slide

  15. terminal42 web development gmbh
    Über mich
    • Yanick Witschi / terminal42 gmbh
    • 30
    • API's, Performance, Caching
    • Contao Core Team
    • Tennis, Basketball, Faustball
    • Scotch
    @toflar
    [email protected]
    https://github.com/toflar

    View Slide