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
Build Scalable App with Docker
Search
allenwei
November 29, 2014
Programming
1.2k
3
Share
Build Scalable App with Docker
allenwei
November 29, 2014
More Decks by allenwei
See All by allenwei
What You Don’t Know - Remote Work
allenwei
1
150
HA Website
allenwei
1
1.7k
Other Decks in Programming
See All in Programming
Talking to terminals (and how they talk back) (KotlinConf 2026)
jakewharton
PRO
1
160
Hive Metastoreを通して学ぶIceberg REST Catalog ― 仕様から実装まで
okumin
0
300
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
390
AI 時代のソフトウェア設計の学び方
masuda220
PRO
28
11k
要はバランスからの卒業 #yumemi_grow
kajitack
0
200
New "Type" system on PicoRuby
pocke
1
370
今さら聞けないCancellationToken
htkym
0
200
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.1k
AIとRubyの静的型付け
ukin0k0
0
450
Claspは野良GASの夢をみるか
takter00
0
140
Agentic UI beyond Chats Architecture Patterns & Open Standards @ngMunich 05/2026
manfredsteyer
PRO
0
180
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
260
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
130
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Making Projects Easy
brettharned
120
6.7k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Site-Speed That Sticks
csswizardry
13
1.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
Designing for Timeless Needs
cassininazir
1
230
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
The untapped power of vector embeddings
frankvandijk
2
1.7k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
190
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Transcript
Build Scalable App with Docker Allen Wei
[email protected]
allenwei.cn
About Me • Manager of Groupon Payments China • Ruby
developer • iOS developer • DevOps • twitter: @allenwei • weibo: @魏伦
Docker
Docker
The Twelve Factor App • Setup automation • Portability •
Easy to deploy • Continuous deployment • Scale up easily http://12factor.net/ Adam Wiggins
Disposability Maximize robustness with fast startup and graceful shutdown
Process Execute the app as one or more stateless processes
Backing Services Treat backing services as attached resources
Port binding Export services via port binding
Concurrency Scale out via the process model
Build, release, run Strictly separate build and run stages
Config Store config in the environment
More • Keep development, staging, and production as similar as
possible • Treat logs as event streams • Run admin/management tasks as one-off processes
Problem • Container Management • Service Discovery • Health Check
• Configuration Management
Shipyard
Shipyard
Shipyard
Shipyard
Fig http://fig.sh
Fig
Fig
Fig • fig build • fig up • fig start/stop
• fig scale
Consul https://consul.io/
Service Discovery Consul API DNS
Consul API
Container Register • progrium/registrator • Listen to docker socket •
Register when container started • Unregister when container stop • Register with meta data
Docker Registrator
Docker Registrator
Consul API
Consul API
Consul API
DNS Query
DNS RoundRobin
DNS Lookup
Failure Detection Health Check - Node Health Check - Service
Heath Check
Multi Datacenter Multi DataCenter Agent DataCenter Lookup
Key/Value Storage K/V Database Configuration Management
Key Value Store
Get value Recursively
Use ENV as configuration • Language- and OS-agnostic standard •
More difficult to accidentally commit to a code repo • Environmental variables are easy to change between environments
Demo
Container Management
Cluster Management
Docker in Groupon 2015 Q1
One more thing
A Minimal Operating System Docker Containers Painless Updating Clustered By
Default
Reference • https://hashicorp.com/blog/introducing-consul-template.html • https://github.com/hashicorp/consul-template • https://github.com/progrium/registrator • http://progrium.com/blog/2014/08/20/consul-service-discovery-with-docker/ •
http://progrium.com/blog/2014/07/29/understanding-modern-service- discovery-with-docker/ • https://tech.bellycard.com/blog/load-balancing-docker-containers-with-nginx- and-consul-template/ • http://12factor.net/
Q & A thanks