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
AI-DLC Deep Dive
yuukiyo
5
830
TiDBのアーキテクチャから学ぶ分散システム入門 〜MySQL互換のNewSQLは何を解決するのか〜 / tidb-architecture-study
dznbk
1
160
Nuxt Server Components
wattanx
0
270
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
180
VueエンジニアがReactを触って感じた_設計の違い
koukimiura
0
170
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.3k
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
410
Vibe NLP for Applied NLP
inesmontani
PRO
0
350
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
230
iOS機能開発のAI環境と起きた変化
ryunakayama
0
180
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
6.3k
Getting more out of Maven
mlvandijk
0
100
Featured
See All Featured
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Code Reviewing Like a Champion
maltzj
528
40k
The Pragmatic Product Professional
lauravandoore
37
7.2k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.3k
Done Done
chrislema
186
16k
[SF Ruby Conf 2025] Rails X
palkan
2
940
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
BBQ
matthewcrist
89
10k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
200
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
670
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
710
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