up deployment, makes scaling easier & keeps apps clean • Developed over direct exposure to the deployment of hundreds of thousands of apps Monday, May 21, 12
for external dependencies • Instructions for starting processes • Problem with dev environment? • Put the fix in the readme $ brew install memcache $ foreman start Monday, May 21, 12
cycle to a worker • Workers have the same code, but don’t serve web content • Perfect for • Delayed emails • Image Processing • etc. Monday, May 21, 12
• DelayedJob (sql) • Sidekiq • Enqueue from the web server • User signs up, queue email • Dequeue & run on the worker • Process next item in queue Monday, May 21, 12
in multiple environments? • Easily scaling without tooling, architecture or development headaches? • Having the latest updates available to users at a moments notice? Read more at 12factor.net Monday, May 21, 12
many deploys • Dependencies • Explicitly declare and isolate dependencies • Config • Store config in the environment • Backing Services • Treat backing services as attached resources Monday, May 21, 12
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 Monday, May 21, 12
graceful shutdown • Dev/Prod Parity • Keep development, staging, and production as similar as possible • Logs • Treat logs as event streams • Admin Process • Run admin/management tasks as one-off processes Monday, May 21, 12