C a c h i n g D e m y s t i f i e d A a r
- n
W e l c h – C a d r e W e b H
- s
t i n g
Caching Demystified
presented by
Aaron Welch
and
Caching Demystified presented by Aaron Welch and C a c h i n - - PowerPoint PPT Presentation
Caching Demystified presented by Aaron Welch and C a c h i n g D e m y s t i f i e d A a r o n W e l c h C a d r e W e b H o s t i n g What is a cache? A cache is a mechanism that allows you to
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
presented by
and
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
Common aspects of cache mechanisms include:
the cache mechanism or stored and retrieved on request within an application
data
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
(support more requests, eg: people or traffic)
(go faster) These things are not mutually exclusive; working to improve one, you generally get improvements on the other as well
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
Examples: APC / eAccelerator / Zend Optimizer
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
Execute Opcode Cache (valid cache?) Compile Parse
apache/upstream poop
PHP Script YES NO Store in cache
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
Benefits:
Drawbacks:
queries or large memory footprint
not anything generated by them
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
Examples: Varnish / Ngnix / Squid
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
Deliver Request LAMP / Drupal generates response
browsers! internets!
Proxy Cache (valid cache?) YES NO Store in cache Deliver from Cache
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
Benefits:
LAMP stack (performance)
Drawbacks:
developers/users
Tools: www.isvarnishworking.com to verify varnish
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
Examples: memcache / membase / redis
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
Benefits:
with non-persistent data (sessions, cache tables) Drawbacks:
developers/users
application itself)
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
Examples: Akamai / Amazon cloudfront / Voxel CDN (voxcast)
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
Asset valid in cache? Deliver from Cache
ELKO CHICAGO
CDN Origin (your server)
NEW YORK
CDN YES
browsers! internet!
Deliver Asset Store Asset in Cache NO
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
Benefits:
Drawbacks:
cache to be effective)
developers/users
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g
C a c h i n g D e m y s t i f i e d A a r
W e l c h – C a d r e W e b H
t i n g