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

Understanding the Evolution: AI, ML, Deep Learning, and Gen AI

In the ever-evolving landscape of artificial intelligence (AI) and machine learning (ML), one of the most intriguing advancements is the emergence of General AI (Gen AI). To grasp its significance, it's essential to first distinguish between these interconnected but distinct technologies. AI, ML, and Deep Learning: The Building Blocks Artificial Intelligence refers to the simulation of human intelligence in machines that are programmed to think like humans and mimic their actions. Machine Learning, a subset of AI, empowers machines to learn from data and improve over time without explicit programming. Deep Learning, a specialized subset of ML, involves neural networks with many layers (hence "deep"), capable of learning intricate patterns from vast amounts of data. Enter General AI (Gen AI): Unraveling the Next Frontier Unlike traditional AI systems that excel in specific tasks (narrow AI), General AI aims to replicate human cognitive abilities across various domains. I...

Normalization of Database

Database Normalisation is a technique of organizing the data in the database. Normalization is a systematic approach of decomposing tables to eliminate data redundancy and undesirable characteristics like Insertion, Update and Deletion Anamolies. It is a multi-step process that puts data into tabular form by removing duplicated data from the relation tables. Normalization is used for mainly two purpose, Eliminating reduntant(useless) data. Ensuring data dependencies make sense i.e data is logically stored. Problem Without Normalization Without Normalization, it becomes difficult to handle and update the database, without facing data loss. Insertion, Updation and Deletion Anamolies are very frequent if Database is not Normalized. To understand these anomalies let us take an example of  Student  table. S_id S_Name S_Address Subject_opted 401 Adam Noida Bio 402 Alex Panipat Maths 403 Stuart Jammu Maths 404 Adam Noida Physics Updation Anamoly :  To upda...

How to deal with a toxic working environment

Handling a toxic working environment can be challenging, but there are steps you can take to address the situation and improve your experience at work: Recognize the Signs : Identify the specific behaviors or situations that contribute to the toxicity in your workplace. This could include bullying, harassment, micromanagement, negativity, or lack of support from management. Maintain Boundaries : Set boundaries to protect your mental and emotional well-being. This may involve limiting interactions with toxic individuals, avoiding gossip or negative conversations, and prioritizing self-care outside of work. Seek Support : Reach out to trusted colleagues, friends, or family members for support and advice. Sharing your experiences with others can help you feel less isolated and provide perspective on the situation. Document Incidents : Keep a record of any incidents or behaviors that contribute to the toxic environment, including dates, times, and specific details. This documentation may b...