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
12 Factor App
Search
Craig Kerstiens
June 28, 2012
Programming
12
1.1k
12 Factor App
12 Factor Application talk given at Cloud East
Craig Kerstiens
June 28, 2012
Tweet
Share
More Decks by Craig Kerstiens
See All by Craig Kerstiens
Product planning w/ gridding - Effort vs. Impact rule of thirds
craigkerstiens
0
270
Five sharding data models and which is right? PGDay Nordic
craigkerstiens
0
170
Postgres at any scale
craigkerstiens
1
720
Five data models for sharding and which is right
craigkerstiens
0
110
Postgres Performance for Humans - All things Open
craigkerstiens
1
260
Postgres Performance for Humans - PyCaribbean
craigkerstiens
1
130
Postgres present and future
craigkerstiens
1
330
Marketing for Developers
craigkerstiens
0
200
Postgres – A Data Platform
craigkerstiens
2
440
Other Decks in Programming
See All in Programming
EventSourcingの理想と現実
wenas
6
2.3k
Outline View in SwiftUI
1024jp
1
330
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
900
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
610
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
920
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
330
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Why Our Code Smells
bkeepers
PRO
334
57k
Designing Experiences People Love
moore
138
23k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
A Tale of Four Properties
chriscoyier
156
23k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Agile that works and the tools we love
rasmusluckow
327
21k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
A designer walks into a library…
pauljervisheath
203
24k
Transcript
12 Factor App
Craig Kerstiens @craigkerstiens work at @heroku
First Some History
Where We’ve Been Version Control | Dependency Management | Build
Release
Where We’ve Been Version Control | Dependency Management | Build
Release Folders
Where We’ve Been Version Control | Dependency Management | Build
Release Folders SVN,Perforce,Source Safe
Where We’ve Been Version Control | Dependency Management | Build
Release Folders SVN,Perforce,Source Safe Git,Mercurial
Version Control | Dependency Management | Build Release Now
Version Control | Dependency Management | Build Release Now 1
Code base Many deploys
Version Control | Dependency Management | Build Release Now 1
Code base Many deploys
Version Control | Dependency Management | Build Release Now 1
Code base Many deploys
Version Control | Dependency Management | Build Release Where We’ve
Been
Version Control | Dependency Management | Build Release Where We’ve
Been $ python setup.py install $ ruby setup.rb install
Version Control | Dependency Management | Build Release Where We’ve
Been $ python setup.py install $ ruby setup.rb install $ INSTALL FROM SOURCE
Version Control | Dependency Management | Build Release Now
Version Control | Dependency Management | Build Release $ pip
install -r requirements.txt $ bundle install Now
Version Control | Dependency Management | Build Release $ pip
install -r requirements.txt $ bundle install Now $ INSTALL PINNED VERSIONS
Version Control | Dependency Management | Build Release Where We’ve
Been
$ rsync myproject tomyserver Version Control | Dependency Management |
Build Release Where We’ve Been
Version Control | Dependency Management | Build Release Now
Version Control | Dependency Management | Build Release Now
Version Control | Dependency Management | Build Release Now
Enough History
12 Factor
Declarative Setup - Minimize Setup Time 12 Factor
Declarative Setup - Minimize Setup Time Clean Contracts - Portability
12 Factor
Declarative Setup - Minimize Setup Time Clean Contracts - Portability
Deploy Practices - Cloud and horizontal scaling 12 Factor
Declarative Setup - Minimize Setup Time Clean Contracts - Portability
Deploy Practices - Cloud and horizontal scaling Minimize Divergence - Continuous Deployment 12 Factor
Dev-Prod Parity Dev Prod Parity | Config | Concurrency |
Backing Services | Logs
dev Dev-Prod Parity Dev Prod Parity | Config | Concurrency
| Backing Services | Logs
dev = staging Dev-Prod Parity Dev Prod Parity | Config
| Concurrency | Backing Services | Logs
dev = staging = prod Dev-Prod Parity Dev Prod Parity
| Config | Concurrency | Backing Services | Logs
dev = staging = prod sqlite postgres postgres Dev-Prod Parity
Dev Prod Parity | Config | Concurrency | Backing Services | Logs
dev = staging = prod sqlite postgres postgres Dev-Prod Parity
Dev Prod Parity | Config | Concurrency | Backing Services | Logs ≠ ≠
dev = staging = prod sqlite postgres postgres postgres =
postgres = postgres Dev-Prod Parity Dev Prod Parity | Config | Concurrency | Backing Services | Logs ≠ ≠
Config Dev Prod Parity | Config | Concurrency | Backing
Services | Logs
Config var server=”servername” var username=”username” var password=”password” var dbname =
“dname” Dev Prod Parity | Config | Concurrency | Backing Services | Logs
Config Dev Prod Parity | Config | Concurrency | Backing
Services | Logs
Config (External to your code) Dev Prod Parity | Config
| Concurrency | Backing Services | Logs
Config (External to your code) var server=ENV[‘server’] var username=ENV[‘username’] var
password=ENV[‘password’] var dbname = ENV[‘dbname’] Dev Prod Parity | Config | Concurrency | Backing Services | Logs
Processes Dev Prod Parity | Config | Concurrency | Backing
Services | Logs
web.1 Processes Dev Prod Parity | Config | Concurrency |
Backing Services | Logs
web.1 web.2 Processes Dev Prod Parity | Config | Concurrency
| Backing Services | Logs
web.1 web.2 Scale Processes Dev Prod Parity | Config |
Concurrency | Backing Services | Logs
web.1 web.2 worker.1 clock.1 Workload Diversity Scale Processes Dev Prod
Parity | Config | Concurrency | Backing Services | Logs
web.1 web.2 worker.1 worker.2 worker.3 worker.4 clock.1 Workload Diversity Scale
Processes Dev Prod Parity | Config | Concurrency | Backing Services | Logs
Backing Services Dev Prod Parity | Config | Concurrency |
Backing Services | Logs
Backing Services Dev Prod Parity | Config | Concurrency |
Backing Services | Logs Stateless Processes
Backing Services Dev Prod Parity | Config | Concurrency |
Backing Services | Logs Stateless Processes External Config
Backing Services Dev Prod Parity | Config | Concurrency |
Backing Services | Logs Stateless Processes External Config DATABASE_URL=postgres://username:pass@host/db MEMCACHE_URL=username:pass@host/db
Logs Dev Prod Parity | Config | Concurrency | Backing
Services | Logs
How we use logs $ ssh tomyserver $ cat access_log
Logs Dev Prod Parity | Config | Concurrency | Backing Services | Logs
How we use logs $ ssh tomyserver $ cat access_log
How we perceive logs $ tail -f access_log Logs Dev Prod Parity | Config | Concurrency | Backing Services | Logs
Logs Dev Prod Parity | Config | Concurrency | Backing
Services | Logs
DB Logs Dev Prod Parity | Config | Concurrency |
Backing Services | Logs
DB Web Logs Dev Prod Parity | Config | Concurrency
| Backing Services | Logs
DB Web Worker Logs Dev Prod Parity | Config |
Concurrency | Backing Services | Logs
Event Stream DB Web Worker Logs Dev Prod Parity |
Config | Concurrency | Backing Services | Logs
Event Stream 2012-02-22T19:56:40+00:00 [postgres]: .... 2012-02-22T19:56:40+00:00 [router]: GET mysite.com/ ...
2012-02-22T19:56:40+00:00 [nginx]: .... 2012-02-22T19:56:40+00:00 [worker]: .... DB Web Worker Logs Dev Prod Parity | Config | Concurrency | Backing Services | Logs
12 Factor
Declarative Setup Clean Contracts Deploy Practices Minimize Divergence 12 Factor
Fin. Resources http://craigkerstiens.com http://speakerdeck.com/u/craigkerstiens http://www.12factor.net