Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Caching, why not?
Search
dkovalenko
July 11, 2015
Technology
1
75
Caching, why not?
Highload meetup: talks by Megogo, 2015
dkovalenko
July 11, 2015
Tweet
Share
Other Decks in Technology
See All in Technology
著者と読み解くAIエージェント現場導入の勘所 Lancers TechBook#2
smiyawaki0820
11
5.5k
re:Invent 2025 ふりかえり 生成AI版
takaakikakei
1
130
“決まらない”NSM設計への処方箋 〜ビットキーにおける現実的な指標デザイン事例〜 / A Prescription for "Stuck" NSM Design: Bitkey’s Practical Case Study
bitkey
PRO
1
520
【AWS re:Invent 2025速報】AIビルダー向けアップデートをまとめて解説!
minorun365
4
430
re:Invent2025 コンテナ系アップデート振り返り(+CloudWatchログのアップデート紹介)
masukawa
0
230
Playwright x GitHub Actionsで実現する「レビューしやすい」E2Eテストレポート
kinosuke01
0
210
Microsoft Agent 365 を 30 分でなんとなく理解する
skmkzyk
1
490
技術以外の世界に『越境』しエンジニアとして進化を遂げる 〜Kotlinへの愛とDevHRとしての挑戦を添えて〜
subroh0508
1
320
エンジニアリングマネージャー はじめての目標設定と評価
halkt
0
220
因果AIへの招待
sshimizu2006
0
310
安いGPUレンタルサービスについて
aratako
2
2.6k
手動から自動へ、そしてその先へ
moritamasami
0
260
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Navigating Team Friction
lara
191
16k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
For a Future-Friendly Web
brad_frost
180
10k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
Site-Speed That Sticks
csswizardry
13
990
Designing for Performance
lara
610
69k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
710
Speed Design
sergeychernyshev
33
1.4k
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?