Tuesday, November 20, 2018

Cloud Factorize



https://developers.redhat.com/blog/2017/06/22/12-factors-to-cloud-success/

  1. CodeBase i.e. GIT
All pieces of code tracked by revision identifier (code base same across all deploys, but diffent versions may be active in diffent deploys)
  1. Configuration
Anything different bewteen environments is externalized and fetched at run time (config vs code seperation) - config stored in environment
  1. Backing Service (attached resources)
All endpoints (web services, databases, queues) available thru abstraction layer (i.e. URL)
  1. Build, release, run
Strict separation of stages 1) building the app, combining app with configuration, starting app
  1.  Port Binding
App is self healing to automatically make available resources and remove failed resources
 
  1. Concurrency

Concurrency by scaling app horizontally  (Horizontal scaling means that you scale by adding more machines into your pool of resources whereas Vertical scalingmeans that you scale by adding more power (CPU, RAM) to an existing machine).
7. Disposibility
Robustness better when start and shut down quickly - allows for rapid elasticity scaling, deployment of changes, and recovery from crash
8. Logs
Treat logs as event streams  (consolidate logs to allow analytics to be added)

  1. Dependency

Declare and isolate dependency via tooling

  1. Processes

App executes as stateless processes (share nothing)
  1. Dev Prod parity
Keep env close as possible

  1. Admin Services
Run in replicated envoronment migrations