Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Caching, why not?
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
dkovalenko
July 11, 2015
Technology
86
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
サイバーエージェントにおけるAI推進戦略と変革への取り組み
shotatsuge
0
460
Kiro Ambassador を目指す話
k_adachi_01
0
120
ぼっちではじめた登壇が「51名」「241件」の発信に化けた
subroh0508
1
300
【FinOps】データドリブンな意思決定を目指して
z63d
0
110
徹底討論!ECS vs EKS!
daitak
3
1.4k
FPC(フレキシブル)基板にZephyr実装してみた。
iotengineer22
0
160
SONiC実機とGNS3 SONiC VSによる事前コンフィグ検証 ― 生成AIエージェントを環境構築・検証支援に使ってみた ―
sonic
0
120
技術・能力を向上する原理原則 #きのこセッションa #きのこ2026
bash0c7
0
110
AIチャットの改善から見えた、良いAI体験とは / What Constitutes a Good AI Experience: Insights from Improving AI Chat
kubode
0
120
新しいUbuntu/GNOMEが使いたいからXからWaylandへ移行頑張ってるの巻 2026-06-20
nobutomurata
0
160
從開發到部署全都交給 AI:實作 AI 驅動的自動化流程
appleboy
0
130
Flow 不死:AI 時代 DevOps 的不變本質
cheng_wei_chen
2
480
Featured
See All Featured
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
430
Testing 201, or: Great Expectations
jmmastey
46
8.2k
For a Future-Friendly Web
brad_frost
183
10k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
320
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
270
The Mindset for Success: Future Career Progression
greggifford
PRO
0
370
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?