Skip to main content

12 factor app (Twelve-factor app)


Twelve-factor app is a methodology for building distributed applications that run in the cloud and are delivered as a service. The approach was developed by Adam Wiggins, the co-founder of Horoku, a platform-as-a-service which is now part of Salesforce.com. Wiggin's goal was to synthesize best practices for deploying an app on Horoku and provide developers who are new to the cloud with a framework for discussing the challenges of native cloud applications.
Although some factors may seem self-evident to developers today, interest in developing apps that adhere to common best practices continues to grow with the rise of microservices and applications that are composed of loosely-coupled web services.
12 factors developers should think about when building native cloud apps:
1. Code base
Use one codebase, even when building cross-platform apps. Address the needs of specific devices with version controls.
 2. Dependencies
Explicitly declare and isolate all dependencies.
 3. Configuration
Don't store config as constants in code. Design the app to read its config from the environment.
 4. Backing Services
Treat back-end services as attached resources to be accessed with a URL or other locator stored in config.
 5. Build, Release, Run
Strictly separate build and run stages.
 6. Processes
Execute the app as one or more stateless processes. Data that must be persistent should be stored in a stateful backing service.
 7. Port binding
Use port binding to export services.
 8. Concurrency
Scale out apps horizontally, not vertically.
 9. Disposability
Use fast startups and graceful shutdowns to maximize robustness.
 10. Parity
Facilitate continuous deployment by making development, staging, and production environments as similar as possible.
 11. Logs
Treat logs as event streams. Logs should not be concerned with routing or storing the app's output.
 12. Admin processes
Run admin tasks as one-off processes from a machine in the production environment that's running the latest production code.
 The 12-factor basics
When a developer uses the twelve-factor app DevOps methodology, applications will have certain characteristics in common that address a variety of scenarios as an app scales. For example, the methodology recommends that apps use declarative formats for setup automation to assist new developers that enter the project at a later time.
Apps should also be written to have maximum portability between execution environments. and scale easily without significant reworking. Twelve-factor apps can be written in any programming language and in combination with any back-end service, such as a database.
The goal of the twelve-factor framework is to help developers build apps that use an architecture that ensures speed, reliability, agility, portability and ultimately results in a robust and reliable application.


Comments

Popular posts from this blog

Ghosting

Ghosting is to cease communications without notification. The use of the word "ghost" as a verb originated in social media in reference to dating, but the term is now used by employers to describe employees and potential employees who suddenly disappear. Typically, ghosting is used to describe: Job candidates who suddenly stop responding to messages. New hires who fail to show up for their first day of work. Employees who do not show up for a shift. Employees who leave work in the middle of the day and never come back. Some analysts blame ghosting on millennial entitlement. The reasoning is that members of the millennial generation have been brought up to feel they are special -- so special, in fact, that they do not need to follow conventional rules of behavior. Other analysts, however, maintain that ghosting behavior stems from changes in the job market and the phenomenon is simply a reflection of the laws of supply and demand in a healthy jo...

Data deduplication

Data deduplication -- often called intelligent compression or single-instance storage -- is a process that eliminates redundant copies of data and reduces storage overhead. Data deduplication techniques ensure that only one unique instance of data is retained on storage media, such as disk, flash or tape. Redundant data blocks are replaced with a pointer to the unique data copy. In that way, data deduplication closely aligns with incremental backup, which copies only the data that has changed since the previous backup. For example, a typical email system might contain 100 instances of the same 1 megabyte (MB) file attachment. If the email platform is backed up or archived, all 100 instances are saved, requiring 100 MB of storage space. With data deduplication, only one instance of the attachment is stored; each subsequent instance is referenced back to the one saved copy. In this example, a 100 MB storage demand drops to 1 MB. Target vs. source deduplication Data deduplica...

A Graphics Processing Unit (GPU)

A graphics processing unit (GPU) is a computer chip that performs rapid mathematical calculations, primarily for the purpose of rendering images. A GPU may be found integrated with a central processing unit (CPU) on the same circuit, on a graphics card or in the motherboard of a personal computer or server. In the early days of computing, the CPU performed these calculations. As more graphics-intensive applications such as AutoCAD were developed; however, their demands put strain on the CPU and degraded performance. GPUs came about as a way to offload those tasks from CPUs, freeing up their processing power. NVIDIA, AMD, Intel and ARM are some of the major players in the GPU market. GPU vs. CPU A graphics processing unit is able to render images more quickly than a central processing unit because of its parallel processing architecture, which allows it to perform multiple calculations at the same time. A single CPU does not have this capability, although multi...