©2016 Apigee Corp. All Rights Reserved.
Five Things You Should
Know
About Serverless
Greg Brail
©2016 Apigee Corp. All Rights Reserved.
What is ā€œServerless?ā€
©2016 Apigee Corp. All Rights Reserved.
Execution model in code runs in a fully managed,
environment; the provider handles the servers,
operating systems and runtime environments
©2016 Apigee Corp. All Rights Reserved.
No servers to manage Automatic Scale
Pay by request
Lightweight Code with No
State
Attributes of Serverless
©2016 Apigee Corp. All Rights Reserved.
Deployment = VM Code
Event based
No access to file system
Pay by request
Built-in logging / monitoring
Google Cloud Functions
AWS Lambda
Azure Functions
What is FaaS?
©2016 Apigee Corp. All Rights Reserved.
Technologies: Amazon Lambda
Reinvigorated the ā€œserverlessā€ craze
Functions in Node.js, Java, Python, or
.NET.
Functions invoked by HTTP APIs
through ā€œAPI Gatewayā€
Functions also invoked by changes to
S3, DynamoDB, etc.
Priced by request count and CPU usage
by second
6
©2016 Apigee Corp. All Rights Reserved.
Technologies: Azure Functions
C#, F#, Node.js, Python, bash, or custom
function types
Triggered by HTTP APIs plus various events in
the Azure platform
Priced by CPU usage in seconds
7
©2016 Apigee Corp. All Rights Reserved.
Technologies: Cloud Functions
Functions written in Node.js
Called as HTTP APIs, from Cloud
Storage, or Cloud Pub / Sub
Alpha release so far
8
©2016 Apigee Corp. All Rights Reserved.
Technologles: App Engine
The original ā€œserverless,ā€ but technically ā€œPaaSā€
in some forms
Python, Java, PHP, Go, Node.js, Ruby, and
custom runtimes
Invoked via an HTTP API
Priced by machine instance hour (ā€standard
environmentā€) or by CPU usage (ā€œflexā€)
9
©2016 Apigee Corp. All Rights Reserved.
How Serverless Changes Things
10
©2016 Apigee Corp. All Rights Reserved.
Application Design Matters
Not everything can work in a
serverless world
Developers working with
PaaS learned that as well
11
By Adam Wiggins, 12factor.net
©2016 Apigee Corp. All Rights Reserved.
Faa
S
Baa
S
PubSub
API Gateway
Async
Events
Sync
Events
Reimagined Stack
©2016 Apigee Corp. All Rights Reserved.
Simple database as a service
Usually NoSQL
Limited index configuration
Pay by request / storage
Built-in logging / monitoring
API BaaS
(Usergrid)
Firebase
DynamoDB
Cloud
Datastore
SimpleDB
Google BaaS
AWS BaaS
What is BaaS?
Cloud Datastore Transactions Per Second
(50x Actual Traffic, 5X Worst Case Estimate, 1X Target Traffic)
Original Launch Target Estimated Worst Case Actual Traffic
©2016 Apigee Corp. All Rights Reserved.
ā— Economies of Scale
ā— No Less Ops
ā— Simplified Programming
Model
BaaS Benefits
©2016 Apigee Corp. All Rights Reserved.
Faa
S
PubSub
API Gateway
Async
Events
Sync
Events
Communication Patterns
©2016 Apigee Corp. All Rights Reserved.
/order
function getOrder(..)
function createOrder(..)
function updateOrder(..)
function deleteOrder(..)
APIs for REST <-> RPC
©2016 Apigee Corp. All Rights Reserved.
Design
Develop
Secure
PublishMonitor
Analyze
Monetize
Scale
Full Lifecycle API Management
©2016 Apigee Corp. All Rights Reserved.
Example Production Deployment
©2016 Apigee Corp. All Rights Reserved.
When does Serverless Make
Sense?
20
©2016 Apigee Corp. All Rights Reserved.
©2016 Apigee Corp. All Rights Reserved.
Serverless == Different Constraints
Faster code deployment
Lower initial cost
More flexible overall architecture
... But …
Have to stay ā€œin boundsā€
Should keep deployments small
Many potential dependencies
22
©2016 Apigee Corp. All Rights Reserved.
Flexibility vs. Convenience
23
Serverless
PaaS
Containers
Virtual
Machines
More Limited
Environment
Limited
Environment
Containers
Only
Fully Flexible
Most
Convenient
Least
Convenient
©2016 Apigee Corp. All Rights Reserved.
Serverless PaaS Containers VMs
Run Servers depends āœ”
React to many
event types
āœ”
Billed by request depends container VM
Local state āœ” āœ”
Run any
environment
āœ” āœ”
Customize OS āœ” āœ”
How Do I Choose?
27
Your turn!
apigee.com/about/developers
https://cloud.google.com/nodejs/samples/
@pbhogill
©2016 Apigee Corp. All Rights Reserved.
Stack Reimagined Simplified
Cheap Lots of fun
Some Gotchas
Five Things to Know
©2016 Apigee Corp. All Rights Reserved.
Conclusion
As developers, we live in a world full of options
It’s up to us to learn them try, them, and apply what we learn
29
Thank you
30

London Adapt or Die: Five Things Enterprises Should Know About Serverless

  • 1.
    ©2016 Apigee Corp.All Rights Reserved. Five Things You Should Know About Serverless Greg Brail
  • 2.
    Ā©2016 Apigee Corp.All Rights Reserved. What is ā€œServerless?ā€
  • 3.
    ©2016 Apigee Corp.All Rights Reserved. Execution model in code runs in a fully managed, environment; the provider handles the servers, operating systems and runtime environments
  • 4.
    ©2016 Apigee Corp.All Rights Reserved. No servers to manage Automatic Scale Pay by request Lightweight Code with No State Attributes of Serverless
  • 5.
    ©2016 Apigee Corp.All Rights Reserved. Deployment = VM Code Event based No access to file system Pay by request Built-in logging / monitoring Google Cloud Functions AWS Lambda Azure Functions What is FaaS?
  • 6.
    Ā©2016 Apigee Corp.All Rights Reserved. Technologies: Amazon Lambda Reinvigorated the ā€œserverlessā€ craze Functions in Node.js, Java, Python, or .NET. Functions invoked by HTTP APIs through ā€œAPI Gatewayā€ Functions also invoked by changes to S3, DynamoDB, etc. Priced by request count and CPU usage by second 6
  • 7.
    ©2016 Apigee Corp.All Rights Reserved. Technologies: Azure Functions C#, F#, Node.js, Python, bash, or custom function types Triggered by HTTP APIs plus various events in the Azure platform Priced by CPU usage in seconds 7
  • 8.
    ©2016 Apigee Corp.All Rights Reserved. Technologies: Cloud Functions Functions written in Node.js Called as HTTP APIs, from Cloud Storage, or Cloud Pub / Sub Alpha release so far 8
  • 9.
    Ā©2016 Apigee Corp.All Rights Reserved. Technologles: App Engine The original ā€œserverless,ā€ but technically ā€œPaaSā€ in some forms Python, Java, PHP, Go, Node.js, Ruby, and custom runtimes Invoked via an HTTP API Priced by machine instance hour (ā€standard environmentā€) or by CPU usage (ā€œflexā€) 9
  • 10.
    ©2016 Apigee Corp.All Rights Reserved. How Serverless Changes Things 10
  • 11.
    ©2016 Apigee Corp.All Rights Reserved. Application Design Matters Not everything can work in a serverless world Developers working with PaaS learned that as well 11 By Adam Wiggins, 12factor.net
  • 12.
    ©2016 Apigee Corp.All Rights Reserved. Faa S Baa S PubSub API Gateway Async Events Sync Events Reimagined Stack
  • 13.
    ©2016 Apigee Corp.All Rights Reserved. Simple database as a service Usually NoSQL Limited index configuration Pay by request / storage Built-in logging / monitoring API BaaS (Usergrid) Firebase DynamoDB Cloud Datastore SimpleDB Google BaaS AWS BaaS What is BaaS?
  • 14.
    Cloud Datastore TransactionsPer Second (50x Actual Traffic, 5X Worst Case Estimate, 1X Target Traffic) Original Launch Target Estimated Worst Case Actual Traffic
  • 15.
    Ā©2016 Apigee Corp.All Rights Reserved. ā— Economies of Scale ā— No Less Ops ā— Simplified Programming Model BaaS Benefits
  • 16.
    ©2016 Apigee Corp.All Rights Reserved. Faa S PubSub API Gateway Async Events Sync Events Communication Patterns
  • 17.
    ©2016 Apigee Corp.All Rights Reserved. /order function getOrder(..) function createOrder(..) function updateOrder(..) function deleteOrder(..) APIs for REST <-> RPC
  • 18.
    ©2016 Apigee Corp.All Rights Reserved. Design Develop Secure PublishMonitor Analyze Monetize Scale Full Lifecycle API Management
  • 19.
    ©2016 Apigee Corp.All Rights Reserved. Example Production Deployment
  • 20.
    ©2016 Apigee Corp.All Rights Reserved. When does Serverless Make Sense? 20
  • 21.
    ©2016 Apigee Corp.All Rights Reserved.
  • 22.
    Ā©2016 Apigee Corp.All Rights Reserved. Serverless == Different Constraints Faster code deployment Lower initial cost More flexible overall architecture ... But … Have to stay ā€œin boundsā€ Should keep deployments small Many potential dependencies 22
  • 23.
    ©2016 Apigee Corp.All Rights Reserved. Flexibility vs. Convenience 23 Serverless PaaS Containers Virtual Machines More Limited Environment Limited Environment Containers Only Fully Flexible Most Convenient Least Convenient
  • 24.
    Ā©2016 Apigee Corp.All Rights Reserved. Serverless PaaS Containers VMs Run Servers depends āœ” React to many event types āœ” Billed by request depends container VM Local state āœ” āœ” Run any environment āœ” āœ” Customize OS āœ” āœ” How Do I Choose?
  • 25.
  • 26.
    ©2016 Apigee Corp.All Rights Reserved. Stack Reimagined Simplified Cheap Lots of fun Some Gotchas Five Things to Know
  • 27.
    Ā©2016 Apigee Corp.All Rights Reserved. Conclusion As developers, we live in a world full of options It’s up to us to learn them try, them, and apply what we learn 29
  • 28.