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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jano González
October 30, 2019
Programming
510
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Containerizing your monolith
My presentation @ LISA19
Jano González
October 30, 2019
More Decks by Jano González
See All by Jano González
Migrando a Microservicios
janogonzalez
1
350
Extracting services from a monolith
janogonzalez
3
300
¿Después de 10 años, realmente entiendo esta industria?
janogonzalez
3
530
Microservices in Practice
janogonzalez
7
730
Two programmers in one
janogonzalez
1
240
The Bipolar Programmer
janogonzalez
4
660
Ruby for your two internal programmers
janogonzalez
4
300
Ruby for Java minds
janogonzalez
4
1.1k
How Ruby Programmed Me
janogonzalez
11
550
Other Decks in Programming
See All in Programming
AI 輔助遺留系統現代化的經驗分享
jame2408
1
850
New "Type" system on PicoRuby
pocke
1
980
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
14
5.7k
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
720
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.4k
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
210
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.2k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.4k
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
270
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
260
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
200
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Become a Pro
speakerdeck
PRO
31
6k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
150
Abbi's Birthday
coloredviolet
2
8.1k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
490
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
530
First, design no harm
axbom
PRO
2
1.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Being A Developer After 40
akosma
91
590k
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