SlideShare a Scribd company logo
Presented By: Girish Chandra Bharti (Sr. Software Consultant @ Knoldus)
Twelve Factor App with
lagom
Agenda
01 Introduction of twelve factor app
02 Explanation of individual
principle
03 Question and answer
session
04 References
60
6
Twelve factor app principle
●Methodology for building software as a
service application and these best practices
are designed to enable applications to be built
with portability and resilience when
deployed to the web.
●It was drafted by developers at Heroku and
was first presented by Adam Wiggins circa
2011.
Twelve factor app principle
● I. Codebase
● II. Dependencies
● III. Config
● IV. Backing services
● V. Build, release, run
● VI. Processes
● VII. Port binding
● VIII. Concurrency
● IX. Disposability
● X. Dev/prod parity
● XI. Logs
● XII. Admin processes
The 12 factors
I. Codebase
● Revision control in plase.
● If there are multiple codebases, it’s not an app – it’s a distributed
system.
● Each component in a distributed system is an app, and each can
individually comply with twelve-factor.
● Multiple apps sharing the same code is a violation of
twelve-factor.
● The solution here is to factor shared code into libraries which can
be included through the dependency manager.
One codebase tracked in revision control, many deploys
I. Codebase
● Lagom follows this principle partially as it allows
single codebase for application but also multiple
services sharing the same codebase.
● That can be avoided by shared libraries.
Lagom with single codebase
II. Dependencies
● It declares all dependencies, completely and
exactly, via a dependency declaration manifest
● Twelve-factor apps also do not rely on the
implicit existence of any system tools (eg curl).
Explicitly declare and isolate dependencies
II. Dependencies
● Lagom follows this principle by allowing explicit
dependency declaration using build.sbt (scala).
Lagom dependency handling
III. Config
● Configurables:
- Resource handles to the database, Memcached, and other
backing services
- Credentials to external services such as Amazon S3 or Twitter
- Per-deploy values such as the canonical hostname for the
deploy
● Storing config as constants in the code is a violation
of twelve-factor
Store config in the environment
IV. Backing services
● A backing service is any service the app consumes over the network
as part of its normal operation (mysql, couchDB, kafka)
● The code for a twelve-factor app makes no distinction between
local and third party services.
● To the app, both are attached resources, accessed via a URL or other
locator/credentials stored in the config.
● A deploy of the twelve-factor app should be able to swap out a local
MySQL database with one managed by a third party (such as Amazon
RDS) without any changes to the app’s code.
Treat backing services as attached resources
V. Build, release, run
● The twelve-factor app uses strict separation
between the build, release, and run stages.
Strictly separate build and run stages
V. Build, release, run
● Lagom app deployment:
1. Build (Bundle)
2. Config (RP Tool)
3 Deployment (Marathon)
Lagom supports for build, release, and run stages.
VI. Processes
● Twelve-factor processes are stateless and share-nothing.
● Any data that needs to persist must be stored in a stateful
backing service, typically a database.
● The twelve-factor app never assumes that anything cached
in memory or on disk will be available on a future request or job
● Sticky sessions (user session) are a violation of twelve-factor
and should never be used or relied upon.
Execute the app as one or more stateless processes
VI. Processes
● Lagom supports event sourcing to handle stateless processes
By writing event into third party database like Cassandra
(by default)
● Distributed pub-sub
● CRDTS (Conflict-free replicated data type for future)
Process model of lagom
VII. Port binding
● Port-binding approach means that one app can become the
backing service for another app, by providing the URL to the
backing app as a resource handle in the config for the
consuming app.
● The twelve-factor app is completely self-contained and does
not rely on runtime injection of a webserver into the execution
environment to create a web-facing service
● The web app exports HTTP as a service by binding to a port,
and listening to requests coming in on that port.
Export services via port binding
● Lagom allows to create microservices and let other services
consume them using port bindings.
● To access them from outside we can make the rest
rest calls
VII. Port binding
Port binding in lagom
● Using this model, the developer can architect their app to
Handle diverse workloads by assigning each type of work
to a process type.
● For example, HTTP requests can be handled by a web
process, and long-running background tasks handled
by a worker process
VIII. Concurrency
Scale out via the process model
● Supports CQRS for handling reads and writes
● Supports different dispatcher dispatchers
and execution contexts
VIII. Concurrency
Scale out via the process model
● The twelve-factor app processes are disposable,
meaning they can be started or stopped at a
moment’s notice.
● Processes should strive to minimize startup time.
● Processes shutdown gracefully when they receive
a shutdown signal from the process manager
IX. Disposability
Maximize robustness with fast startup and graceful shutdown
● Supports fast startup while deploying the application however
build takes time to finish (On local might take time to start the
application)
● Support graceful shutdown for rest apis and background processes
● Supports graceful shutdown for persistence entities
● User defined actors can be designed to support graceful shutdown
IX. Disposability
Fast startup and graceful shutdown in lagom
● The twelve-factor app is designed for continuous
deployment by keeping the gap between
development and production small.
● Recommendations:
- Make the time gap small
- Make the personnel gap small
- Make the tools gap small
X. Dev/prod parity
Keep development, staging, and production as similar as possible
● Logs are the stream of aggregated, time-ordered events collected
from the output streams of all running processes and backing services
Advantages:
● Finding specific events in the past.
● Large-scale graphing of trends
● Active alerting
XI. Logs
Treat logs as event streams
● Additional administrative or maintenance tasks for the app:
- Running database migrations
- Running a console
- Running one-time scripts
● One-off admin processes should run in an identical
environment as the regular long-running processes of the app
XII. Admin processes
Run admin/management tasks as one-off processes
References
https://12factor.net
https://www.lagomframework.com/
https://blog.knoldus.com/the-twelve-factor-app-principle-with-lagom-framework/
Thank You !

More Related Content

PDF
Modernizing Your Enterprise Application Architecture with Microservices and A...
PDF
12 factor app
PDF
Beyond 12 Factor - Developing Cloud Native Applications
PDF
12 FACTOR APP WITH DOCKER
PDF
Dipping Your Toes Into Cloud Native Application Development
PPTX
12 factor app an introduction
PDF
Containerizing Traditional Applications
PDF
Evolving to Cloud-Native - Anand Rao
Modernizing Your Enterprise Application Architecture with Microservices and A...
12 factor app
Beyond 12 Factor - Developing Cloud Native Applications
12 FACTOR APP WITH DOCKER
Dipping Your Toes Into Cloud Native Application Development
12 factor app an introduction
Containerizing Traditional Applications
Evolving to Cloud-Native - Anand Rao

What's hot (20)

PPTX
12 factor app
PDF
Pivotal Container Service il modo più semplice per gestire Kubernetes in azie...
PDF
Orchestrating Cloud-Native and Traditional Application Architectures
PDF
The 12 Factors for Building Cloud-Native Software
PPTX
Mule soft meetup_chandigarh_#7_25_sept_2021
PDF
Building Cloud Native Architectures with Spring
PPTX
[Konveyor] migrate and modernize your application portfolio to kubernetes wit...
PPTX
Cloud Native Infrastructure Automation
PDF
Sicurezza integrate nella tua piattaforma Cloud-Native con VMware NSX (Pivota...
PDF
Multi-cloud Container Management for vRealize Automation
PPTX
MuleSoft Meetup Adelaide 7th April 2021
PDF
Lo Scenario Cloud-Native (Pivotal Cloud-Native Workshop: Milan)
PDF
MuleSoft Meetup #2 in Kyiv, Ukraine - What is special about MuleSoft Catalyst™?
PDF
Cloud Event Driven Architectures with Spring Cloud Stream 2.0 - Oleg Zhurakousky
PPTX
The Cloud Native Journey
PPTX
MuleSoft Meetup Roma - Processi di Automazione su CloudHub
PDF
Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...
PPTX
Migrating from oracle soa suite to microservices on kubernetes
PDF
Pivotal Cloud Foundry 1.10: First Look - Windows at Scale, Network Isolation
PPTX
Modern application development with heroku
12 factor app
Pivotal Container Service il modo più semplice per gestire Kubernetes in azie...
Orchestrating Cloud-Native and Traditional Application Architectures
The 12 Factors for Building Cloud-Native Software
Mule soft meetup_chandigarh_#7_25_sept_2021
Building Cloud Native Architectures with Spring
[Konveyor] migrate and modernize your application portfolio to kubernetes wit...
Cloud Native Infrastructure Automation
Sicurezza integrate nella tua piattaforma Cloud-Native con VMware NSX (Pivota...
Multi-cloud Container Management for vRealize Automation
MuleSoft Meetup Adelaide 7th April 2021
Lo Scenario Cloud-Native (Pivotal Cloud-Native Workshop: Milan)
MuleSoft Meetup #2 in Kyiv, Ukraine - What is special about MuleSoft Catalyst™?
Cloud Event Driven Architectures with Spring Cloud Stream 2.0 - Oleg Zhurakousky
The Cloud Native Journey
MuleSoft Meetup Roma - Processi di Automazione su CloudHub
Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...
Migrating from oracle soa suite to microservices on kubernetes
Pivotal Cloud Foundry 1.10: First Look - Windows at Scale, Network Isolation
Modern application development with heroku
Ad

Similar to Twelve Factor App With Lagom (20)

PPTX
Twelve-Factor application pattern with Spring Framework
PDF
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
PPTX
Breaking the Monolith
PPTX
Nyc mule soft_meetup_13_march_2021
PDF
PPTX
Information on Cloud-native Applications
PDF
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
PDF
Adopting the Cloud
PDF
Twelve factor apps
PDF
The Twelve Factor App
PPTX
What serverless means for enterprise apps
PDF
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
PPTX
A09 - Microservices.pptx
PPTX
08 hopex v next service fabric
PPTX
Microservices
PPTX
AppDev with Microservices
PDF
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
PDF
Using IBM DataPower for rapid security and application integration with an op...
PPTX
Microservice Workshop Hands On
PDF
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
Twelve-Factor application pattern with Spring Framework
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
Breaking the Monolith
Nyc mule soft_meetup_13_march_2021
Information on Cloud-native Applications
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
Adopting the Cloud
Twelve factor apps
The Twelve Factor App
What serverless means for enterprise apps
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
A09 - Microservices.pptx
08 hopex v next service fabric
Microservices
AppDev with Microservices
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
Using IBM DataPower for rapid security and application integration with an op...
Microservice Workshop Hands On
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
Ad

More from Knoldus Inc. (20)

PPTX
Angular Hydration Presentation (FrontEnd)
PPTX
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
PPTX
Self-Healing Test Automation Framework - Healenium
PPTX
Kanban Metrics Presentation (Project Management)
PPTX
Java 17 features and implementation.pptx
PPTX
Chaos Mesh Introducing Chaos in Kubernetes
PPTX
GraalVM - A Step Ahead of JVM Presentation
PPTX
Nomad by HashiCorp Presentation (DevOps)
PPTX
Nomad by HashiCorp Presentation (DevOps)
PPTX
DAPR - Distributed Application Runtime Presentation
PPTX
Introduction to Azure Virtual WAN Presentation
PPTX
Introduction to Argo Rollouts Presentation
PPTX
Intro to Azure Container App Presentation
PPTX
Insights Unveiled Test Reporting and Observability Excellence
PPTX
Introduction to Splunk Presentation (DevOps)
PPTX
Code Camp - Data Profiling and Quality Analysis Framework
PPTX
AWS: Messaging Services in AWS Presentation
PPTX
Amazon Cognito: A Primer on Authentication and Authorization
PPTX
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
PPTX
Managing State & HTTP Requests In Ionic.
Angular Hydration Presentation (FrontEnd)
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
Self-Healing Test Automation Framework - Healenium
Kanban Metrics Presentation (Project Management)
Java 17 features and implementation.pptx
Chaos Mesh Introducing Chaos in Kubernetes
GraalVM - A Step Ahead of JVM Presentation
Nomad by HashiCorp Presentation (DevOps)
Nomad by HashiCorp Presentation (DevOps)
DAPR - Distributed Application Runtime Presentation
Introduction to Azure Virtual WAN Presentation
Introduction to Argo Rollouts Presentation
Intro to Azure Container App Presentation
Insights Unveiled Test Reporting and Observability Excellence
Introduction to Splunk Presentation (DevOps)
Code Camp - Data Profiling and Quality Analysis Framework
AWS: Messaging Services in AWS Presentation
Amazon Cognito: A Primer on Authentication and Authorization
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
Managing State & HTTP Requests In Ionic.

Recently uploaded (20)

PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Understanding Forklifts - TECH EHS Solution
PDF
top salesforce developer skills in 2025.pdf
PDF
System and Network Administration Chapter 2
PPTX
L1 - Introduction to python Backend.pptx
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
System and Network Administraation Chapter 3
PPTX
Essential Infomation Tech presentation.pptx
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Nekopoi APK 2025 free lastest update
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
medical staffing services at VALiNTRY
PPTX
Reimagine Home Health with the Power of Agentic AI​
Softaken Excel to vCard Converter Software.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PTS Company Brochure 2025 (1).pdf.......
Understanding Forklifts - TECH EHS Solution
top salesforce developer skills in 2025.pdf
System and Network Administration Chapter 2
L1 - Introduction to python Backend.pptx
How Creative Agencies Leverage Project Management Software.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Odoo Companies in India – Driving Business Transformation.pdf
Design an Analysis of Algorithms II-SECS-1021-03
System and Network Administraation Chapter 3
Essential Infomation Tech presentation.pptx
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Nekopoi APK 2025 free lastest update
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
medical staffing services at VALiNTRY
Reimagine Home Health with the Power of Agentic AI​

Twelve Factor App With Lagom

  • 1. Presented By: Girish Chandra Bharti (Sr. Software Consultant @ Knoldus) Twelve Factor App with lagom
  • 2. Agenda 01 Introduction of twelve factor app 02 Explanation of individual principle 03 Question and answer session 04 References 60 6
  • 3. Twelve factor app principle ●Methodology for building software as a service application and these best practices are designed to enable applications to be built with portability and resilience when deployed to the web. ●It was drafted by developers at Heroku and was first presented by Adam Wiggins circa 2011.
  • 4. Twelve factor app principle ● I. Codebase ● II. Dependencies ● III. Config ● IV. Backing services ● V. Build, release, run ● VI. Processes ● VII. Port binding ● VIII. Concurrency ● IX. Disposability ● X. Dev/prod parity ● XI. Logs ● XII. Admin processes The 12 factors
  • 5. I. Codebase ● Revision control in plase. ● If there are multiple codebases, it’s not an app – it’s a distributed system. ● Each component in a distributed system is an app, and each can individually comply with twelve-factor. ● Multiple apps sharing the same code is a violation of twelve-factor. ● The solution here is to factor shared code into libraries which can be included through the dependency manager. One codebase tracked in revision control, many deploys
  • 6. I. Codebase ● Lagom follows this principle partially as it allows single codebase for application but also multiple services sharing the same codebase. ● That can be avoided by shared libraries. Lagom with single codebase
  • 7. II. Dependencies ● It declares all dependencies, completely and exactly, via a dependency declaration manifest ● Twelve-factor apps also do not rely on the implicit existence of any system tools (eg curl). Explicitly declare and isolate dependencies
  • 8. II. Dependencies ● Lagom follows this principle by allowing explicit dependency declaration using build.sbt (scala). Lagom dependency handling
  • 9. III. Config ● Configurables: - Resource handles to the database, Memcached, and other backing services - Credentials to external services such as Amazon S3 or Twitter - Per-deploy values such as the canonical hostname for the deploy ● Storing config as constants in the code is a violation of twelve-factor Store config in the environment
  • 10. IV. Backing services ● A backing service is any service the app consumes over the network as part of its normal operation (mysql, couchDB, kafka) ● The code for a twelve-factor app makes no distinction between local and third party services. ● To the app, both are attached resources, accessed via a URL or other locator/credentials stored in the config. ● A deploy of the twelve-factor app should be able to swap out a local MySQL database with one managed by a third party (such as Amazon RDS) without any changes to the app’s code. Treat backing services as attached resources
  • 11. V. Build, release, run ● The twelve-factor app uses strict separation between the build, release, and run stages. Strictly separate build and run stages
  • 12. V. Build, release, run ● Lagom app deployment: 1. Build (Bundle) 2. Config (RP Tool) 3 Deployment (Marathon) Lagom supports for build, release, and run stages.
  • 13. VI. Processes ● Twelve-factor processes are stateless and share-nothing. ● Any data that needs to persist must be stored in a stateful backing service, typically a database. ● The twelve-factor app never assumes that anything cached in memory or on disk will be available on a future request or job ● Sticky sessions (user session) are a violation of twelve-factor and should never be used or relied upon. Execute the app as one or more stateless processes
  • 14. VI. Processes ● Lagom supports event sourcing to handle stateless processes By writing event into third party database like Cassandra (by default) ● Distributed pub-sub ● CRDTS (Conflict-free replicated data type for future) Process model of lagom
  • 15. VII. Port binding ● Port-binding approach means that one app can become the backing service for another app, by providing the URL to the backing app as a resource handle in the config for the consuming app. ● The twelve-factor app is completely self-contained and does not rely on runtime injection of a webserver into the execution environment to create a web-facing service ● The web app exports HTTP as a service by binding to a port, and listening to requests coming in on that port. Export services via port binding
  • 16. ● Lagom allows to create microservices and let other services consume them using port bindings. ● To access them from outside we can make the rest rest calls VII. Port binding Port binding in lagom
  • 17. ● Using this model, the developer can architect their app to Handle diverse workloads by assigning each type of work to a process type. ● For example, HTTP requests can be handled by a web process, and long-running background tasks handled by a worker process VIII. Concurrency Scale out via the process model
  • 18. ● Supports CQRS for handling reads and writes ● Supports different dispatcher dispatchers and execution contexts VIII. Concurrency Scale out via the process model
  • 19. ● The twelve-factor app processes are disposable, meaning they can be started or stopped at a moment’s notice. ● Processes should strive to minimize startup time. ● Processes shutdown gracefully when they receive a shutdown signal from the process manager IX. Disposability Maximize robustness with fast startup and graceful shutdown
  • 20. ● Supports fast startup while deploying the application however build takes time to finish (On local might take time to start the application) ● Support graceful shutdown for rest apis and background processes ● Supports graceful shutdown for persistence entities ● User defined actors can be designed to support graceful shutdown IX. Disposability Fast startup and graceful shutdown in lagom
  • 21. ● The twelve-factor app is designed for continuous deployment by keeping the gap between development and production small. ● Recommendations: - Make the time gap small - Make the personnel gap small - Make the tools gap small X. Dev/prod parity Keep development, staging, and production as similar as possible
  • 22. ● Logs are the stream of aggregated, time-ordered events collected from the output streams of all running processes and backing services Advantages: ● Finding specific events in the past. ● Large-scale graphing of trends ● Active alerting XI. Logs Treat logs as event streams
  • 23. ● Additional administrative or maintenance tasks for the app: - Running database migrations - Running a console - Running one-time scripts ● One-off admin processes should run in an identical environment as the regular long-running processes of the app XII. Admin processes Run admin/management tasks as one-off processes

Editor's Notes

  • #2: Note: First “Right Click” on the Gradient background, go to “Order” option and “Send it to Back”, then insert your picture into “Image Placeholder”, “Right Click” on the picture and again go to “Order” option and “Send it to Back” to get the “Gradient” effect. <number>
  • #6: Revision control in plase. If there are multiple codebases, it’s not an app – it’s a distributedsystem. Each component in a distributed system is an app, and each canindividually comply with twelve-factor. Multiple apps sharing the same code is a violation of twelve-factor. The solution here is to factor shared code into libraries which can be included through the dependency manager.
  • #7: Lagom follows this principle partially as it allowssingle codebase for application but also multipleservices sharing the same codebase. That can be avoided by shared libraries.
  • #8: It declares all dependencies, completely and exactly, via a dependency declaration manifest Twelve-factor apps also do not rely on theimplicit existence of any system tools (eg curl).
  • #9: Lagom follows this principle by allowing explicitdependency declaration using build.sbt (scala).
  • #10: Configurables: - Resource handles to the database, Memcached, and other backing services - Credentials to external services such as Amazon S3 or Twitter - Per-deploy values such as the canonical hostname for the deploy Storing config as constants in the code is a violation of twelve-factor
  • #11: A backing service is any service the app consumes over the networkas part of its normal operation (mysql, couchDB, kafka) The code for a twelve-factor app makes no distinction betweenlocal and third party services. To the app, both are attached resources, accessed via a URL or otherlocator/credentials stored in the config. A deploy of the twelve-factor app should be able to swap out a localMySQL database with one managed by a third party (such as AmazonRDS) without any changes to the app’s code.
  • #12: The twelve-factor app uses strict separationbetween the build, release, and run stages.
  • #13: Lagom app deployment:1. Build (Bundle)2. Config (RP Tool)3 Deployment (Marathon)
  • #14: Twelve-factor processes are stateless and share-nothing. Any data that needs to persist must be stored in a statefulbacking service, typically a database. The twelve-factor app never assumes that anything cachedin memory or on disk will be available on a future request or job Sticky sessions (user session) are a violation of twelve-factorand should never be used or relied upon.
  • #15: Lagom supports event sourcing to handle stateless processesBy writing event into third party database like Cassandra (by default) Distributed pub-sub CRDTS (Conflict-free replicated data type for future)
  • #16: Port-binding approach means that one app can become the backing service for another app, by providing the URL to the backing app as a resource handle in the config for the consuming app. The twelve-factor app is completely self-contained and doesnot rely on runtime injection of a webserver into the executionenvironment to create a web-facing service The web app exports HTTP as a service by binding to a port,and listening to requests coming in on that port.
  • #17: Lagom allows to create microservices and let other servicesconsume them using port bindings. To access them from outside we can make the rest rest calls
  • #18: In the twelve-factor app, processes are a first class citizen. Using this model, the developer can architect their app to Handle diverse workloads by assigning each type of work to a process type. For example, HTTP requests can be handled by a web process, and long-running background tasks handled by a worker process
  • #19: Supports CQRS for handling reads and writes Supports different dispatcher configurations for various actors Supports various execution contexts
  • #20: The twelve-factor app processes are disposable, meaningthey can be started or stopped at a moment’s notice. Processes should strive to minimize startup time. Processes shutdown gracefully when they receive a shutdownsignal from the process manager For a web process, graceful shutdown is achieved by ceasing tolisten on the service port (thereby refusing any new requests),allowing any current requests to finish, and then exiting For a worker process, graceful shutdown is achieved by returningthe current job to the work queue
  • #21: Supports fast startup while deploying the application howeverbuild takes time to finish (On local might take time to start theapplication) Support graceful shutdown for rest apis and background processes Supports graceful shutdown for persistence entities User defined actors can be designed to support graceful shutdown
  • #22: The twelve-factor app is designed for continuous deployment bykeeping the gap between development and production small. Recommendations: Make the time gap small: a developer may write code and haveit deployed hours or even just minutes later. Make the personnel gap small: developers who wrote code areclosely involved in deploying it and watching its behavior inproduction. Make the tools gap small: keep development and production assimilar as possible.
  • #23: Logs are the stream of aggregated, time-ordered events collectedfrom the output streams of all running processes and backing services Advantages: Finding specific events in the past. Large-scale graphing of trends (such as requests per minute). Active alerting according to user-defined heuristics (such as an alertwhen the quantity of errors per minute exceeds a certain threshold).
  • #24: Additional administrative or maintenance tasks for the app: - Running database migrations - Running a console - Running one-time scripts One-off admin processes should run in an identical environment as the regular long-running processes of the app
  • #26: <number>