What Does
Cloud native
Mean?
Why is
Cloud native
Infrastructure
Not enough?
Managing empty boxes is
only half of the solution,
it matters equally much
what you put inside them
Cloud Native Applications need both a:
✓ Scalable and Available Infrastructure Layer
✓ Scalable and Available Application Layer
Reactive shows the way
Addresses the challenges of distributed systems directly
in its abstractions, programming/data models,
protocols, interaction schemes, and error handling
Reactive shows the way
The Reactive Application
Addresses the challenges of distributed systems directly
in its abstractions, programming/data models,
protocols, interaction schemes, and error handling
Not as an afterthought
not as operational or infrastructure problems
that are dealt with via increasingly complex tech stacks,
wrappers, workarounds, and leaky abstractions
Reactive shows the way
The Reactive Application
What’s the antidote?
Introducing the
Reactive Principles
https://principles.reactive.foundation
Introducing the
Reactive Principles
I. Stay Responsive
https://principles.reactive.foundation
Introducing the
Reactive Principles
I. Stay Responsive
II. Accept Uncertainty
https://principles.reactive.foundation
Introducing the
Reactive Principles
I. Stay Responsive
II. Accept Uncertainty
III. Embrace Failure
https://principles.reactive.foundation
Introducing the
Reactive Principles
I. Stay Responsive
II. Accept Uncertainty
III. Embrace Failure
IV. Assert Autonomy
https://principles.reactive.foundation
Introducing the
Reactive Principles
I. Stay Responsive
II. Accept Uncertainty
III. Embrace Failure
IV. Assert Autonomy
V. Tailor Consistency
https://principles.reactive.foundation
Introducing the
Reactive Principles
I. Stay Responsive
II. Accept Uncertainty
III. Embrace Failure
IV. Assert Autonomy
V. Tailor Consistency
VI. Decouple Time
https://principles.reactive.foundation
Introducing the
Reactive Principles
I. Stay Responsive
II. Accept Uncertainty
III. Embrace Failure
IV. Assert Autonomy
V. Tailor Consistency
VI. Decouple Time
VII. Decouple Space
https://principles.reactive.foundation
Introducing the
Reactive Principles
I. Stay Responsive
II. Accept Uncertainty
III. Embrace Failure
IV. Assert Autonomy
V. Tailor Consistency
VI. Decouple Time
VII. Decouple Space
VIII. Handle Dynamics
https://principles.reactive.foundation
Ⅰ
ⅠStay Responsive
Always respond in a timely manner
It’s easy to stay responsive
during “Blue sky” scenarios
But it’s equally important to
stay responsive in the face of
failures, communication outages,
and unpredictable workloads
“An escalator can never break:
it can only become stairs.
You should never see an
Escalator Temporarily Out Of Order sign,
just Escalator Temporarily Stairs.
Sorry for the convenience.”
- Mitch Hedberg
Ⅱ
ⅡAccept Uncertainty
Build reliability despite unreliable foundations
Welcome To The Wild Ocean Of
Non Determinism
Distributed Systems
Exploit
Reality
Exploit
Reality
We need to
In our design
Information
Has Latency
Information Is Always
From the Past
Time
We cannot always trust
Order
Or
There Is No
Now
We Need To Model and manage
Uncertainty
Directly In The Application Architecture
“In a system which cannot count
on distributed transactions, the
management of uncertainty must be
implemented in the business logic.”
- Pat Helland
Life Beyond Distributed Transactions - An Apostate’s Opinion, Pat Helland (2007)
We Need To Model and manage
Uncertainty
Directly In The Application Architecture
Ⅲ
ⅢEmbrace Failure
Except things to go wrong and
design for resilience
We Need To
Manage
Failure
Not Try To Avoid It
Resilience
is by
Design
Photo courtesy of FEMA/Joselyne Augustino
“Accidents come from relationships 
not broken parts.”
- Sidney dekker
Drift into Failure - Sidney Dekker
Decoupling in space
allows the failure to be kept inside
designated failure zones (bulkheads)
Decoupling in time
enables other components to reliably detect
and handle failures even when they cannot
be explicitly communicated
Failures Need To Be
1. Contained—Avoid cascading failures
2. Reified—as values
3. Signalled—Asynchronously
4. Observed—by 1-N
5. Managed—Outside failed Context
Let It Crash
To Build Self-healing Systems
Ⅳ
Ⅳ
Assert Autonomy
Design components
that act independently
And interact collaboratively
We need to Craft
Autonomous Islands
Of Determinism
Mutable State
Needs To Be
Contained
And Non Observable
Publish Facts
To Outside World
Using well-defined Protocols
A system of distributed services is a
never-ending stream towards convergence
A system of distributed services is a
never-ending stream towards convergence
Always in the process of convergence
Never reaching the state of convergence
There Is No Now
A system of distributed services is a
never-ending stream towards convergence
Always in the process of convergence
Never reaching the state of convergence
Think In Terms Of Consistency Boundaries
Small islands of strong consistency in a
river of constant change and uncertainty
Data on the inside vs Data on the outside - Pat Helland
Inside Data
Our current present state
Data on the inside vs Data on the outside - Pat Helland
Inside Data
Our current present state
Outside Data
Blast from the past facts
Data on the inside vs Data on the outside - Pat Helland
Inside Data
Our current present state
Outside Data
Blast from the past facts
Between Services
Hope for the future commands
Data on the inside vs Data on the outside - Pat Helland
“Autonomy makes information local,
leading to greater certainty and stability.”
- Mark Burgess
In Search of Certainty - Mark Burgess
Ⅴ
ⅤTailor Consistency
Individualize consistency per component
to balance availability and performance
STRONG
Consistency
Is the wrong default
“Two-phase commit is the
anti-availability protocol.”
- Pat Helland
Standing on Distributed Shoulders of Giants - Pat Helland
Doh, you’re right.
All those distributed
transactions are heavy!
Don’t carry around more guarantees than you need!!!
Strong Consistency Within
The Consistency Boundary
BETWEEN
Consistency
Boundaries
It Is A
ZOO
BETWEEN
Consistency
Boundaries
It Is A
ZOO
Eventual
Consistency
We have to rely on
But relax—it’s how the world works
“It's easier to ask for forgiveness
than it is to get permission”
- Grace Hopper
Guess.
Apologize.
Compensate.
Use a protocol of
We need Systems that are Decoupled in
Space and Time
Ⅵ
Decouple Time
Process asynchronously to
avoid coordination and waiting
Ⅵ
“Silence is not only golden.
It is seldom misquoted.”
- Bob Monkhouse
Temporal
Coupling
Reduce
✓ Efficient use of resources
✓ Minimized contention
Go Async
Don’t block needlessly
Needs to be async and non-blocking all the way down
Needs to be async and non-blocking all the way down
Ⅶ
ⅦDecouple Space
Create flexibility by embracing the network
Spatial
Coupling
Reduce
Embrace The Network
✓Make distribution first class
• Avoid the mistakes of EJB, CORBA,
or Network Attached Disks
Embrace The Network
✓Make distribution first class
• Avoid the mistakes of EJB, CORBA,
or Network Attached Disks
✓Go Async
• Use Asynchronous IO
• Use Message-Passing
Embrace The Network
✓Make distribution first class
• Avoid the mistakes of EJB, CORBA,
or Network Attached Disks
✓Go Async
• Use Asynchronous IO
• Use Message-Passing
✓Leverage Location Transparency
• Mobility, Virtual Addressing
Location Transparency
One abstraction for Communication
across all dimensions of scale
Location Transparency
One abstraction for Communication
across all dimensions of scale
Core Socket CPU
Container Server
Rack Data Center Global
Spatial
Decoupling
Enables Resilience
Ⅷ
ⅧHandle Dynamics
Continuously adapt to varying
demand and resources
Be Elastic
React to changes in the input rate
Increasing/decreasing resources
When Resources
Are Fixed
Decrease the scope of processed Inputs
Signal degradation to the outside
fast producer
Should never overload
slow consumer
Always Apply
Back Pressure
fast producer
Should never overload
slow consumer
Always Apply
Back Pressure
The Reactive Principles
I. Stay Responsive
II. Accept Uncertainty
III. Embrace Failure
IV. Assert Autonomy
V. Tailor Consistency
VI. Decouple Time
VII. Decouple Space
VIII. Handle Dynamics
Reactive Patterns
1. Partition State
2. Communicate Facts
3. Isolate Mutations
4. Coordinate Dataflow
5. Localize State
6. Observe Communications
7. TBD (help out)
We also have a growing catalog of
https://principles.reactive.foundation
Learn More
https://principles.reactive.foundation
Learn More
https://principles.reactive.foundation
Help OUT
The Reactive Principles: Eight Tenets For Building Cloud Native Applications

The Reactive Principles: Eight Tenets For Building Cloud Native Applications