~/talk

Data Driven Cache Invalidation

Talkat EuroPython 2011 · 2011-06-20..06-26· [python, web-performance]
slides:none on file

Demonstrates a concrete system: a Django app on PostgreSQL, Varnish fronting it, and DB-side invalidation using PostgreSQL triggers that either call PL/Python Varnish admin or enqueue events into pgq (SkyTools). A Python consumer reads pgq, issues regex Varnish purge via pgq calls, and retries across multiple Varnish servers. Example uses 1-hour TTL, 32MB Varnish cache, and targets “millions of hits a minute”; the setup works in demo, with pgq providing reliable async retries and scaling.

AI-written summary · about

  1. 0:00Introduction
  2. 1:09Caching challenges
  3. 3:39Caching layers
  4. 4:42Demo setup
  5. 6:50Django blog app
  6. 10:49Adding Varnish
  7. 14:46Fixed TTL problems
  8. 16:49On-demand invalidation
  9. 18:16App-only invalidation limits
  10. 19:42DB-driven invalidation
  11. 21:08Triggers with PL/Python
  12. 26:47Model mapping issues
  13. 28:12Async notifications with pgq
  14. 31:24Installing pgq
  15. 34:34Python pgq consumer
  16. 37:22Triggers using pgq
  17. 39:09Testing pgq invalidation
  18. 41:04Monitoring pgq queues
  19. 43:11Custom HTTP headers
  20. 45:20Invalidation best practices
  21. 46:50Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.