The Twelve Factor App

I. Codebase One codebase tracked in revision control, many deploys

II. Dependencies Explicitly declare and isolate dependencies

III. Config Store config in the environment

IV. Backing services Treat backing services as attached resources

V. Build, release, run Strictly separate build and run stages

VI. Processes Execute the app as one or more stateless processes

VII. Port binding Export services via port binding

VIII. Concurrency Scale out via the process model

IX. Disposability Maximize robustness with fast startup and graceful shutdown

X. Dev/prod parity Keep development, staging, and production as similar as possible

XI. Logs Treat logs as event streams

XII. Admin processes Run admin/management tasks as one-off processes

  • Automated Test that runs on every commit

The world of backend development is vast. The operational context vastly define the tool and practices used to tackle the problem.

  • Trunk based development is suitable for software that are continuously deployed in cloud

  • Gitflow is more suitable for those selling software that are hosted and run on-premise by the customers

  • Cloud-native application, which are expected

    • distributed with multiple instanced to achieve high-availability while running in fault-prone environments;
    • To allow us to continuously release new versions with zero downtime;
    • To handle dynamic workloads (e.g. request volumes), we should measure load on system and scale elastically without overprovisioning
  • Desktop/on-premise application

  • Domain drive design

  • Type driven design