Skip Navigation
Show nav
Heroku Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
View categories

Categories

  • Heroku Architecture
    • Dynos (app containers)
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Command Line
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery
    • Continuous Integration
  • Language Support
    • Node.js
    • Ruby
      • Working with Bundler
      • Rails Support
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Working with the Play Framework
      • Working with Spring Boot
      • Java Advanced Topics
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku Data For Redis
    • Apache Kafka on Heroku
    • Other Data Stores
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
    • Compliance
  • Heroku Enterprise
    • Private Spaces
      • Infrastructure Networking
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Single Sign-on (SSO)
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Heroku Architecture
  • Platform Principles
  • Architecting Applications for Heroku

Architecting Applications for Heroku

English — 日本語に切り替える

Last updated January 27, 2022

Table of Contents

  • Background
  • On Heroku
  • Principles

The Twelve Factor app, written by Heroku co-founder Adam Wiggins, is a methodology for building software-as-a-service apps in modern deployment environments.

Heroku is an open platform. There are no proprietary hooks or dependencies required to deploy and run your application. However, there are common architectural and development practices that ensure an optimal experience. Many of these concepts have their origins in the Twelve Factor methodology and are detailed here in the context of building your app for Heroku.

Background

The principles of application development outlined here have been collected from the experience managing a wide variety of software-as-a-service apps in the wild. They are a triangulation of ideal practices in app development, paying particular attention to the dynamics of the organic growth of an app over time, the dynamics of collaboration between developers working on the app’s codebase, and avoiding the cost of software erosion.

The motivation in presenting them here is to raise awareness of common systemic problems, to provide a shared vocabulary for discussing those problems, and to offer a set of broad conceptual solutions to those problems with accompanying terminology.

On Heroku

Heroku is an embodiment of these application development principles and differs from traditional server-based hosting in the following ways:

  • it is application, not infrastructure, focused
  • is a dynamic and distributed runtime environment
  • utilizes a process-based execution model
  • enforces a strict separation of apps and their dependencies

On Heroku, these differences are manifested in a variety of practices, all of which result in a well-designed and resilient application and are not platform-specific.

To see the technical details of the stack that runs and manages your application, which will add to your understanding of building apps on Heroku, read How Heroku Works.

Principles

There are several core development principles that Heroku developers should be aware of, and comfortable with, when designing applications. They are grouped into broad categories that loosely correlate to the stages of application development, deployment and management.

Category Approach on Heroku
Development and configuration Strict separation of code and configuration, explicit dependency declaration, tight development iterations and parity between environments.
Runtime Applications are run as independent, lightweight, and stateless processes with quick startup and shutdown.
Management and visibility Execute auxiliary tasks in one-off processes and view application output via collated log-stream.

Keep reading

  • Platform Principles

Feedback

Log in to submit feedback.

Runtime Principles Development and Configuration Principles

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Podcasts
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing

Subscribe to our monthly newsletter

Your email address:

  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Heroku Podcasts
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Facebook
  • Instagram
  • Github
  • LinkedIn
  • YouTube
Heroku is acompany

 © Salesforce.com

  • heroku.com
  • Terms of Service
  • Privacy
  • Cookies
  • Cookie Preferences