Subverting the
Monolith
With Principles and Tooling
@girlnamedsophia
We’ve been told the
future is…
Automated
Serverless
In the cloud
Distributed
Scalable
Flexible
Resilient
Secure
How do you go from here
to there?
Here There
What’s here?
Here
…where were we?
• Apps aren’t 12 factor
…where were we?
• Apps aren’t 12 factor
• Not all hosts are ephemeral
…where were we?
• Apps aren’t 12 factor
• Not all hosts are ephemeral
• High deploy latency - 90 minute deploys
…where were we?
• Apps aren’t 12 factor
• Not all hosts are ephemeral
• High deploy latency - 90 minute deploys
• Low reliability in CI/CD
…where were we?
• Apps aren’t 12 factor
• Not all hosts are ephemeral
• High deploy latency - 90 minute deploys
• Low reliability in CI/CD
• High onboarding cost for new apps
…where were we?
• Apps aren’t 12 factor
• Not all hosts are ephemeral
• High deploy latency - 90 minute deploys
• Low reliability in CI/CD
• High onboarding cost for new apps
…where were we?
• Apps aren’t 12 factor
• Not all hosts are ephemeral
• High deploy latency - 90 minute deploys
• Low reliability in CI/CD
• High onboarding cost for new apps
…where were we?
What’s 12 factor?
• Code in VCS
• Dependencies declared and
isolated
• Config stored in the
environment
• Backing services communicated
over an API
• Internal Services available
via an API
• Concurrency and scaling
through the process model
• Ephemeral
• Environment agnostic
• Logs as event stream
• Admin tasks in production
So what is “there”?
There
Serverless!
Containerized!
Environment Agnostic!
Declarative Dependencies!
Backing services
communicated over an API!
Automated Goats
Consumer Contract
CI pipeline
CD pipeline
Onboard new apps
And when do we want it?
...Eventually!
How do we want it to
happen?
...Gradually!
Why don’t we have it
already?
How we built the platform
today, thinking of tomorrow
Solved one problem at a time
Solved one problem at a time
Implemented Configuration as Code
How we built the platform
today, thinking of tomorrow
Solved one problem at a time
Implemented Configuration as Code
Prioritized an engineers-first approach
How we built the platform
today, thinking of tomorrow
Solved one problem at a time
Implemented Configuration as Code
Prioritized an engineers-first approach
How we built the platform
today, thinking of tomorrow
…okay, engineers second, Principles first
Legacy System
App
Which problem to solve
first?
Consumer Contract
CI Pipeline
CD Pipeline
Onboard new apps
Generic solution
Generic solution
Varying needs
Generic solution
Varying needs
Usable Value right off the
bat
GitHub Jenkins GitHub Jenkins
Slack
AWS
JenkinsJenkinsJenkinsJenkins
Sad engineers
shake fists
CI/CD not in VCS
Onboarding new
apps is
difficult
Sad
Engineer
CI fumbles
Not Atomic!
GitHub Jenkins GitHub Jenkins
Slack
AWS
JenkinsJenkinsJenkinsJenkins
Sad
Engineer
CI fumbles
Configuration As Code
Configuration As Code
Automation
Configuration As Code
Automation
Opinionated AF
As engineers, what’s your go to
language of choice? What do you
write most of your tools things in?
1. Ruby
2. Elixir
3. Golang
You’re wrong!
It’s YAML.
So what did we do?
We wrote YAML…
WITH RUBY
Enforces a set of conventions
What’s the tool do?
What’s the tool do?
Enforces a set of conventions
Defines a predetermined contract
Enforces a set of conventions
Defines a predetermined contract
Automates configuration generation
What’s the tool do?
Why did we do it?
Externalized Configuration
Why a contract?
Externalized Configuration
Automation
Why a contract?
Externalized Configuration
Automation
Scalability
Why a contract?
Why a contract?
Externalized Configuration
Automation
Scalability
Standardization
Why a contract?
Externalized Configuration
Automation
Scalability
Standardization
Predictability
Why a contract?
Externalized Configuration
Automation
Scalability
Standardization
Predictability
Why a contract?
Externalized Configuration
Automation
Scalability
Standardization
Predictability
RSpec
Rubocop
Integration Tests
Error Screenshots
Standardized Builds
Conventionally stored artifacts
Next, Enforce the
Contract
How’s it work?
ruby_app java_appjava_library
…
Coach CLI
How’s it work?
ruby_app
ruby_library
java_library
How’s it work?
ruby_app
ruby_library
java_library
ruby 2.6.1
ruby 2.4.2
java 1.8.0
How’s it work?
ruby_app
ruby_library
java_library
How’s it work?
Consumer Contract
CI Pipeline
CD Pipeline
Onboard new apps
The Structure
The Structure
Tight coupling! Nooooo!
Welcome to software
development
The Code
The Code
The Code
The Legacy
The Code
The Code
The Code
The Code
The Code
#portability
…But I digress
…where are we now?
…where are we now?
• Apps start to look a lot more 12 factor-y
…where are we now?
• Apps start to look a lot more 12 factor-y
• Not all hosts are ephemeral
…where are we now?
• Apps start to look a lot more 12 factor-y
• Not all hosts are ephemeral
• Low deploy latency - 25-35 minute deploys
…where are we now?
• Apps start to look a lot more 12 factor-y
• Not all hosts are ephemeral
• Low deploy latency - 25-35 minute deploys
• High reliability in CI, not yet CD
…where are we now?
• Apps start to look a lot more 12 factor-y
• Not all hosts are ephemeral
• Low deploy latency - 25-35 minute deploys
• High reliability in CI/CD, not yet CD
• Low onboarding cost for new apps
…where are we now?
• Apps start to look a lot more 12 factor-y
• Not all hosts are ephemeral
• Low deploy latency - 25-35 minute deploys
• High reliability in CI/CD, not yet CD
• Low onboarding cost for new apps
…where are we now?
• Apps start to look a lot more 12 factor-y
• Not all hosts are ephemeral
• Low deploy latency - 25-35 minute deploys
• High reliability in CI/CD, not yet CD
• Low onboarding cost for new apps
How our tooling Encouraged
Developers to Build for the Future
Consumer Contract
CI Pipeline
CD Pipeline
Onboard new apps
From legacy to
new world
What’s the smallest
deployable unit?
An app
An app is an app is an app
Helping the migration
What is but isn’t an app?
• Database migrations for a shared
database
• Database monitoring that needs to run
on its own host
Running the code in
the cloud
Rudder guides the boat
The tools reinforce
each other
What language or tool do you use
to keep infrastructure in code?
1. YAML
2. Terraform
3. Ansible
Terraform with Ruby
Helm with Ruby
The evolution of the platform
ruby_app
database_
monitoring
_app
database_
migration_
app
ruby_app_
database
Attachable resources
ruby_app
database_
monitoring
_app
database_
migration_
app
ruby_app_
database
The engineers and the
principles guide the tools
Consumer Contract
CI Pipeline
CD Pipeline
Onboard new apps
Define the contract
Enforce the contract
Onboard
Onboarding apps
Distributing it all
Ease of distribution
means ease of adoption
Did we subvert the
monolith?
Yes!
• Apps are 12 factor!
• All hosts are ephemeral, we can even
support one-off ecosystems with ease
• Low deploy latency - 10-25 minute deploys
• High reliability in CI/CD
• Low onboarding cost for new apps
…where are we now?
GitHub Jenkins GitHub Jenkins
Slack
AWS
JenkinsJenkinsJenkinsJenkins
Sad
Engineer
GitHub CircleCI Coach Web Slack
Coach CLI
GitHub
Happy
Engineer
GitHub CircleCI Coach Web Slack
Coach CLI
GitHub
Happy
Engineer
Jenkins
AWS EKS
Rudder
Takeaways
Sometimes the solution can be
well-designed and knowingly
temporary
Automation now is better
than manual later
Delivering value as quickly as
possible without sacrificing
quality is critical to growth
With clearly defined principles
and goals, know that you never
need to stop iterating
Our present is…
Automated
Serverless
In the cloud
Distributed
Scalable
Flexible
Resilient
Secure
The Path Forward
Thank you

Subverting the monolith!