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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
160
HA Website
allenwei
1
1.7k
Other Decks in Programming
See All in Programming
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
15
3.2k
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
8
3.7k
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
0
170
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
220
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
8.8k
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
200
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
260
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
260
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
200
共通化で考えるべきは、実装より公開する型だった
codeegg
0
190
どこまでゆるくて許されるのか
tk3fftk
0
470
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
210k
New Earth Scene 8
popppiees
3
2.4k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
410
Navigating Team Friction
lara
192
16k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.1k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
WENDY [Excerpt]
tessaabrams
11
38k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
210
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