Microservices and Serverless continue to be two of the most hyped terms in our industry. As I’ve explored previously, some of that hype may be justified, but you need to take some time to cut to the heart of what makes them important if you want to get the most out of them. I remain convinced that Serverless technology offers the potential to make teams significantly more productive, but I still find people confused as to what serverless actually is, and whether or not things like Cloud Functions mean we no longer need to worry about microservices, and if we can pretend that servers no longer exist.
In this talk, I’ll try to show just why serverless technology is so powerful, and I’ll also show how it fits in with microservices. As I will show, Microservices and Serverless goes together very well indeed - and that perhaps, just perhaps, you can stop worrying about servers.
14. @samnewman
“Spending on private cloud infrastructure will grow at a
(compound annual growth rate) of 9.2%.”
According to IDC, over the next five years:
15. @samnewman
“Spending on private cloud infrastructure will grow at a
(compound annual growth rate) of 9.2%.”
According to IDC, over the next five years:
Compared to the growth of public cloud over the same period
being forecast as growing at 6%
19. @samnewman
A BRIEF (AND INCOMPLETE) HISTORY OF INFRA
Physical Infrastructure
Virtualised Infrastructure
Early 2000
20. @samnewman
A BRIEF (AND INCOMPLETE) HISTORY OF INFRA
Physical Infrastructure
Virtualised Infrastructure
Early 2000
Awesome!
21. @samnewman
A BRIEF (AND INCOMPLETE) HISTORY OF INFRA
Physical Infrastructure
Virtualised Infrastructure
Early 2000
OpenStack
2010s
Awesome!
22. @samnewman
A BRIEF (AND INCOMPLETE) HISTORY OF INFRA
Physical Infrastructure
Virtualised Infrastructure
Early 2000
OpenStack
2010s
Awesome!
Erm…
23. @samnewman
A BRIEF (AND INCOMPLETE) HISTORY OF INFRA
Physical Infrastructure
Virtualised Infrastructure
Early 2000
OpenStack
2010s
Kubernetes-based
platforms
2018+
Awesome!
Erm…
34. @samnewman
BETTER ON THE CLOUD?
Underlying Hardware
Operating System
Hypervisor
VM OS
Container Management/Kubernetes
Container OS
Your App
VM OS VM OS
K8 K8
Container
OS
Your Pod
35. @samnewman
BETTER ON THE CLOUD?
Underlying Hardware
Operating System
Hypervisor
VM OS
Container Management/Kubernetes
Container OS
Your App
VM OS VM OS
K8 K8
Container
OS
Your Pod
Cloud IAAS
36. @samnewman
BETTER ON THE CLOUD?
Underlying Hardware
Operating System
Hypervisor
VM OS
Container Management/Kubernetes
Container OS
Your App
VM OS VM OS
K8 K8
Container
OS
Your Pod
Cloud Container Platform
50. @samnewman
BETTER WITH FAAS?
Underlying Hardware
Operating System
Hypervisor
VM OS
Container Management/Kubernetes
Container OS
Your Function
Container OS
Your App
51. @samnewman
BETTER WITH FAAS?
Underlying Hardware
Operating System
Hypervisor
VM OS
Container Management/Kubernetes
Container OS
Your Function
Container OS
Your App
Cloud FAAS
55. Physical Infra Setup
CoAAS Managed DBs
Managed Services
Compute Network Storage
Virtualised Infra
FAAS BAAS Messaging
Serverless
56. Physical Infra Setup
Platform As A Service
CoAAS Managed DBs
Managed Services
Compute Network Storage
Virtualised Infra
FAAS BAAS Messaging
Serverless
57. Physical Infra Setup
Platform As A Service
CoAAS Managed DBs
Managed Services
Less Infra
Overhead
Compute Network Storage
Virtualised Infra
FAAS BAAS Messaging
Serverless
58. Physical Infra Setup
Platform As A Service
CoAAS Managed DBs
Managed Services
Less Infra
Overhead
Greater
Control
Compute Network Storage
Virtualised Infra
FAAS BAAS Messaging
Serverless
62. @samnewman
FAAS IN A NUTSHELL
FAAS Platform
Function
Triggered By: Launched Automatically
63. @samnewman
FAAS IN A NUTSHELL
FAAS Platform
API Call
Function
Triggered By: Launched Automatically
64. @samnewman
FAAS IN A NUTSHELL
FAAS Platform
API Call
Message
Function
Triggered By: Launched Automatically
65. @samnewman
FAAS IN A NUTSHELL
FAAS Platform
API Call
Message
File
Function
Triggered By: Launched Automatically
66. @samnewman
FAAS IN A NUTSHELL
FAAS Platform
API Call
Message
Time-based
File
Function
Triggered By: Launched Automatically
67. @samnewman
Function
FAAS IN A NUTSHELL
FAAS Platform
API Call
Message
Time-based
File
Function
Triggered By: Launched Automatically
Scales up on demand
68. @samnewman
Function
FAAS IN A NUTSHELL
FAAS Platform
API Call
Message
Time-based
File
Function
Triggered By: Launched Automatically
Function
Scales up on demand
69. @samnewman
Function
FAAS IN A NUTSHELL
FAAS Platform
API Call
Message
Time-based
File
Function
Triggered By: Launched Automatically
Function
Function
Scales up on demand
70. @samnewman
Function
FAAS IN A NUTSHELL
FAAS Platform
API Call
Message
Time-based
File
Function
Triggered By: Launched Automatically
Function
Function
Scales up on demand
Pay as you go
91. @samnewman
In general, a microservice instance is assumed to be
permanently running waiting for something to happen
92. @samnewman
In general, a microservice instance is assumed to be
permanently running waiting for something to happen
They can be deployed on to physical machines, VMs,
or containers
101. @samnewman
A GOOD STARTING POINT
Shipping
Shipping
<<function>>
Helps gain familiarity with the
FAAS concepts and tooling
102. @samnewman
A GOOD STARTING POINT
Shipping
Shipping
<<function>>
Helps gain familiarity with the
FAAS concepts and tooling
Single deployable
103. @samnewman
A GOOD STARTING POINT
Shipping
Shipping
<<function>>
Helps gain familiarity with the
FAAS concepts and tooling
Single deployable
Drastically reduced infra work
106. @samnewman
AGGREGATES
“A cluster of associated objects that are treated
as a unit for the purpose of data changes”
- Eric Evans, Domain-Driven Design
107. @samnewman
AGGREGATES
“A cluster of associated objects that are treated
as a unit for the purpose of data changes”
- Eric Evans, Domain-Driven Design
We want to manage an aggregate as a single
“entity” in terms of state changes
108. @samnewman
AGGREGATES
“A cluster of associated objects that are treated
as a unit for the purpose of data changes”
- Eric Evans, Domain-Driven Design
We want to manage an aggregate as a single
“entity” in terms of state changes
We want all operations which manage the state
to behave in a consistent fashion
112. @samnewman
AGGREGATE MANAGEMENT AS A FUNCTION
Shipping
Route
Delivery Consignment
Identify aggregates
within your microservice
One function can
manage all operations of
the aggregate
113. @samnewman
AGGREGATE MANAGEMENT AS A FUNCTION
Shipping
Route
Delivery Consignment
Identify aggregates
within your microservice
One function can
manage all operations of
the aggregate
Hide this detail from
consumers
129. @samnewman
MESSAGING
Both AWS and Azure
have lots of great options
Again, behaviour can be
different to what you’re
used to
For Kubernetes fans?
Well…
132. Physical Infra Setup
Platform As A Service
CoAAS Managed DBs
LessInfraOverhead
MoreLowLevelAccess
GreaterControl
Compute Network Storage
Virtualised Infra
FAAS BAAS Messaging
Serverless