codebase tracked in a VCS • Potentially splitting monoliths off into microservices • Violations • Application is made up of multiple repositories • main application(en-queuer) + tightly coupled worker(de-queuer): multiple codebase supporting single application • Single codebase with multiple launch script • Shared code is separately released product. Can be vendored • "organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations." — M. Conway
• API as first-class artifact of the dev process • To be consumed by client apps or by other services • Contract-first development • API Blueprint, OpenAPI 3.0
run environment is required • Design: small design changes per iteration, how dependencies is vendored • Build: artifacts generated from code repository. build - deployments is 1:N. • Release: Build artifact combined with env/app-specific configuration • Run: Keeping app alive, monitor health, log aggregation, and so on.
across deployments • URL, other information about backing service(web server, smtp, database) • Third-party service credentials(AWS, api token) • Property file, configuration YML, XML • Should keep configuration separate from code (Imagine repository being open sourced on GitHub) • Cloud Provider usually provides externalized configuration
routing or storage of its output stream” • Write all log entries to stdout and stderr • Aggregation, processing and storage are taken care by Platform • Decouple application from the knowledge of log storage, processing, analysis • Modify log storage without touching application
(in relate to Factor 4) • Attaching/detaching backing system should be possible at will, without re-deploying the app • What if the database is completely broken and need to change the binding to newly brought up db instance?
possible • Give confidence that the application WILL WORK EVERYWHERE • Time: time until change is pushed to production should remain short(mins ~ same day) • People: human should never be deploying application. it should be done by clicking a button or triggered by event • Resources: backing service should be similar across all environments
bad • Database migrations • Interactive programming consoles (REPLs) • Running timed scripts, such as a nightly batch job or hourly import • Running a one-off job that executes custom code only once
Squid: Caching proxy • At Buzzvil, we mainly use as transparent forward proxy when requesting 3rd-party API endpoints requiring whitelisted IP • Forward proxying HTTPS via Connect
hardly scale) • Limited concurrency • Low resource utilization • Hard to monitor • Lack of log aggregation • Hard to configure across multiple instances
release • Configuration is coupled with codebase • Log path • Deploy script • Provisioning script involved while scaling out • “Ecosystem of monoliths”