SlideShare a Scribd company logo
Scaling Your Architecture
for the Long Term
Randy Shoup
@randyshoup
Background
@randyshoup
STARTING SCALING OPTIMIZING
https://ittybiz.com/s-curve/@randyshoup
STARTING SCALING OPTIMIZING
https://ittybiz.com/s-curve/
Single Team
Rapid
iteration
@randyshoup
Monolithic
architecture
STARTING SCALING OPTIMIZING
https://ittybiz.com/s-curve/
Many Teams
Velocity and
Scalability
@randyshoup
Microservice architecture
Single Team
Rapid
iteration
Monolithic
architecture
STARTING SCALING OPTIMIZING
https://ittybiz.com/s-curve/
Fewer Teams
Efficiency and
Sustainability
@randyshoup
Consolidating
architecture
Many Teams
Velocity and
Scalability
Microservice architecture
Single Team
Rapid
iteration
Monolithic
architecture
STARTING SCALING OPTIMIZING
https://ittybiz.com/s-curve/
Fewer Teams
Efficiency and
Sustainability
@randyshoup
Consolidating
architecture
Many Teams
Velocity and
Scalability
Microservice architecture
Single Team
Rapid
iteration
Monolithic
architecture
STARTING SCALING OPTIMIZING
https://ittybiz.com/s-curve/
Fewer Teams
Efficiency and
Sustainability
@randyshoup
Consolidating
architecture
Many Teams
Velocity and
Scalability
Microservice architecture
Single Team
Rapid
iteration
Monolithic
architecture
STARTING SCALING OPTIMIZING
https://ittybiz.com/s-curve/
Fewer Teams
Efficiency and
Sustainability
@randyshoup
Consolidating
architecture
Many Teams
Velocity and
Scalability
Microservice architecture
Single Team
Rapid
iteration
Monolithic
architecture
(~1% of all
applications)
SCALING
Architecture Evolution
• eBay
• 5th generation today
• Monolithic Perl  Monolithic C++  Java  microservices
• Twitter
• 3rd generation today
• Monolithic Rails  JS / Rails / Scala  microservices
• Amazon
• Nth generation today
• Monolithic Perl / C  Java / C++  microservices
No one starts with microservices
…
Past a certain scale, everyone ends
up with microservices
@randyshoup
…
but most never reach that scale
Scalability Lessons
•Modular Architecture
•Event-Driven Communication
•Quality and Reliability
•Continuous Delivery
Scalability Lessons
•Modular Architecture
•Event-Driven Communication
•Quality and Reliability
•Continuous Delivery
Many Autonomous Teams
Idea
Development
Quality
Operations
Idea
Development
Quality
Operations
Idea
Development
Quality
Operations
Modular Architecture
• One domain: One team: One / few service(s)
o Organization  reflects  Architecture (ā€œConway’s Lawā€)
• Autonomy and Accountability
o Team can independently design, develop, deploy, operate its service(s)
o Team owns its service(s) end to end
@randyshoup
Modular Architecture
• Abstraction and Encapsulation
o Fault isolation
o ā€œOptimalā€ technology stack
o Performance optimization
o Security boundary
• Isolated persistence
o All operations through published service interface
o No backdoor access to database (!)
@randyshoup
Modular Architecture
• Strict interface discipline
o Well-specified interface contract
o Forward- and backward-compatibility
o Testable and mockable
• Domains grow and divide over time
o Teams and services split like ā€œcellular mitosisā€
• Service ecosystem
o Services call others, which call others, etc.
o Graph, not a strict layering
@randyshoup
Scalability Lessons
•Modular Architecture
•Event-Driven Communication
•Quality and Reliability
•Continuous Delivery
Event-Driven Communication
• Service publishes an event when state changes
o Statement that some interesting thing occurred
o Represents a semantic domain event
• Events are a first-class part of a service interface
• 0 | 1 | N consumers subscribe to the event
@randyshoup
Event-Driven Communication
• Decouple domains and teams
o Abstract
o Asynchronous
• Decouple producer and consumer services
o 0 | 1 | N consumers
o Decoupled availability
o Independent scalability
o Reduced latency
o Smoother load characteristics
@randyshoup
Event-Driven Communication
• Formal Interface
o Well-specified event schema
o Testable and mockable
o Forward- and backward-compatibility
@randyshoup
Event-Driven Communication
• Standardized event bus
o Event persistence and replays
o Event ordering and duplication
o Delivery guarantees
o …
• Do not roll your own (!)
o This stuff is deceptively complicated
o There are decades of research and experience
o It’s probably not your core competency
@randyshoup
Scalability Lessons
•Modular Architecture
•Event-Driven Communication
•Quality and Reliability
•Continuous Delivery
Quality and Reliability
• Quality and Reliability are ā€œPriority-0 featuresā€
• Equally important to users as product features and
engaging user experience
@randyshoup
Automated Testing
• Tests help you go faster
o Tests are ā€œsolid groundā€
o Tests are the safety net
• Tests make better code
o Confidence to break things
o Courage to refactor mercilessly
• Tests make better systems
o Catch bugs earlier, fail faster
@randyshoup
Developer Productivity
• 75% reading
existing code
• 20% modifying
existing code
• 5% writing new
code
https://blogs.msdn.microsoft.com/peterhal/2006/01/04/what-do-programmers-really-do-anyway-aka-part-2-of-the-yardstick-saga/
@randyshoup
Developer Productivity
• 75% reading
existing code
• 20% modifying
existing code
• 5% writing new
code
https://blogs.msdn.microsoft.com/peterhal/2006/01/04/what-do-programmers-really-do-anyway-aka-part-2-of-the-yardstick-saga/
@randyshoup
Vicious Cycle of Technical Debt
Technical
Debt
ā€œNo time
to do it
rightā€
Quick-
and-dirty
Virtuous Cycle of Investment
Solid
Foundatio
n
Confidence
Faster and
Better
Quality
Investment
Scalability Lessons
•Modular Architecture
•Event-Driven Communication
•Quality and Reliability
•Continuous Delivery
Continuous Delivery
• Deploy services multiple times per day
o Tighter feedback loop for build -> measure -> learn cycle
o Faster time to value
• More solid systems
o Release smaller units of work
o Smaller changes to roll back or roll forward
o Faster to repair, easier to understand, simpler to diagnose
@randyshoup
Continuous Delivery
• Repeatable Deployment Pipeline
o Low-risk, push-button deployment
o Rapid release cadence
o Rapid rollback and recovery
@randyshoup
Feature Flags
• Configuration ā€œflagā€ to enable / disable a feature for a
particular set of users
o Independently discovered at eBay, Facebook, Google, etc.
• More solid systems
o Decouple feature delivery from code delivery
o Rapid on and off
o Develop / test / verify in production
@randyshoup
Scalability Lessons
•Modular Architecture
•Event-Driven Communication
•Quality and Reliability
•Continuous Delivery
Thank you!
@randyshoup
linkedin.com/in/randyshoup
medium.com/@randyshoup

More Related Content

What's hot (20)

PPTX
Microservice vs. Monolithic Architecture
Paul Mooney
Ā 
PPTX
Salesforce Online Training
Keylabs
Ā 
PPTX
Monoliths and Microservices
Bozhidar Bozhanov
Ā 
PDF
Event-driven Architecture
Centric Consulting
Ā 
PDF
Next Generation Digital Transformation
Vishal Sharma
Ā 
PDF
Cyber physical systems and robotics
trinhanhtuan247
Ā 
PDF
AIDRC_Generative_AI_TL_v5.pdf
Thierry Lestable
Ā 
PPTX
Mistakes - I’ve made a few. Blunders in event-driven architecture | Simon Aub...
HostedbyConfluent
Ā 
PDF
An introduction to Digital Transformation
Sergios Dimitriadis
Ā 
PDF
Microservices Design Patterns | Edureka
Edureka!
Ā 
PDF
Real-time Adaptation of Financial Market Events with Kafka | Cliff Cheng and ...
HostedbyConfluent
Ā 
PDF
Why Microservice
Kelvin Yeung
Ā 
PPTX
Computer Vision and Text Analytics Using Azure Cognitive Services
Umme Rubaiyat Chowdhury
Ā 
PDF
AI Governance Playbook
Antony Turner
Ā 
PDF
Microservice Architecture 101
Kochih Wu
Ā 
PPTX
Power of Einstein Analytics - Salesforce + Mulesoft
Akshata Sawant
Ā 
PDF
App Modernization
PT Datacomm Diangraha
Ā 
PPTX
Demystifying data engineering
Thang Bui (Bob)
Ā 
PDF
UTILITY OF AI
Andre Muscat
Ā 
PDF
š†šžš§šžš«ššš­š¢šÆšž š€šˆ: š‚š”ššš§š š¢š§š  š‡šØš° šš®š¬š¢š§šžš¬š¬ šˆš§š§šØšÆššš­šžš¬ ššš§š šŽš©šžš«ššš­šžš¬
VINCI Digital - Industrial IoT (IIoT) Strategic Advisory
Ā 
Microservice vs. Monolithic Architecture
Paul Mooney
Ā 
Salesforce Online Training
Keylabs
Ā 
Monoliths and Microservices
Bozhidar Bozhanov
Ā 
Event-driven Architecture
Centric Consulting
Ā 
Next Generation Digital Transformation
Vishal Sharma
Ā 
Cyber physical systems and robotics
trinhanhtuan247
Ā 
AIDRC_Generative_AI_TL_v5.pdf
Thierry Lestable
Ā 
Mistakes - I’ve made a few. Blunders in event-driven architecture | Simon Aub...
HostedbyConfluent
Ā 
An introduction to Digital Transformation
Sergios Dimitriadis
Ā 
Microservices Design Patterns | Edureka
Edureka!
Ā 
Real-time Adaptation of Financial Market Events with Kafka | Cliff Cheng and ...
HostedbyConfluent
Ā 
Why Microservice
Kelvin Yeung
Ā 
Computer Vision and Text Analytics Using Azure Cognitive Services
Umme Rubaiyat Chowdhury
Ā 
AI Governance Playbook
Antony Turner
Ā 
Microservice Architecture 101
Kochih Wu
Ā 
Power of Einstein Analytics - Salesforce + Mulesoft
Akshata Sawant
Ā 
App Modernization
PT Datacomm Diangraha
Ā 
Demystifying data engineering
Thang Bui (Bob)
Ā 
UTILITY OF AI
Andre Muscat
Ā 
š†šžš§šžš«ššš­š¢šÆšž š€šˆ: š‚š”ššš§š š¢š§š  š‡šØš° šš®š¬š¢š§šžš¬š¬ šˆš§š§šØšÆššš­šžš¬ ššš§š šŽš©šžš«ššš­šžš¬
VINCI Digital - Industrial IoT (IIoT) Strategic Advisory
Ā 

Similar to Scaling Your Architecture for the Long Term (20)

PDF
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Randy Shoup
Ā 
PPTX
Minimal Viable Architecture - Silicon Slopes 2020
Randy Shoup
Ā 
PPTX
DevOps - It's About How We Work
Randy Shoup
Ā 
PPTX
Minimum Viable Architecture - Good Enough is Good Enough
Randy Shoup
Ā 
PPTX
Moving Fast At Scale
Randy Shoup
Ā 
PPT
The Economies of Scaling Software
Abdelmonaim Remani
Ā 
PPT
The economies of scaling software - Abdel Remani
jaxconf
Ā 
PPTX
Service Architectures At Scale - QCon London 2015
Randy Shoup
Ā 
PPTX
Mykhailo Hryhorash: ŠŃ€Ń…Ń–Ń‚ŠµŠŗŃ‚ŃƒŃ€Š° IT-Ń€Ń–ŃˆŠµŠ½ŃŒ (Частина 1) (UA)
Lviv Startup Club
Ā 
PDF
Software Architecture for Cloud Infrastructure
Tapio Rautonen
Ā 
PPTX
Pragmatic Microservices
Randy Shoup
Ā 
PPTX
Mykhailo Hryhorash: ŠŃ€Ń…Ń–Ń‚ŠµŠŗŃ‚ŃƒŃ€Š° IT-Ń€Ń–ŃˆŠµŠ½ŃŒ (Частина 1) (UA)
content75
Ā 
PDF
When Should You Consider Meta Architectures
Daniel Cukier
Ā 
PDF
When Should You Consider Meta Architectures
ccsl-usp
Ā 
PPTX
Skeuomorphs, Databases, and Mobile Performance
Sam Ramji
Ā 
PPTX
Cloud to hybrid edge cloud evolution Jun112020.pptx
Michel Burger
Ā 
PDF
Modern times - architectures for a Next Generation of IT
Uwe Friedrichsen
Ā 
PPTX
Skeuomorphs, Databases, and Mobile Performance
Apigee | Google Cloud
Ā 
PPTX
Cloud Economics for Java at Java2Days
Steve Poole
Ā 
PDF
Microservice final final
gaurav shukla
Ā 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Randy Shoup
Ā 
Minimal Viable Architecture - Silicon Slopes 2020
Randy Shoup
Ā 
DevOps - It's About How We Work
Randy Shoup
Ā 
Minimum Viable Architecture - Good Enough is Good Enough
Randy Shoup
Ā 
Moving Fast At Scale
Randy Shoup
Ā 
The Economies of Scaling Software
Abdelmonaim Remani
Ā 
The economies of scaling software - Abdel Remani
jaxconf
Ā 
Service Architectures At Scale - QCon London 2015
Randy Shoup
Ā 
Mykhailo Hryhorash: ŠŃ€Ń…Ń–Ń‚ŠµŠŗŃ‚ŃƒŃ€Š° IT-Ń€Ń–ŃˆŠµŠ½ŃŒ (Частина 1) (UA)
Lviv Startup Club
Ā 
Software Architecture for Cloud Infrastructure
Tapio Rautonen
Ā 
Pragmatic Microservices
Randy Shoup
Ā 
Mykhailo Hryhorash: ŠŃ€Ń…Ń–Ń‚ŠµŠŗŃ‚ŃƒŃ€Š° IT-Ń€Ń–ŃˆŠµŠ½ŃŒ (Частина 1) (UA)
content75
Ā 
When Should You Consider Meta Architectures
Daniel Cukier
Ā 
When Should You Consider Meta Architectures
ccsl-usp
Ā 
Skeuomorphs, Databases, and Mobile Performance
Sam Ramji
Ā 
Cloud to hybrid edge cloud evolution Jun112020.pptx
Michel Burger
Ā 
Modern times - architectures for a Next Generation of IT
Uwe Friedrichsen
Ā 
Skeuomorphs, Databases, and Mobile Performance
Apigee | Google Cloud
Ā 
Cloud Economics for Java at Java2Days
Steve Poole
Ā 
Microservice final final
gaurav shukla
Ā 
Ad

More from Randy Shoup (20)

PPTX
Anatomy of Three Incidents -- Commonalities and Lessons
Randy Shoup
Ā 
PPTX
One Terrible Day at Google, and How It Made Us Better
Randy Shoup
Ā 
PPTX
An Agile Approach to Machine Learning
Randy Shoup
Ā 
PPTX
Moving Fast at Scale
Randy Shoup
Ā 
PPTX
Breaking Codes, Designing Jets, and Building Teams
Randy Shoup
Ā 
PPTX
Scaling Your Architecture with Services and Events
Randy Shoup
Ā 
PPTX
Learning from Learnings: Anatomy of Three Incidents
Randy Shoup
Ā 
PPTX
Managing Data at Scale - Microservices and Events
Randy Shoup
Ā 
PPTX
Service Architectures at Scale
Randy Shoup
Ā 
PPTX
Monoliths, Migrations, and Microservices
Randy Shoup
Ā 
PPTX
Evolving Architecture and Organization - Lessons from Google and eBay
Randy Shoup
Ā 
PPTX
Ten Lessons of the DevOps Transition
Randy Shoup
Ā 
PPTX
Managing Data in Microservices
Randy Shoup
Ā 
PPTX
Effective Microservices In a Data-centric World
Randy Shoup
Ā 
PPTX
A CTO's Guide to Scaling Organizations
Randy Shoup
Ā 
PPTX
From the Monolith to Microservices - CraftConf 2015
Randy Shoup
Ā 
PPTX
Concurrency at Scale: Evolution to Micro-Services
Randy Shoup
Ā 
PPTX
Minimum Viable Architecture -- Good Enough is Good Enough in a Startup
Randy Shoup
Ā 
PPTX
Why Enterprises Are Embracing the Cloud
Randy Shoup
Ā 
PPTX
DevOpsDays Silicon Valley 2014 - The Game of Operations
Randy Shoup
Ā 
Anatomy of Three Incidents -- Commonalities and Lessons
Randy Shoup
Ā 
One Terrible Day at Google, and How It Made Us Better
Randy Shoup
Ā 
An Agile Approach to Machine Learning
Randy Shoup
Ā 
Moving Fast at Scale
Randy Shoup
Ā 
Breaking Codes, Designing Jets, and Building Teams
Randy Shoup
Ā 
Scaling Your Architecture with Services and Events
Randy Shoup
Ā 
Learning from Learnings: Anatomy of Three Incidents
Randy Shoup
Ā 
Managing Data at Scale - Microservices and Events
Randy Shoup
Ā 
Service Architectures at Scale
Randy Shoup
Ā 
Monoliths, Migrations, and Microservices
Randy Shoup
Ā 
Evolving Architecture and Organization - Lessons from Google and eBay
Randy Shoup
Ā 
Ten Lessons of the DevOps Transition
Randy Shoup
Ā 
Managing Data in Microservices
Randy Shoup
Ā 
Effective Microservices In a Data-centric World
Randy Shoup
Ā 
A CTO's Guide to Scaling Organizations
Randy Shoup
Ā 
From the Monolith to Microservices - CraftConf 2015
Randy Shoup
Ā 
Concurrency at Scale: Evolution to Micro-Services
Randy Shoup
Ā 
Minimum Viable Architecture -- Good Enough is Good Enough in a Startup
Randy Shoup
Ā 
Why Enterprises Are Embracing the Cloud
Randy Shoup
Ā 
DevOpsDays Silicon Valley 2014 - The Game of Operations
Randy Shoup
Ā 
Ad

Recently uploaded (20)

PPTX
Platform for Enterprise Solution - Java EE5
abhishekoza1981
Ā 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
Ā 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
Ā 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
Ā 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
Ā 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
Ā 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
Ā 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
Ā 
PDF
Letasoft Sound Booster 1.12.0.538 Crack Download+ Product Key [Latest]
HyperPc soft
Ā 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
Ā 
PPTX
Revolutionizing Code Modernization with AI
KrzysztofKkol1
Ā 
PPTX
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
Ā 
PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
Ā 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
Ā 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
Ā 
PDF
GridView,Recycler view, API, SQLITE& NetworkRequest.pdf
Nabin Dhakal
Ā 
PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
Ā 
PDF
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
Ā 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
Ā 
PPTX
How Odoo Became a Game-Changer for an IT Company in Manufacturing ERP
SatishKumar2651
Ā 
Platform for Enterprise Solution - Java EE5
abhishekoza1981
Ā 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
Ā 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
Ā 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
Ā 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
Ā 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
Ā 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
Ā 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
Ā 
Letasoft Sound Booster 1.12.0.538 Crack Download+ Product Key [Latest]
HyperPc soft
Ā 
Human Resources Information System (HRIS)
Amity University, Patna
Ā 
Revolutionizing Code Modernization with AI
KrzysztofKkol1
Ā 
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
Ā 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
Ā 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
Ā 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
Ā 
GridView,Recycler view, API, SQLITE& NetworkRequest.pdf
Nabin Dhakal
Ā 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
Ā 
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
Ā 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
Ā 
How Odoo Became a Game-Changer for an IT Company in Manufacturing ERP
SatishKumar2651
Ā 

Scaling Your Architecture for the Long Term