Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
Transcript
49 slides
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
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
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
370
protojson における文字化けの扱い
kazuki1023
0
450
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
310
Getting Started with Vibe Coding
miccheng
0
240
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
930
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.5k
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
270
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
590
小さなアプリを作って公開するまで
onozaty
0
200
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
150
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
590
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
360
Featured
See All Featured
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.3k
SEO for Brand Visibility & Recognition
aleyda
0
4.9k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.2k
Optimizing for Happiness
mojombo
378
72k
GitHub's CSS Performance
jonrohan
1033
470k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
640
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
850
Ruling the World: When Life Gets Gamed
codingconduct
0
440
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.2k