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
Containerizing your monolith
Search
Jano González
October 30, 2019
Programming
0
480
Containerizing your monolith
My presentation @ LISA19
Jano González
October 30, 2019
Tweet
Share
More Decks by Jano González
See All by Jano González
Migrando a Microservicios
janogonzalez
1
330
Extracting services from a monolith
janogonzalez
3
280
¿Después de 10 años, realmente entiendo esta industria?
janogonzalez
3
510
Microservices in Practice
janogonzalez
7
710
Two programmers in one
janogonzalez
1
220
The Bipolar Programmer
janogonzalez
4
640
Ruby for your two internal programmers
janogonzalez
4
290
Ruby for Java minds
janogonzalez
4
1.1k
How Ruby Programmed Me
janogonzalez
11
530
Other Decks in Programming
See All in Programming
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
120
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
110
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
970
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
510
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
230
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
240
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
420
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
150
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
150
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
360
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
560
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
New Earth Scene 8
popppiees
1
1.7k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
270
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
240
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
120
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.4k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
290
The browser strikes back
jonoalderson
0
800
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
170
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
380
Transcript
Containerizing your monolith Jano González (@janogonzalez)
Introduction
What’s SoundCloud
> 200M Tracks > 20M Creators Many SoundCloud Rappers What’s
SoundCloud
2017-2018 Migration Keep moving Motivation
What’s the balance? Motivation
Our migration to microservices The monolith Containerizing the monolith Conclusion
Contents
Our migration to microservices
$ rails new soundcloud How we started
Around 2012
Around 2012
Around 2012
Around 2012
After
After
But what about deployment?
Component Environment Zone Deployment Our abstractions
Deployment The process
The monolith
Track User Playlist The monolith Core entities
360 Chef provisioned bare-metal machines Rails 2.3 Capistrano deployment The
monolith The technology
The monolith The architecture Public API Internal API Public API
Strangler Internal API caching/ strangler Another BFF Many microservices Public Web Workers
The monolith The components Public API MoshiMoshi (Internal API) Public
Web Assets MoshiMoshi Comments (Internal API) Workers Cron Shell Migration
The monolith The hosts component statsd-exporter mtail statsd passenger- exporter
…
Utilization Deployment Lack of confidence The monolith The issues
Containerizing the monolith
Throw it into Kubernetes
Congrats, your monolith is a microservice now
Thank You!
1.5 Engineers 1 year until the last bit was cleaned
up The project
The first milestone
Docker development container Tests on GoCD The first milestone
The proof of concept
First staging component The proof of concept Does it even
work?
The proof of concept PR O BLEM ! Init script
Nginx Passenger Passenger Process Rails App ??? Where are my env variables?
The proof of concept Env variables with The Perl Hack™
SO LU TIO N
Productionizing
Deployment Monitoring Logs Productionizing Does it run where it matters?
Productionizing Anatomy of a traffic serving pod component statsd statsd-exporter
passenger- exporter mtail twemproxy twemproxy-cu twemproxy- exporter init
Don’t choke service discovery Be allocatable Productionizing Sizing the pods
CPU units for main container Passenger processes Productionizing Sizing the
pods 3 16
Productionizing PR O BLEM ! Stdout v/s the log metrics
exporter Component STDOUT Log aggregator File??? Mtail
Productionizing Mtail with The Rotatelogs Hack™ SO LU TIO N
Productionizing Public API
Orchestration Productionizing Public API
Productionizing Public API PR O BLEM ! DNS latency and
our excessive usage Component Service Service Service
Productionizing Public API CoreDNS and the DNS Hack™ SO LU
TIO N
Productionizing Internal API
Highest throughput Productionizing Internal API
Productionizing Internal API PR O BLEM ! Latency was too
high
Productionizing Internal API Optimize GC and make cheaper SQL queries
SO LU TIO N
Productionizing Internal API PR O BLEM ! Errors spikes during
deployment
Productionizing Internal API The preStop Trick™ SO LU TIO N
Productionizing Internal API PR O BLEM ! Errors spikes during
deployment (still???)
Productionizing Internal API The Pre Start Trick™ SO LU TIO
N
The rest
• Workers • Cron jobs • Shell / Migration hosts
• Cleanup! The rest
Finishing
Current status
On-prem Cloud Current status Number of pods ~1000 ~140
On-prem RPS Cloud RPS Current status Traffic 25K 3K
Current status Many deploys
Conclusions
One Infrastructure One Delivery Process Conclusions What we solved
Step by step Controlled rollouts Managing expectations Conclusions How we
did it
Improved utilization Increased confidence Enabling new initiatives Conclusions Benefits
Assess current progress Evaluate costs and benefits Conclusions Should you
do it?
Thank You!
@janogonzalez https://soundcloud.com/janogonzalez