Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Shellac: a distributed web accelerator

Kalan MacRow
December 10, 2013

Shellac: a distributed web accelerator

Shellac is an HTTP/1.1 distributed caching proxy for Linux.

Kalan MacRow

December 10, 2013
Tweet

More Decks by Kalan MacRow

Other Decks in Research

Transcript

  1. Shellac. (noun) Lac bug resin melted into thin flakes, used

    for making varnish Kalan MacRow Data at Scale ‘13
  2. Kalan MacRow Data at Scale ‘13 ! Script interpreters 50+

    SQL queries Localization Personalization Template rendering …. ! 3 sec.
  3. • HTTP/1.1 proxy server for Linux 2.5+ • Distributed RAM

    cache built on Memcached • Level-triggered edge-polling architecture • 1K lines of Python Kalan MacRow Data at Scale ‘13 Design
  4. Kalan MacRow Data at Scale ‘13 “The key to making

    programs fast is to make them do practically nothing” — Mike Haertel, original author of GNU grep Design
  5. Kalan MacRow Data at Scale ‘13 • I/O bound and

    largely avoids the GIL • Substantial function/method/syscall call overhead • Iteration with while, for expensive • Event dispatch really suffers, but… Design
  6. Load Balancer Web Server Accelerator Cache Web Server Accelerator Cache

    Web Server Accelerator Cache Typical HA Kalan MacRow Data at Scale ‘13
  7. Shellac HA Kalan MacRow Data at Scale ‘13 Load Balancer

    Web Server Shellac Web Server Shellac Web Server Shellac Cache Dedicated Cache
  8. Kalan MacRow Data at Scale ‘13 • Interested in performance

    both • as a proxy / load balancer • as a caching proxy / accelerator • Graphs: best of Apache, Varnish and worst for Shellac over 3 runs Evaluation
  9. Kalan MacRow Data at Scale ‘13 • 4 x m1.large

    instances (4 core Xeon, 8GB) • Elastic Load Balancer • Master for running benchmarks • One availability zone, one region
  10. Kalan MacRow Data at Scale ‘13 Static Dynamic 1 Dynamic

    2 Requests / sec. (mean) Evaluation 10K requests, 1K clients
  11. Static Dynamic 1 Dynamic 2 Transfer Rate (KB/s) Kalan MacRow

    Data at Scale ‘13 Evaluation 10K requests, 1K clients
  12. Static Dynamic 1 Dynamic 2 Peak Memory Usage (MB) Kalan

    MacRow Data at Scale ‘13 Evaluation
  13. Kalan MacRow Data at Scale ‘13 Conclusions • Shellac 0.1.0a

    is competitive • as a proxy / load balancer • as a caching proxy / accelerator • A C port might shellac Varnish!
  14. Future • HTTP/1.1 compliance • Try with PyPy JIT’ing, eventually

    port to C • Binary format for cache entries • Tighter integration of cache node with proxy Kalan MacRow Data at Scale ‘13