Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/2koiCeo.
Tod Golding discusses the architecture and design strategies associated with building and delivering SaaS solutions in a serverless model. He examines how serverless SaaS touches every dimension of an environment, including DevOps, analytics, management & monitoring, and developer experience. Filmed at qconsf.com.
Tod Golding is a cloud applications architect who has spent the last five years immersed in cloud-optimized application design and architecture. He’s currently an architect at Amazon Web Services focused on SaaS application architecture, design, and delivery. He has over 20 years of experience as an architect and developer, including time at both startups and tech giants (AWS, eBay, Microsoft).
2. InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
servereless-saas
3. Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon San Francisco
www.qconsf.com
4. Chasing
The
SaaS
Dream
Tenant
Consump/on
Cost,
Scale,
Performance
Consump/on
Time
5. We
Started
Here
Unit
of
Scale
=
Web/App
Server
Web Servers
App Servers
Checkout
Taxa/on
Shipping
App
Server
Checkout
Taxa/on
Shipping
App
Server
Single
Tenant
Load
Mul/-‐Tenant
Load
7. Nirvana:
Just
Let
Me
Write
Code!
• Servers
shouldn’t
be
part
of
the
equa/on
• Pay
for
the
code
that
runs—not
the
servers
• I
provide
the
code,
someone
else
provides
the
scale
• If
there’s
nothing
running,
then
I
don’t
pay
8. The
Serverless
Compute
Manifesto
• Func/ons
are
the
unit
of
deployment
and
scaling.
• No
machines,
VMs,
or
containers
visible
in
the
programming
model.
• Permanent
storage
lives
elsewhere.
• Scales
per
request.
Users
cannot
over-‐
or
under-‐provision
capacity.
• Never
pay
for
idle
(no
cold
servers/containers
or
their
costs).
• Implicitly
fault-‐tolerant
because
func/ons
can
run
anywhere.
• BYOC
–
Bring
your
own
code.
• Metrics
and
logging
are
a
universal
right.
9. Mapping
Serverless
to
SaaS
Serverless
Values/Tenets
Consump/on
Op/miza/on
Commit
Unit
Test
System
Test
QA
Staging
Agility
Tenant1
Tenant
Isola/on
SaaS
Developer
Tenant2
10. Serverless
SaaS
with
AWS
Lambda
AWS
API
Gateway
AWS
Lambda
Func/ons
Amazon
CloudFront
Storage
Services
Sta/c
Web
Content
Democra1zed
Scale
• A
serverless,
event-‐driven
compute
service
• Managed,
scalable
func/ons
• All
func/ons
executed
in
parallel
• Pay
based
on
consump/on
• Includes
support
for
logging
&
monitoring
• Supports
JavaScript,
NodeJS,
Python,
or
any
JVM-‐based
language
11. Order
Management
Service
Order
Management
Service
Order
Management
Service
A
More
Granular
View
of
Consump/on
Order
Management
Service
POST
/orders/712
PUT
/orders/42
DELETE
/orders/651
GET
/orders
GetOrder()
UpdateOrder()
DeleteOrder()
GetOrder()
GetOrder()
UpdateOrder()
Scale
Scale
Policy
Policy
12. Striking
A
Beher
Balance
S1
S2
S4
S5
S3
S6
S7
S8
S9
Coarse-‐Grained
Services
Fined
Grained
Func/ons
A
more
ac/onable,
more
insighlul
management
and
monitoring
view
14. Where’s
My
REST
API?
AWS
API
Gateway
POST
/orders/712
PUT
/orders/42
DELETE
/orders/851
GET
/orders
PATCH
/orders/219
• Define
REST
entry
points
separate
from
Lambda
func/ons
• Managed
scaling
• Supports
custom
domains
• Integra/on
with
Amazon
CloudFront
for
DDoS
protec/on
• Handles
authen/ca/on,
throhling,
metering,
monitoring
• Developer
integra/on
with
mock
responses
15. Tenant
Consump/on
Considera/ons
• Severless
lets
us
mirror
actual
tenant
consump/on
• Scaling
op/miza/on
and
turning
becomes
someone
else’s
job
• Focus
is
on
code,
not
policies
and
scaling
analy/cs
• Embrace
the
micro
in
microservices
• Larger
func/ons
take
more
/me
to
load
• Func/on-‐level
decomposi/on
may
influence
your
storage
encapsula/on
model
• The
boundaries
of
services
and
contracts
gets
blurry
16. Serverless
and
SaaS
Agility
Scheduled Maintenance
Friday,
April
1,
11:00-‐12:00PM
The
system
will
be
down
for
maintenance
this
evening.
We
apologize
for
any
inconvenience
this
may
cause.
Close
Achieving
zero-‐down/me
on
SaaS
requires:
• Ability
to
deploy
small,
decoupled
units
of
func/onality
• A
strategy
that
expects
and
embraces
fault
tolerance
• A
well-‐defined
mechanism
for
staging
and
releasing
new
features
• An
approach
that
enables
con/nual
and
frequent
releases
17. Can’t
Get
Much
Smaller
Than
This
Commit
Unit
Test
System
Test
QA Staging Prod
Commit
Unit
Test
System
Test
QA Staging Prod
Commit
Unit
Test
System
Test
QA Staging Prod
GetOrder()
CreateOrder()
UpdateOrder()
• The
granular
nature
of
the
serverless
model
promotes
less
invasive
deployments
• Func/ons
tend
to
have
less
dependencies
18. Beher
Fault
Tolerance
=
Beher
Agility
• Finer
grained
func/ons
promote
more
refined
fault
tolerance
• More
opportuni/es
for
implement
fallback
strategies
• Less
exposure
and
visibility
when
a
service
fails
• Greater
resilience
translates
into
greater
agility
Catalog
Ra/ngs
Checkout
Taxa/on
CrossSell
Cart
Search
19. Versioning
Your
Lambda
Func/ons
• Immutable
versions
of
func/ons
• CloudWatch
Logs
contain
version
• Aliases
decouple
clients
from
versioning
• $LATEST
contains
latest
code
• Aliases
can
be
reassigned
• Aliases
can
be
used
to
support
rollback
20. Con/nuous
Delivery
of
API
Changes
Define
deployment
stages
Qualify
with
stage
variables
Invoke
URL:
hhps://65d00yhath.execute-‐api.ap-‐northeast-‐1.amanzonaws.com/prod
21. Serverless
Agility
Considera/ons
• Serverless
can
reduce
your
deployment
automa/on
footprint
• Serverless
osen
alters
your
automated
tes/ng
model
• Use
serverless
to
revisit
fault
tolerance
strategies
• API
mocks
can
add
development
agility
• API
Gateway
stages
and
Lambda
versioning
a
powerful
duo
• Serverless
granularity
promotes
agility
22. Serverless
&
Tenant
Isola/on
AWS
API
Gateway
Tenant
1
Tenant
2
Where
does
silo
fit
here?
Web
Tier
App
Tier
Tenant
1
Web
Tier
App
Tier
Tenant
2
Web
Tier
Tenants
3
…
N
App
Tier
Hybrid
Tenant
Isola/on
23. Serverless
Isola/on
Tenant
1
Access
Policy
(IAM)
Tenant
2
Access
Policy
(IAM)
• No
tenant
specific
provisioning
of
compute
services
• Cost
is
that
same
as
a
fully
pooled
mul/-‐tenant
environment
• Policies
control
scoped
access
to
AWS
resources
• Simpler
provisioning
and
management
Lambda
25. Serverless
SaaS
Takeaways
• Focus
on
your
code,
not
your
servers
or
your
scale
• Embracing
the
programming
model
takes
/me
• If
you
weren’t
agile
before,
you
will
be
now
• Management
&
monitoring
looks
different
• Avoid
centralized
storage
models
• There’s
more
than
one
way
to
fire
a
Lambda
func/on
• Serverless
is
s/ll
evolving