SlideShare a Scribd company logo
12 Factor
Applications
@ntschutta
ntschutta.io
Nathaniel Schutta
Ah “the cloud!”
So. Many. Options.
Microservices. Modular monoliths.
Container all the things?
What about serverless?
Functions. As a Service.
Did someone say Polycloud?
https://www.thoughtworks.com/radar/techniques/polycloud
What the heck are the 12
factors? Why 12? Why not 11?
Is *my* app 12 factor?
What should I do with my
heritage portfolio?
How do we make
sense of all this?!?
What is cloud
Native?
https://mobile.twitter.com/as_w/status/1090763452241534976
Applications designed to take
advantage of cloud computing.
Fundamentally about how we
create and deploy applications.
Cloud computing gives us
some very interesting abilities.
Scale up. Scale down. On demand.
Limitless compute.*
* Additional fees may apply.
Cloud native isn’t just an
architectural pattern.
Combination of practices,
techniques, technologies.
Agile development.
Continuous delivery.
Automation.
Containers.
Microservices.
Functions.
Changes our culture.
DevOps.
Infrastructure is a different
game today isn’t it?
We’ve seen this massive shift.
Servers used to be home grown.
Bespoke. Artisanal.
Spent days hand crafting them.
Treated them like pets…
Cloud-Native Fundamentals: An Introduction to 12-Factor Applications
Did whatever it took to keep
them healthy and happy.
Servers were a heavily
constrained resource.
They were really expensive!
Had to get our money’s worth…
Thus was born app servers.
Put as many apps as
possible on a server.
Maximize the return on investment.
But that has some
unintended side effects.
Shared resources.
One application’s bug could
take down multiple apps.
Coordinating changes hurts.
“Your app can’t get this feature
until all other apps are ready.”
Currency === 18 months of
freezes, testing, frustration.
Organizations ignored currency
issues…pain wasn’t “worth it”.
–Yoda
“Fear is the path to the dark side.
Fear leads to anger. Anger leads
to hate. Hate leads to suffering.”
#YodaOps
Move code from one
server to another…
Worked in dev…but not test.
Why?!?
The environments are
the same…right?
“Patches were applied in a
different order…”
Can I change careers?
Things started to change.
Servers became commodities.
Linux and Intel chips replaced
custom OS on specialized silicon.
https://mobile.twitter.com/linux/status/936877536780283905?lang=en
Prices dropped.
Servers were no longer the
constraining factor.
People costs eclipsed
hardware costs.
Heroku, AWS, Google App
Egine, Cloud Foundry, Azure.
Shared servers became a liability.
Treat them like cattle…when
they get sick, get a new one.
Cloud-Native Fundamentals: An Introduction to 12-Factor Applications
New abstractions.
Containers and PaaS
changed the game.
Package the app up with
everything it needs.
Move *that* to a
different environment.
Works in dev? You’re testing the
exact same thing in test.
So. Much. Win.
Your app needs a spiffy
new library? Go ahead!
It doesn’t impact any other app
because you are isolated.
Moves the value line.
Less “undifferentiated heavy lifting”.
Changes development.
Always be changing.
Run experiments. A/B testing.
Respond to business changes.
Deliver in days not months.
https://mobile.twitter.com/ntschutta/status/938109379995353088
Speed matters.
Disruption impacts every business.
Your industry is not immune.
Amazon Prime customers can
order from Whole Foods.
Some insurance companies
view Google as a competitor.
We’re all technology
companies today.
12 factors
Twelve Factor App.
https://12factor.net
Characteristics shared by
successful apps.
At least at Heroku.
1. One codebase in version control,
multiple deploys.
2. Explicitly define your dependencies.
3. Configuration must be separate from
the code.
4. Backing services are just attached
resources.
5. Build, release, run.
6. Stateless - share nothing.
7. Export services via port binding.
8. Scale via process.
9. Start up fast, shut down gracefully.
10.Dev/Prod parity.
11.Logs as event streams.
12.Admin tasks run as one off
processes.
I. One codebase in version
control, multiple deploys.
Version control isn’t
controversial. Right?!?
Sharing code? It better
be in a library then…
II. Explicitly define your
dependencies.
Do not rely on something just
“being there” on the server.
If you need it, declare it.
III. Configuration must be
separate from the code.
The things that vary from
environment to environment.
Could you open source
that app right now?
IV. Backing services are just
attached resources.
Should be trivial to swap out a
local database for a test db.
In other words, loose coupling.
V. Build, release, run.
Deployment pipeline anyone?
Build the executable…
Deploy the executable with the
proper configuration…
Launch the executable in a
given environment.
VI. Stateless - share nothing.
https://mobile.twitter.com/stuarthalloway/status/1134806008528809985
State must be stored via some
kind of backing service.
In other words, you cannot rely
on the filesystem or memory.
Recovery. Scaling.
VII. Export services via port binding.
App exports a port, listens for
incoming requests.
localhost for development,
load balancer for public facing.
VIII. Scale via process.
In other words, scale horizontally.
IX. Start up fast, shut
down gracefully.
Processes aren’t pets,
they are disposable.
Processes can be started (or
stopped) quickly and easily.
Ideally, start up is seconds.
Also can handle
unexpected terminations!
X. Dev/Prod parity.
From commit to production
should be hours…maybe days.
Definitely not weeks.
Developers should be involved
in deploys and prod ops.
Regions should be identical. Or
as close as possible to identical.
Backing services should be the
same in dev and prod.
Using one DB in dev and
another in prod invites pain.
XI. Logs as event streams.
Don’t write logs to the filesystem!
It won’t be there later…
Write to stdout.
Stream can be routed any
number of places.
And then consumed via a
wide variety of tools.
XII. Admin tasks run as
one off processes.
Database migrations for instance.
REPL for the win.
Run in an identical environment
to the long running processes.
Your legacy apps will
violate some factors.
Maybe all 12!
In general…
II. Explicitly define your
dependencies.
Probably one of the
harder ones to satisfy.
Do we really need this library?
“It works, don’t touch it.”
III. Configuration must be
separate from the code.
Many an app has
hardcoded credentials.
Hardcoded database connections.
VI. Stateless - share nothing.
Also can be challenging.
Many apps were designed
around a specific flow.
Page 2 left debris for Page 3!
“Just stash that in session”.
IX. Start up fast, shut
down gracefully.
Many apps take way
too long to start up…
Impacts health checks.
X. Dev/Prod parity.
Environments should be consistent!
Shorten code to prod cycle.
“It worked in test…”
Do your applications have to be
fully 12 factor compliant?
Nope.
Is it a good goal?
Sure.
But be pragmatic.
Certain attributes lessen the
advantages of cloud.
Long startup time hurts elastic
scaling & self healing.
Think of it as a continuum.
12 Factor Compliance
Benefits of Cloud Deployment
Developers also talk
about 15 factor apps.
aka Beyond the Twelve-Factor App.
https://content.pivotal.io/blog/beyond-the-twelve-factor-app
However you define it…
To maximize what
the cloud gives us…
Applications need to be
designed properly.
Legacy applications will fall short.
Opportunistically refactor!
Building greenfield?
Go cloud native!
Don’t build legacy.
Plan the journey
Before you start, figure
out where you are.
You need to assess the applications.
Some will be great
candidates, others…
We need to understand a few
things about our applications.
Technical characteristics.
What is the tech stack?
What version are we on?
How many users?
How many transactions per
second (estimate)?
What components do we use?
What 3rd party things does the
application use?
What are the data integrations?
What is the data access technology?
Do we use any internal frameworks?
Are there any batch jobs?
Do we have CI/CD? What are
we using to build the apps?
What do we have for test coverage?
We need to assess the
refactoring effort.
Look for certain red flags.
Vendor dependencies.
Writing to the file system.
Reading from the file system.
Long startup times.
Long shut down times.
Non-HTTP protocols.
Hard coded configuration.
Container based shared state.
Distributed transactions.
Evaluate your applications for
12 Factors compatibility.
Again, it is a sliding scale.
How far out of alignment is the app?
This effort requires
application expertise.
And it will take time.
At least a few hours per.
Consider building a little
application for all the data.
Excel is not an application
platform. Cough.
Unless you have a small portfolio…
Assessments will bucket
your applications.
Low/Medium/High.
Or red/yellow/green.
Whatever works!
“Cutoffs” likely arbitrary.
Sanity check it.
What is the business value
of the application?
Consider the life cycle
of the application.
Is it strategic?
Is it something we’re
going to invest in?
Or is it going to be retired soon?
Retirement isn’t a hard no though.
*When* matters. A lot.
“When I started, this app
was marked sunset…”
That was 25 years ago. Still running.
If it is going away in a few
months…not worth it.
Going to be around for a
few years, probably is.
Now we need to do some planning.
What is your desired end state?
Cloud native? Just get it
running on cloud?
Legacy apps will require refactoring.
How long does it take to
forklift an application?
https://blog.pivotal.io/pivotal-cloud-foundry/features/the-forklifted-application
https://twitter.com/KentBeck/status/596007846887628801
Strongly recommend
a pilot app or two.
Get a feel for it.
Usually a few weeks or so.
Ask the experts.
https://pivotal.io/application-transformation
Consider staffing up a “lab”
team with expertise.
Help teams migrate.
Should *pair* with the
application area.
Need to grow the skills.
Create a roadmap.
When can the applications move?
It doesn’t have to be
the entire application!
Some deployable units will
be easy, others hard.
Move what you can.
Again, the terminology
can be challenging…
Look to opportunistically
migrate what you can.
But have a rough idea of when.
Does that satisfy your stakeholders?
What can you do to
accelerate the plan?
Good luck!
Nathaniel T. Schutta
@ntschutta
ntschutta.io
Thanks!
I’m a Software
Architect,
Now What?
with Nate Shutta
Modeling for
Software
Architects
with Nate Shutta
Presentation
Patterns
with Neal Ford & Nate Schutta
Cloud-Native Fundamentals: An Introduction to 12-Factor Applications

More Related Content

What's hot (20)

PDF
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Edureka!
 
PPTX
Centralized Logging System Using ELK Stack
Rohit Sharma
 
PDF
Understanding MicroSERVICE Architecture with Java & Spring Boot
Kashif Ali Siddiqui
 
PDF
Clean Infrastructure as Code
QAware GmbH
 
PDF
Kubernetes + Python = ❤ - Cloud Native Prague
Henning Jacobs
 
PDF
CD using ArgoCD(KnolX).pdf
Knoldus Inc.
 
PPTX
Continuous delivery and deployment on AWS
Shiva Narayanaswamy
 
PDF
Data-Streaming at DKV
confluent
 
PPTX
Kubernetes CI/CD with Helm
Adnan Abdulhussein
 
PDF
Best Practices for Streaming IoT Data with MQTT and Apache Kafka
Kai Wähner
 
PDF
An Architectural Deep Dive With Kubernetes And Containers Powerpoint Presenta...
SlideTeam
 
PDF
Securing the Elastic Stack for free
Elasticsearch
 
PDF
Helm - Application deployment management for Kubernetes
Alexei Ledenev
 
PPTX
Stream processing IoT time series data with Kafka & InfluxDB | Al Sargent, In...
HostedbyConfluent
 
PDF
Using Kafka: Anatomy of the Flowable event registry
Flowable
 
PPTX
Difference between .net core and .net framework
Ansi Bytecode
 
PDF
5 Factors When Selecting a High Performance, Low Latency Database
ScyllaDB
 
PPTX
Oracle OCI APIs and SDK
Phil Wilkins
 
PPTX
Domain Driven Design: Zero to Hero
Fabrício Rissetto
 
PDF
Dockers and kubernetes
Dr Ganesh Iyer
 
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Edureka!
 
Centralized Logging System Using ELK Stack
Rohit Sharma
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Kashif Ali Siddiqui
 
Clean Infrastructure as Code
QAware GmbH
 
Kubernetes + Python = ❤ - Cloud Native Prague
Henning Jacobs
 
CD using ArgoCD(KnolX).pdf
Knoldus Inc.
 
Continuous delivery and deployment on AWS
Shiva Narayanaswamy
 
Data-Streaming at DKV
confluent
 
Kubernetes CI/CD with Helm
Adnan Abdulhussein
 
Best Practices for Streaming IoT Data with MQTT and Apache Kafka
Kai Wähner
 
An Architectural Deep Dive With Kubernetes And Containers Powerpoint Presenta...
SlideTeam
 
Securing the Elastic Stack for free
Elasticsearch
 
Helm - Application deployment management for Kubernetes
Alexei Ledenev
 
Stream processing IoT time series data with Kafka & InfluxDB | Al Sargent, In...
HostedbyConfluent
 
Using Kafka: Anatomy of the Flowable event registry
Flowable
 
Difference between .net core and .net framework
Ansi Bytecode
 
5 Factors When Selecting a High Performance, Low Latency Database
ScyllaDB
 
Oracle OCI APIs and SDK
Phil Wilkins
 
Domain Driven Design: Zero to Hero
Fabrício Rissetto
 
Dockers and kubernetes
Dr Ganesh Iyer
 

Similar to Cloud-Native Fundamentals: An Introduction to 12-Factor Applications (20)

PDF
Evolving to Cloud-Native - Nate Schutta 1/2
VMware Tanzu
 
PDF
Evolving to Cloud-Native - Nate Schutta (1/2)
VMware Tanzu
 
PDF
Evolving to Cloud-Native - Nate Schutta (2/2)
VMware Tanzu
 
PDF
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
Redis Labs
 
PDF
Evolving to Cloud-Native - Nate Schutta 2/2
VMware Tanzu
 
PDF
The Twelve Factor App
Pablo Fullana
 
PPTX
Intro to Cloud Native _ v1.0en (2021/01)
Young Suk Ahn Park
 
PDF
Spring Boot & Spring Cloud on PAS- Nate Schutta (1/2)
VMware Tanzu
 
PDF
Evolving to Cloud-Native - Anand Rao
VMware Tanzu
 
PDF
Spring, Functions, Serverless and You
VMware Tanzu
 
PPTX
JavaOne 2016 "Java, Microservices, Cloud and Containers"
Daniel Bryant
 
PPTX
Microservices
Abdelrahman Badreldeen
 
PDF
The Future of Cloud Innovation, featuring Adrian Cockcroft
Dun & Bradstreet Cloud Innovation Center
 
PPTX
From Duke of DevOps to Queen of Chaos - Api days 2018
Christophe Rochefolle
 
PPTX
Twelve Factor - Designing for Change
Eric Wyles
 
PDF
Enterprise software needs a PaaS
hmalphettes
 
PDF
Intalio create and cloudfoudry - short
hmalphettes
 
PPTX
The twelve factor app
Ravi Okade
 
PPTX
Ensuring Cloud Native Success: The Greenfield Journey
VMware Tanzu
 
PDF
Atagg2015 Where testing is moving in agile cloud world!
Agile Testing Alliance
 
Evolving to Cloud-Native - Nate Schutta 1/2
VMware Tanzu
 
Evolving to Cloud-Native - Nate Schutta (1/2)
VMware Tanzu
 
Evolving to Cloud-Native - Nate Schutta (2/2)
VMware Tanzu
 
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
Redis Labs
 
Evolving to Cloud-Native - Nate Schutta 2/2
VMware Tanzu
 
The Twelve Factor App
Pablo Fullana
 
Intro to Cloud Native _ v1.0en (2021/01)
Young Suk Ahn Park
 
Spring Boot & Spring Cloud on PAS- Nate Schutta (1/2)
VMware Tanzu
 
Evolving to Cloud-Native - Anand Rao
VMware Tanzu
 
Spring, Functions, Serverless and You
VMware Tanzu
 
JavaOne 2016 "Java, Microservices, Cloud and Containers"
Daniel Bryant
 
Microservices
Abdelrahman Badreldeen
 
The Future of Cloud Innovation, featuring Adrian Cockcroft
Dun & Bradstreet Cloud Innovation Center
 
From Duke of DevOps to Queen of Chaos - Api days 2018
Christophe Rochefolle
 
Twelve Factor - Designing for Change
Eric Wyles
 
Enterprise software needs a PaaS
hmalphettes
 
Intalio create and cloudfoudry - short
hmalphettes
 
The twelve factor app
Ravi Okade
 
Ensuring Cloud Native Success: The Greenfield Journey
VMware Tanzu
 
Atagg2015 Where testing is moving in agile cloud world!
Agile Testing Alliance
 
Ad

More from VMware Tanzu (20)

PDF
Spring into AI presented by Dan Vega 5/14
VMware Tanzu
 
PDF
What AI Means For Your Product Strategy And What To Do About It
VMware Tanzu
 
PDF
Make the Right Thing the Obvious Thing at Cardinal Health 2023
VMware Tanzu
 
PPTX
Enhancing DevEx and Simplifying Operations at Scale
VMware Tanzu
 
PDF
Spring Update | July 2023
VMware Tanzu
 
PPTX
Platforms, Platform Engineering, & Platform as a Product
VMware Tanzu
 
PPTX
Building Cloud Ready Apps
VMware Tanzu
 
PDF
Spring Boot 3 And Beyond
VMware Tanzu
 
PDF
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
VMware Tanzu
 
PDF
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
VMware Tanzu
 
PDF
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
VMware Tanzu
 
PPTX
tanzu_developer_connect.pptx
VMware Tanzu
 
PDF
Tanzu Virtual Developer Connect Workshop - French
VMware Tanzu
 
PDF
Tanzu Developer Connect Workshop - English
VMware Tanzu
 
PDF
Virtual Developer Connect Workshop - English
VMware Tanzu
 
PDF
Tanzu Developer Connect - French
VMware Tanzu
 
PDF
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
VMware Tanzu
 
PDF
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
VMware Tanzu
 
PDF
SpringOne Tour: The Influential Software Engineer
VMware Tanzu
 
PDF
SpringOne Tour: Domain-Driven Design: Theory vs Practice
VMware Tanzu
 
Spring into AI presented by Dan Vega 5/14
VMware Tanzu
 
What AI Means For Your Product Strategy And What To Do About It
VMware Tanzu
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
VMware Tanzu
 
Enhancing DevEx and Simplifying Operations at Scale
VMware Tanzu
 
Spring Update | July 2023
VMware Tanzu
 
Platforms, Platform Engineering, & Platform as a Product
VMware Tanzu
 
Building Cloud Ready Apps
VMware Tanzu
 
Spring Boot 3 And Beyond
VMware Tanzu
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
VMware Tanzu
 
tanzu_developer_connect.pptx
VMware Tanzu
 
Tanzu Virtual Developer Connect Workshop - French
VMware Tanzu
 
Tanzu Developer Connect Workshop - English
VMware Tanzu
 
Virtual Developer Connect Workshop - English
VMware Tanzu
 
Tanzu Developer Connect - French
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
VMware Tanzu
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
VMware Tanzu
 
SpringOne Tour: The Influential Software Engineer
VMware Tanzu
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
VMware Tanzu
 
Ad

Recently uploaded (20)

PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 

Cloud-Native Fundamentals: An Introduction to 12-Factor Applications