• Can apply to any language
• Speeds up deployment and
scaling
• Keeps apps clean
• Developed through exposure
12 factor
Slide 4
Slide 4 text
12 factor
• Codebase
One codebase tracked in revision control, many deploys
• Dependencies
Explicitly declare and isolate dependencies
• Config
Store config in the environment
• Backing Services
Treat backing services as attached resources
Slide 5
Slide 5 text
12 factor
• Build, Release, Run
Strictly separate build and run stages
• Process
Execute the app as one or more stateless processes
• Port Binding
Export services via port binding
• Concurrency
Scale out via the process model
Slide 6
Slide 6 text
12 factor
• Disposability
Maximise robustness with fast startup and shutdown
• Parity
Keep environments as similar as possible
• Logs
Treat logs as event streams
• Admin Processes
Run admin/management tasks as one-off processes
Q. How many people
develop on MongoDB,
and deploy to
PostgreSQL?
Slide 50
Slide 50 text
Q. How many people
develop on SQLite3,
and deploy to
PostgreSQL?
Slide 51
Slide 51 text
Environmental Parity
Slide 52
Slide 52 text
• As close to each other as possible
• Same data-store (PostgreSQL 2.7, Memcached 1.4.15)
• Same language versions (Python 3.0)
• Real/consistent data
Slide 53
Slide 53 text
Fork
Slide 54
Slide 54 text
README
Slide 55
Slide 55 text
• Living document
• Standardised Dev environment
• Instructions for external
dependencies
• Instructions for starting
processes
• Had a problem?
Put the fix in the README
• Admin tasks should run in an
identical environment to the
code
• Admin tasks should be equally
isolated
• Admin tasks should be source
controlled and repeatable.
Slide 60
Slide 60 text
$ bundle exec ./scripts/
. fix_bad_records.rb
Slide 61
Slide 61 text
Q. Do you have
performance problems?
Slide 62
Slide 62 text
“There are no
performance problems,
only visibility problems”
- Ryan.Smith