Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Caching, why not?
Search
dkovalenko
July 11, 2015
Technology
91
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Caching, why not?
Highload meetup: talks by Megogo, 2015
dkovalenko
July 11, 2015
Other Decks in Technology
See All in Technology
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
390
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
230
野良MCPサーバーを排除せよ!MCPサーバーのガバナンス
yukiogawa
1
160
LLM-as-a-Judgeは本当に信頼できるのか――評価器を評価する話
taka_aki
3
1k
Kiro Crewで「みのるん式」仕事術やってみた
minorun365
PRO
3
1k
DevelopersIO2026 -バックアップは“消されないこと”が9割-
yoshida0129
0
300
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
5
1.5k
sue445's proposals 2026
sue445
0
130
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
7
5.3k
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
350
Refining Active Record
shugo
0
190
価値について
gree_tech
PRO
0
140
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
41
2.8k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
580
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
530
Statistics for Hackers
jakevdp
799
230k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
Darren the Foodie - Storyboard
khoart
PRO
4
4k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Are puppies a ranking factor?
jonoalderson
2
4.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Transcript
Caching, why not? Highload Meetup: talks by Megogo
About me • Dmitriy Kovalenko @dkovalenko_fun • TeamLead @ x2sy:
Megogo • Actively using: Scala, php • Also: Clojure, golang
About us • > 4 million users every day •
> 30000 hours of video content • Web, iOS, Android, SmartTV, OTT Boxes • CIS, Baltics, Europe
Agenda • Caching across tiers: 1. Browser 2. Frontend server/proxy
3. Application • Cache infrastructure • Microservices and caching
Speedup your Application
None
None
• Cache-control • Max-Age, S-Max-Age (seconds) • Expires • ETag
(If-None-Match) Headers
None
Use CDN, Carl! • Move your Images, JS, CSS ->
CDN • Assets minifying, response gzipping
Use your Frontend/ Cacher/ Proxy
Reverse proxy • Varnish Cache • Nginx • Use your
cache store directly (CouchDB, Memcached) • Split your page, think about SSI/ESI includes
None
frontend server caching pros: • High speed • Zero overhead
for application • Usually can be applied without application change
frontend server caching cons: • Hard to debug • Hard
to get right • Changes in application needs additional synchronization
Application cache pros: • Much controllable than frontend cache •
Can use Application context • Swapping implementations in not a problem
Problems to think about • Key selection, Cache Tags •
Invalidation schema • Cold start/full flush • Dogpile effect • Embedded or External • Local or Distibuted
<?php $data = $cache->get('some_key'); if ($data === false) { $data
= getFromDB(); $cache->set($data); } return $data;
Cache slam problem
Eviction strategies • LRU • LFU • FIFO • Lifetime
Cache in cluster CP DB Service 2 WEB API Service
2
Going further with Microservices
There are only two hard things in Computer Science: cache
invalidation and naming things. ! -- Phil Karlton
Solutions • Nodes list • Shared/Distributed caches • Master invalidates
slaves • Queue • Cache cleaner • ETag FTW!
None
None
None
None
None
None
Great caching is like great sex. It hides all the
real problems. ! @vivekhaldar Questions?