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
Unshackling the database!
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
marcbransn
May 28, 2019
Programming
2.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Unshackling the database!
Using Redis as the primary data storage to ensure rapid growth scalability
marcbransn
May 28, 2019
Other Decks in Programming
See All in Programming
気持ちぃ〜角丸 Squircle
ryu1013
0
310
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
590
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
1k
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.6k
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
430
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
600
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Making Projects Easy
brettharned
120
6.8k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
500
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
940
Thoughts on Productivity
jonyablonski
76
5.4k
How GitHub (no longer) Works
holman
316
150k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
870
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
Building Adaptive Systems
keathley
44
3.2k
The Curse of the Amulet
leimatthew05
3
16k
Transcript
Unshackling the database! Using Redis as the primary data storage
to ensure rapid growth scalability
$ whoami • marc.brandenburg • 3 years in Japan •
3 months at SmartNews ◦ Fundamental Architecture Squad • Interests: Kotlin, DDD, Clean Architecture
Agenda • Project case study ◦ Improving an existing system
• Workflow ◦ Analysis ◦ Design ◦ Implementation ◦ Deployment
Existing System
A/B test system Control Test
Use cases System Project team User Analytics 1) create new
tests 2) fetch test identifiers 3) analyze test results
Quality Attributes • Performance ◦ 200ms response time of news
feed refresh • Scalability ◦ 30k+ requests / second ◦ 1.5M+ unique users during peak time • Availability ◦ 99.99% of requests return a response
Analysis
Current Architecture Analytics Admin API Database 1) query 2) read
3) compute 4) write 5) return
Problem Analysis Analytics Admin Database Not optimized for read-heavy load
API 1) query 2) read 3) compute 4) write 5) return
Problem Analysis Analytics Admin Database Response waits for database writes
API 1) query 2) read 3) compute 4) write 5) return
Problem Analysis Analytics Admin Database Database serves too many masters
API 1) query 2) read 3) compute 4) write 5) return
Problem Analysis Analytics Admin Database Logic spread over multiple project
API Logic isn’t flexible enough 1) query 2) read 3) compute 4) write 5) return
Design
Proposed Architecture Analytics Admin API Database 1) query 2) read
3) compute 5) write 4) return Cache Stream 6) write
Proposed Architecture Analytics Admin API Database 1) query 2) read
3) compute 5) write 4) return Cache Stream 6) write Write admin changes into fast cache
Proposed Architecture Analytics Admin API Database 1) query 2) read
3) compute 5) write 4) return Cache Stream 6) write Update asynchronously
Proposed Architecture Analytics Admin API Database 1) query 2) read
3) compute 5) write 4) return Cache Stream 6) write Refactor into single code base Follow principles of clean architecture
Research • Redis seems like a good choice for the
cache ◦ How to optimize memory consumption? ◦ How to ensure data durability?
Memory consumption • The intset encoding for SETs
Data durability • Append-only file persistence
Feedback Session • Short feedback loop crucial ◦ Improvements from
team members ◦ Updates about my research
Implementation
Tech stack • Kotlin • Coroutines • Spek Framework •
Spring Boot 2
Entities Entities
Entities Entities Pure functions Table-driven tests Core business logic Changes
are infrequently
Use Cases Delivery Entities Admin Sync
Use Cases Delivery Entities Admin Sync Asynchronous data flow between
components External dependencies defined as interfaces Modelling the applications BDD test scenarios
Gateways Delivery Entities Admin Sync Kinesis Redis SQL
Gateways Delivery Entities Admin Sync Kinesis Redis SQL Implementations of
use case interfaces Semi-manual test
Deployment
Performance tests • Locust • Determine correct instance sizing •
Setup monitoring dashboards/alerts • Observe any resource leakage
Canary deployment • New Relic • Observe on a subset
of production users • Identify any final issues
Outcome • Slashed peak response time by up to 50%
• Removed rate limiting database protection
http://about.smartnews.com/careers/ We’re Hiring!!