15 Factor Applications Flashcards
(34 cards)
I. Codebase (1/15)
I. Codebase (1/15)
One codebase tracked in revision control, many deploys
Each codebase belongs to one application and the codebase is the same across all execution environments (development, staging, production, etc), although they can be running on different versions.
II. Dependency Management (3/15)
II. Dependency Management (3/15)
Explicitly declare and isolate dependencies.
You should use a dependency management system, and isolate your application dependencies. This gives you the certainty that your application is always being run with the same dependencies, no matter the environment in which it is running.
III. Configuration, credentials, and code (5/15)
III. Configuration, credentials, and code (5/15)
Store config in the environment.
All configuration and credentials are stored as environment variables. This removes any vulnerability that could come from exposing sensitive credentials in your code and also allows you to control all configuration from the command line, making it possible to automate deploys.
IV. Backing services (8/15)
IV. Backing services (8/15)
Treat backing services as attached resources.
All backing services are treated as bound resources. Each service declares the services that it utilizes and the connections between the service and the resources are done by external configurations.
V. Design, Build, release, run (4/15)
V. Design, Build, release, run (4/15)
Strictly separate build and run stages.
VI. Stateless Processes (12/15)
VI. Stateless Processes (12/15)
Execute the app as one or more stateless processes
Given that processes can disappear at any moment (once again due to the transient nature of instances), all processes should be stateless. All long-term storage of data should happen on external services. Also, all processes that need to communicate with each other need to do so through external services.
VII. Port binding (7/11)
VII. Port binding (7/11)
Export services via port binding.
Applications should always expose their services through port binding, and there should always be a 1:1 relation between applications and app servers.
VIII. Concurrency (13/15)
VIII. Concurrency (13/15)
Scale out via the process model.
Applications need to be able to scale horizontally, so there might be more than one instance of the service running at a time.
IX. Disposability (7/15)
IX. Disposability (7/15)
Maximize robustness with fast startup and graceful shutdown
All instances running services must be able to initiate execution quickly and stop gracefully, as they can be started or killed at any moment (either by some external issue or due to changes in demand).
X. Environment parity (9/15)
X. Environment parity (9/15)
Keep development, staging, and production as similar as possible.
The application should at all times work on all environments ( staging, production, etc ) and environments should be as similar as possible. The services should use the same types of resources across all environments. This reduces the time between code check-in and production deploy.
XI. Logs (6/15)
XI. Logs (6/15)
Treat logs as event streams.
Logs should be output to stdout and stderr and you should use some external tool for handling logs.
XII. Admin processes (10/15)
XII. Admin processes (10/15)
Run admin/management tasks as one-off processes.
These should run as one-off processes, in an environment identical to the one in which the application is running.
Given that _________ can disappear at any moment (once again due to the transient nature of instances), all should include this Factor. All long-term storage of data should happen on external services. Also, all _________ that need to communicate with each other need to do so through external services.
Which Factor does this represent?
VI. Stateless Processes (12/15)
All instances running services must be able to initiate execution quickly and stop gracefully, as they can be started or killed at any moment (either by some external issue or due to changes in demand).
Which Factor does this represent?
IX. Disposablility (7/15)
Applications should always expose their services through this factor, and there should always be a 1:1 relation between applications and app servers.
Which Factor does this represent?
VII. Port Binding (11/15)
this Factor will be consumed by other clients and services. Therefore, this Factor is the most important interface for your service and should be well documented.
Which Factor does this represent?
- API First (2/15)
You should use a management system for this Factor, and isolate your application ____________. This gives you the certainty that your application is always being run with the same ____________, no matter the environment in which it is running.
Which Factor does this represent?
II. Dependency Management (3/15)
These states are strictly separated from each other.
Which Factor does this represent?
V. Design, build, release, run (4/15)
All _____________ and ___________ are stored as environment variables. This removes any vulnerability that could come from exposing sensitive ____________ in your ____ and also allows you to control all configuration from the command line, making it possible to automate deploys.
Which Factor does this represent?
III. Configuration, credentials, and code (5/15)
____ should be output to stdout and stderr and you should use some external tool for handling ____.
Which Factor does this represent?
XI. Logs (6/15)
The application should at all times work on all ____________ ( staging, production, etc ) and ____________ should be as similar as possible. The services should use the same types of resources across all ____________. This reduces the time between code check-in and production deploy.
Which Factor does this represent?
X. Environment parity (9/15)
These should run as one-off _________, in an environment identical to the one in which the application is running.
Which Factor does this represent?
XII. Admin processes (10/15)
All of these are treated as bound resources. Each declares the services that it utilizes and the connections between the service and the resources are done by external configurations.
Which Factor does this represent?
IV. Backing services (8/15)
Applications need to be able to scale horizontally, so there might be more than one instance of the service running at a time.
Which Factor does this represent?
VIII. Concurrency (13/15)