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
3
1.2k
Build Scalable App with Docker
allenwei
November 29, 2014
Tweet
Share
More Decks by allenwei
See All by allenwei
What You Don’t Know - Remote Work
allenwei
1
130
HA Website
allenwei
1
1.7k
Other Decks in Programming
See All in Programming
코딩 에이전트 체크리스트: Claude Code ver.
nacyot
0
870
テストから始めるAgentic Coding 〜Claude Codeと共に行うTDD〜 / Agentic Coding starts with testing
rkaga
15
5.3k
iOS 26にアップデートすると実機でのHot Reloadができない?
umigishiaoi
0
140
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
16
12k
スタートアップの急成長を支えるプラットフォームエンジニアリングと組織戦略
sutochin26
1
6.7k
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
810
チームのテスト力を総合的に鍛えて品質、スピード、レジリエンスを共立させる/Testing approach that improves quality, speed, and resilience
goyoki
5
1k
Result型で“失敗”を型にするPHPコードの書き方
kajitack
5
980
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
0
180
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
160
A full stack side project webapp all in Kotlin (KotlinConf 2025)
dankim
0
130
Flutterで備える!Accessibility Nutrition Labels完全ガイド
yuukiw00w
0
170
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
It's Worth the Effort
3n
185
28k
How to Ace a Technical Interview
jacobian
278
23k
Unsuck your backbone
ammeep
671
58k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
4 Signs Your Business is Dying
shpigford
184
22k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
54k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
700
A better future with KSS
kneath
238
17k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Designing Experiences People Love
moore
142
24k
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