Upload
sarahnovotny
View
844
Download
1
Tags:
Embed Size (px)
DESCRIPTION
Taking a look at the many layers of caching in the modern webstack can lead to some interesting optimizations. We know that raid card caches, disk caches and CPU caches all exist at the hardware level, but how do they interact with database caching, application code caching and rendered page caching. Where are the redundancies and where is the most optimal location for your services to cache? Are you risking data integrity by using both disk and raid card caching? Is there a similar risk in using both filesystem and database caching? These are hard won lessons if you have to learn them during an outage. they can be avoided with some forethought and benchmarking. I’ll call out the many layers where data is cached and talk about some of the risks and potential performance gains that we’ve found by selectively disabling and adding particular caching layers.
Citation preview
①why do we cache?②count them③which are redundant?④which are a risk?⑤benchmarking ⑥monitoring
①why do we cache
cache: a component that transparently stores data so that future requests for that data can be served faster
CPU caches (L1, L2, L3)
disk caches
disk controller caches
database caches
memcached layer
application code caches
http cache
edge cache or CDN
operating system caches
② count them
and then there were more
DNS caching (ISP and client side)
web proxies
client side application caches
and all the hardware caching again
a short diversion:
my background is as an SA and DBA. i’ll be focusing data safety facets of caching
disk caches
disk controller caches
database caches
memcached layer
operating system caches
③which are redundant?
get moving!
④which are a risk?
disks lie
raid controllers lie (sometimes)
⑤ benchmarking
every infrastructure is different
every benchmarkhas to take that intoaccount
⑥ monitoring
measure multiple points
only you can preventfiredrills
tools to managethis insanity—
InnotopPercona toolkitsysbenchcacti templatesnagios
credits
flickr
• license plate – severud• tools – meanestindian
other
• 3ware image via http://www.xbitlabs.com/
• remaining images istockphoto
CIO Meteor EntertainmentProgram Chair OSCONProgram Chair PLMCEBoard Member Blue Gecko
Chef CommunityMySQL Community
[email protected]@sarahnovotny
stuff I do