SlideShare a Scribd company logo
1 of 111
Download to read offline
1
Hello
• Jürgen Brüder
• @jaybrueder
• Works for Infralovers / Commandemy
• Loves all things DevOps, Code and Infra
2
3
4
Agenda
• The concept
• Serverless vs FaaS
• Tooling
• Demo
• Cri7cism
• My experience with customer projects
5
What is "serveless"
• Serverless is about abstrac0ng away servers, infrastructure and
having to deal with low-level configura0on or the core opera0ng
system
• Code is not run as a full applica0on, but a set of small func0ons
• Next step a@er using containers
6
7
To be real serverless
Func%ons need to run on ephemeral compute resources
8
There is more
• Command line tool of the same name
• Rethinking architecture of so6ware
9
10
IT-Marke)ng term of the year?
Companies are looking for ways to brand their offerings as
serverless
11
Why call it "serverless"?
• It's a bad choice
• The server does not go away
• It gets even more abstracted than with a VM or a container
• Is there a be9er term?
12
13
Let's look at what serverless is trying
to achieve
14
Lower opera)ons burden
• Fewer people
• Leaner teams
• Lower cost
• Be2er security
• Be2er resilience
15
It's about
• No maintenance
• Micro func0onality
• Simplicity, but is not necessarily simpler
• Rethinking code
16
Faster (me to market
Less to build = higher feature velocity
17
Focus on business value
What we’re talking about is outsourcing parts of our architecture
and implemen8on that are not core to delivering business value
- Ben Kehoe, iRobot
18
Compute in a system should not be
required to be con3nually-living
19
Compute infrastructure should not
even exist when not handling data
20
A persistent compu.ng resource is
a server no ma2er what form that
resource takes
21
Serverless is not FaaS
• Func&on as a Service (FaaS)
• FaaS is an integral component of serverless architecture
22
Func%on as a Service (FaaS)
• Deploy any individual piece of code, or func3on
• Code runs and returns a value, in turn ending the process
• Services and endpoints you would keep in one place are now
sliced up into a bunch of snippets
• Goal is to abstract away servers from the developer and bill
based on the amount of 3mes the func3ons were invoked
23
24
Serverless is not event-driven compute
• "Serverless is all about the events" = wrong
• Event-driven compu;ng is a natural fit for serverless
architectures
• Possible and reasonable to build tradi;onal data flows in
serverless
25
26
FaaS is not always F
• Containers can be FaaS
• Container have a stronger "contract" with the developer
• S8ll, decouples developer from pla=orm
• If container run during invoca8ons, and then are frozen/recycled,
the container is ac8ng as a func8on
27
28
FaaS is not always aaS
• Serverless is not just public cloud
• You can be your own FaaS provider
• For big enterprises this makes sense
• Can enable rest of company to "do" serverless
• By running a lot of servers with so@ware on them
29
30
A be%er term?
• Service-Full
• Coined by Patrick Debois, Townheroes
• h=ps://twi=er.com/patrickdebois
31
Service-Full
• As a applica*on becomes increasingly serverless, it relies more
on external services to provide the building blocks of the system
• E.g. using Amazon Elas*csearch Service (AES) instead of hos*ng
Elas*csearch yourself
• 12 factor apps
• Immutable infrastructure
32
33
Service-Full FaaS
• FaaS applica*on on cluster using on-premise servers
• FaaS applica*on on cluster using public cloud IaaS
• FaaS applica*on on managed cluster (e.g. Google Container
Engine)
• Managed FaaS
• That are serverless if they use ephemeral compute resources
34
FaaS does not have to use
ephemeral compute resources
35
36
37
38
Public FaaS offerings
39
40
41
42
43
Public billing model
• Pay-per-use pricing model
• Pay nothing at idle (except for data at rest)
• Know what part of your applica<on costs the most
44
45
Summing up
• Spectrum
• Serverless != FaaS
• Service-full + ephemeral compute
• Tighter correspondence between resources used and resources
billed
• Smaller and more abstracted control plane
46
When should I consider serverless?
47
Reasons
• Easy scaling
• Low maintenance
• Any applica4on you have in produc4on where your user
throughput varies is a valid contender
• Response 4me is not your first concern
48
What about the developers?
49
Lastly, if you suck at the Linux shell,
and if DevOps is not your thing, you
have every reason to try Serverless.
- Adnan Rahić, Hackernoon
50
Requires us to change our approach
• Serverless architecture is "special"
• Se1ng it up takes a fair share of mental power
• Live with the fact that we do not have overview of our whole
system
51
An example
52
We will be using AWS Lambda
AWS Lambda is a compute service that lets you run code without
provisioning or managing servers.
— AWS Documenta/on
53
54
AWS Lambda
• Event based system for running code in the cloud
• "No servers"
• Just code
• Scales automa;cally
• Easy to integrate into CI/CD pipelines
55
AWS Lambda Docs say
• It takes )me to set up a container and do the necessary
bootstrapping, which adds some latency each )me the Lambda
func)on is invoked.
• You typically see this latency when a Lambda func)on is invoked
for the first )me or a@er it has been updated because AWS
Lambda tries to reuse the container for subsequent invoca)ons
of the Lambda func)on.
h"p://docs.aws.amazon.com/lambda/latest/dg/lambda-
56
How it works
• Lambda maintains the container for some 2me in an2cipa2on of
another Lambda func2on invoca2on
• It freezes the container a8er a Lambda func2on completes
• If no further requests occur, it destroys the container
57
Available run,mes
• NodeJS (4.3.2 and 6.10.3)
• Java (8)
• Python (3.6, 2.7)
• .NET Core
58
AWS API Gateway
• Instant API
• To reach my code, I want to put it behind an API
• API Requests will be the events that trigger the code
59
Problems
• Manual interac-on with AWS dashboard
• Code editor, Drag n Drop etc.
• I am an automa-ons guy, I avoid manual steps whenever I can
60
Can I automate this right away?
61
62
The Serverless Framework
Serverless is your toolkit for deploying and opera4ng serverless
architectures. Focus on your applica4on, not your infrastructure.
— serverless.com
63
The Serverless Framework
• Removes the manual component of interac4ng with AWS
Lambda / API Gateway
• Node NPM package you control through the command line
• bundles all the tools you need into a manageable package
• Simplifies crea4on and deployments of applica4ons
64
Our applica*on
65
Be-Nice API
• Setup a simple data processing pipeline
• Expose one HTTP endpoint that allows use to submit a text note
• The message is processed in the background
• Messages above a certain sen>ment level are "saved"
66
Sen$ment
• AFINN-based sen.ment analysis for Node.js
• Returns score for a specific string
var sentiment = require('sentiment');
var r1 = sentiment('Cats are stupid.');
console.dir(r1); // Score: -2, Comparative: -0.666
var r2 = sentiment('Cats are totally amazing!');
console.dir(r2); // Score: 4, Comparative: 1
67
AFINN
AFINN is a list of English words rated for valence with an integer
between minus five (nega<ve) and plus five (posi<ve). The words
have been manually labeled by Finn Årup Nielsen in 2009-2011.
The file is tab-separated.
h"p://www2.imm.dtu.dk/pubdb/views/publica6on_details.php?
id=6010
68
We also use Amazon SNS
• Amazon Simple No/fica/on Service (SNS)
• Fully managed pub/sub messaging and mobile no/fica/ons
service
• publish-subscribe mode / retries
• Is an event that can trigger a func/on for us
• Helps us "unblock" ephemeral compute resources
69
70
That's basically every mobile/web
app backend in the world covered ;)
71
I have prepared the environment
already to save 2me
72
Step 1: Installing serverless
Have NodeJs installed on your worksta4on
$ npm install -g serverless
73
Step 2: Create an IAM User in your AWS
Console
• Have an AWS account
• Create an IAM user with programma:c access
• Add permissions according to whatever you want that user to do
• Get Access Key ID and Secret Access Key
74
Step 3: Tie your creden1als to serverless
$ serverless config credentials --provider aws --key xxxxxxxxxxxxxx --secret xxxxxxxxxxxxxx
Serverless: Setting up AWS...
Serverless: Saving your AWS profile in "~/.aws/credentials"...
Serverless: Success! Your AWS access keys were stored under the "default" profile.
75
With that, we are ready to conquer
the world!
76
Create the service
$ serverless create --template aws-nodejs --path benice
Serverless: Generating boilerplate...
Serverless: Generating boilerplate in "/Users/juergen/.../demo/benice"
_______ __
| _ .-----.----.--.--.-----.----| .-----.-----.-----.
| |___| -__| _| | | -__| _| | -__|__ --|__ --|
|____ |_____|__| ___/|_____|__| |__|_____|_____|_____|
| | | The Serverless Application Framework
| | serverless.com, v1.24.1
-------'
Serverless: Successfully generated boilerplate for template: "aws-nodejs"
77
This generates 3 files
• serverless.yml contains all the configura1on se2ngs
• handler.js
• .gi1gnore
78
serverless.yml
# serverless.yml
service: my-service
provider:
name: aws
runtime: nodejs6.10
functions:
hello:
handler: handler.hello
79
What we can see
• The func*ons property lists all the func*ons in the service.
• You can see hello is the only func*on in the handler.js file
80
handler.js
'use strict';
module.exports.hello = (event, context, callback) => {
const response = {
statusCode: 200,
body: JSON.stringify({
message: 'Go Serverless v1.0! Your function executed successfully!',
input: event,
}),
};
callback(null, response);
// Use this code if you don't use the http event with the LAMBDA-PROXY integration
// callback(null, { message: 'Go Serverless v1.0! Your function executed successfully!', event });
};
81
Let's add some real func1onality
82
DEMO
83
What happens during a deployment
• CloudForma+on is used to orchestrate all this
• It creates an S3 (AWS data store) bucket and stores the code in it
• Creates IAM role (permissions) for the func+on
• API Gateway gets created
• Logging
84
There is more than AWS Lambda
85
How we use it in the wild
86
How we use it in the wild
• ChatOps
• Empowering Devs to manage their own stuff on AWS with min.
permissions
• Alexa Skills / FAQ Bot
• Personally: Mobile API prototype
87
This means we can get rid of Ops
altogehter, right?
88
The cri$cal part
89
DevOps does not go away
• Infrastructure management is not the only task that DevOps is
doing
• Automa;on, deployment, tes;ng, security, and monitoring
90
Ops won’t go away in serverless
• Serverless compu.ng is a form of u.lity compu.ng
• Infrastructure completly abstracted from the developer
91
92
Main problems for developers
• Monitoring, debugging, tes0ng, latency, deployment
• Basically everything you need Ops for
93
How to test locally?
Serverless offline plugin
h"ps://github.com/dherault/serverless-offline
94
We observed some pa-ers
• First, there is a genuine concern about cloud provider lock-in
• Second, there is a desire and hope to avoid or at least minimize
such lock-in by embracing open source abstrac<ons and
pla=orms
• Most notably Docker and Kubernetes
95
Complex applica,ons
• An experiences Java Dev may not work on an applica7on with
"just a few func7ons"
• It sounds like a lot of extra work to move something like this into
FaaS
96
Architectural complexity
• Tiny func*ons are nice from an architectural standpoint
• Isn't the complexity moved to somewhere else?
• Isn't complex code moved into complex configura*on?
• AWS Lambda, for now, limits you to how many concurrent
execu*ons you can be running of all your lambdas
97
That means if someone, somewhere,
in your organiza4on does a load test
and starts trying to execute 1000
concurrent Lambda func4ons you’ll
Denial of service (DoS) your
produc4on applica4ons
98
You can probably guess my standpoint
• If you run something that complex, Lambda is not the right
choice
• You should think about running your own FaaS cluster
• FaaS != Public cloud offerings
99
Vendor lock-in
• If that complex configura4on is proprietary, aren't we walking
into a venor lock-in?
• Unexpected limits / cost changes
• This is true for IaaS and PaaS as well
100
Secruity concerns
• Third-Party API systems
• What happens under the hood
101
Control
• Dependent on vendors for debugging and monitoring tools
• At least your team will have these tools now ;)
102
Integra(on tes(ng is #1
• The units of integra0on with Serverless are a lot smaller
• Integra0on tes0ng becomes your #1 concern here
103
Ar#facts
• Problems related to deployment, versioning and packaging also
exist
• You may need to deploy a FaaS ar<fact separately for every
func<on in your en<re logical applica<on
104
Does every func-on start a new container?
• Sounds like a lot of used resources
• How does this affect startup 7mes?
105
I introduced Serverless and all I got
was a remote API
106
What I would use it for
• Applica(on Prototypes (e.g. for StartUp ideas)
• Applica(ons in produc(on (if not (me sensi(ve)
• Microservices
• Bots
• Orchestra(on and maintenance
• Repor(ng
107
What I would not use it for
• Monoliths
• Anything were every milisecond counts
108
How is your experience with
Serverless?
109
Discussion
110
Sources
• h#ps://m.subbu.org/serverless-looking-back-to-see-
forward-74dd1a02cb62
• h#ps://read.acloud.guru/the-serverless-
spectrum-147b02cb2292
• h#ps://www.stardog.com/blog/5-hard-lessons-about-serverless/
• h#ps://medium.com/@PaulDJohnston/what-is-serverless-
architecture-43b9ea4babca
111

More Related Content

What's hot

Infrastructure as Code and AWS CDK
Infrastructure as Code and AWS CDKInfrastructure as Code and AWS CDK
Infrastructure as Code and AWS CDKSupratipBanerjee
 
Building serverless applications with Apache OpenWhisk
Building serverless applications with Apache OpenWhiskBuilding serverless applications with Apache OpenWhisk
Building serverless applications with Apache OpenWhiskDaniel Krook
 
Building Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWSBuilding Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWSAmazon Web Services
 
Serverless Apps with Open Whisk
Serverless Apps with Open Whisk Serverless Apps with Open Whisk
Serverless Apps with Open Whisk Dev_Events
 
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...Henning Jacobs
 
Containers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes IstioContainers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes IstioAraf Karsh Hamid
 
Serverless Reality
Serverless RealityServerless Reality
Serverless RealityLynn Langit
 
Serverless Computing Model
Serverless Computing ModelServerless Computing Model
Serverless Computing ModelMohamed Samir
 
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton Docker, Inc.
 
NetflixOSS for Triangle Devops Oct 2013
NetflixOSS for Triangle Devops Oct 2013NetflixOSS for Triangle Devops Oct 2013
NetflixOSS for Triangle Devops Oct 2013aspyker
 
Paris Kafka Meetup - patterns anti-patterns
Paris Kafka Meetup -  patterns anti-patternsParis Kafka Meetup -  patterns anti-patterns
Paris Kafka Meetup - patterns anti-patternsFlorent Ramiere
 
FLUX - Crash Course in Cloud 2.0
FLUX - Crash Course in Cloud 2.0 FLUX - Crash Course in Cloud 2.0
FLUX - Crash Course in Cloud 2.0 Mark Hinkle
 
Beyond the brokers - Un tour de l'écosystème Kafka
Beyond the brokers - Un tour de l'écosystème KafkaBeyond the brokers - Un tour de l'écosystème Kafka
Beyond the brokers - Un tour de l'écosystème KafkaFlorent Ramiere
 
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...confluent
 
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...OpenWhisk
 
JHipster conf 2019 - Kafka Ecosystem
JHipster conf 2019 - Kafka EcosystemJHipster conf 2019 - Kafka Ecosystem
JHipster conf 2019 - Kafka EcosystemFlorent Ramiere
 
Flowcon (added to for CMG) Keynote talk on how Speed Wins and how Netflix is ...
Flowcon (added to for CMG) Keynote talk on how Speed Wins and how Netflix is ...Flowcon (added to for CMG) Keynote talk on how Speed Wins and how Netflix is ...
Flowcon (added to for CMG) Keynote talk on how Speed Wins and how Netflix is ...Adrian Cockcroft
 
Cloud Native Architectures for Devops
Cloud Native Architectures for DevopsCloud Native Architectures for Devops
Cloud Native Architectures for Devopscornelia davis
 
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeployAmazon Web Services
 
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18CodeOps Technologies LLP
 

What's hot (20)

Infrastructure as Code and AWS CDK
Infrastructure as Code and AWS CDKInfrastructure as Code and AWS CDK
Infrastructure as Code and AWS CDK
 
Building serverless applications with Apache OpenWhisk
Building serverless applications with Apache OpenWhiskBuilding serverless applications with Apache OpenWhisk
Building serverless applications with Apache OpenWhisk
 
Building Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWSBuilding Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWS
 
Serverless Apps with Open Whisk
Serverless Apps with Open Whisk Serverless Apps with Open Whisk
Serverless Apps with Open Whisk
 
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
 
Containers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes IstioContainers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes Istio
 
Serverless Reality
Serverless RealityServerless Reality
Serverless Reality
 
Serverless Computing Model
Serverless Computing ModelServerless Computing Model
Serverless Computing Model
 
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
 
NetflixOSS for Triangle Devops Oct 2013
NetflixOSS for Triangle Devops Oct 2013NetflixOSS for Triangle Devops Oct 2013
NetflixOSS for Triangle Devops Oct 2013
 
Paris Kafka Meetup - patterns anti-patterns
Paris Kafka Meetup -  patterns anti-patternsParis Kafka Meetup -  patterns anti-patterns
Paris Kafka Meetup - patterns anti-patterns
 
FLUX - Crash Course in Cloud 2.0
FLUX - Crash Course in Cloud 2.0 FLUX - Crash Course in Cloud 2.0
FLUX - Crash Course in Cloud 2.0
 
Beyond the brokers - Un tour de l'écosystème Kafka
Beyond the brokers - Un tour de l'écosystème KafkaBeyond the brokers - Un tour de l'écosystème Kafka
Beyond the brokers - Un tour de l'écosystème Kafka
 
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
 
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...
 
JHipster conf 2019 - Kafka Ecosystem
JHipster conf 2019 - Kafka EcosystemJHipster conf 2019 - Kafka Ecosystem
JHipster conf 2019 - Kafka Ecosystem
 
Flowcon (added to for CMG) Keynote talk on how Speed Wins and how Netflix is ...
Flowcon (added to for CMG) Keynote talk on how Speed Wins and how Netflix is ...Flowcon (added to for CMG) Keynote talk on how Speed Wins and how Netflix is ...
Flowcon (added to for CMG) Keynote talk on how Speed Wins and how Netflix is ...
 
Cloud Native Architectures for Devops
Cloud Native Architectures for DevopsCloud Native Architectures for Devops
Cloud Native Architectures for Devops
 
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
 
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
 

Similar to Serverless: A love hate relationship

Application Lifecycle Management on AWS
Application Lifecycle Management on AWSApplication Lifecycle Management on AWS
Application Lifecycle Management on AWSDavid Mat
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Mandi Walls
 
Deep Dive on AWS Lambda - January 2017 AWS Online Tech Talks
Deep Dive on AWS Lambda - January 2017 AWS Online Tech TalksDeep Dive on AWS Lambda - January 2017 AWS Online Tech Talks
Deep Dive on AWS Lambda - January 2017 AWS Online Tech TalksAmazon Web Services
 
Cloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a CacheCloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a Cachecornelia davis
 
Delivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDBDelivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDBJohn Bennett
 
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)Amazon Web Services
 
State of the Container Ecosystem
State of the Container EcosystemState of the Container Ecosystem
State of the Container EcosystemVinay Rao
 
AWS Serverless patterns & best-practices in AWS
AWS Serverless  patterns & best-practices in AWSAWS Serverless  patterns & best-practices in AWS
AWS Serverless patterns & best-practices in AWSDima Pasko
 
Serverless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsServerless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsTensult
 
NDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design PatternsNDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design PatternsRyan Green
 
從劍宗到氣宗 - 談AWS ECS與Serverless最佳實踐
從劍宗到氣宗  - 談AWS ECS與Serverless最佳實踐從劍宗到氣宗  - 談AWS ECS與Serverless最佳實踐
從劍宗到氣宗 - 談AWS ECS與Serverless最佳實踐Pahud Hsieh
 
IBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the CloudIBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the CloudAndrew Coleman
 
Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...
Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...
Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...eZ Systems
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with DockerMariaDB plc
 
Configuration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksConfiguration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksAmazon Web Services
 
Container Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesContainer Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesVishal Biyani
 

Similar to Serverless: A love hate relationship (20)

Application Lifecycle Management on AWS
Application Lifecycle Management on AWSApplication Lifecycle Management on AWS
Application Lifecycle Management on AWS
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
 
Deep Dive on AWS Lambda - January 2017 AWS Online Tech Talks
Deep Dive on AWS Lambda - January 2017 AWS Online Tech TalksDeep Dive on AWS Lambda - January 2017 AWS Online Tech Talks
Deep Dive on AWS Lambda - January 2017 AWS Online Tech Talks
 
Cloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a CacheCloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a Cache
 
Delivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDBDelivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDB
 
What is Serverless Computing?
What is Serverless Computing?What is Serverless Computing?
What is Serverless Computing?
 
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
 
State of the Container Ecosystem
State of the Container EcosystemState of the Container Ecosystem
State of the Container Ecosystem
 
AWS Serverless patterns & best-practices in AWS
AWS Serverless  patterns & best-practices in AWSAWS Serverless  patterns & best-practices in AWS
AWS Serverless patterns & best-practices in AWS
 
Serverless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsServerless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloads
 
NDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design PatternsNDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design Patterns
 
從劍宗到氣宗 - 談AWS ECS與Serverless最佳實踐
從劍宗到氣宗  - 談AWS ECS與Serverless最佳實踐從劍宗到氣宗  - 談AWS ECS與Serverless最佳實踐
從劍宗到氣宗 - 談AWS ECS與Serverless最佳實踐
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
IBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the CloudIBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the Cloud
 
Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...
Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...
Running eZ Platform on Kubernetes (presented by Björn Dieding at eZ Conferenc...
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with Docker
 
AWS Lambda and Serverless Cloud
AWS Lambda and Serverless CloudAWS Lambda and Serverless Cloud
AWS Lambda and Serverless Cloud
 
Configuration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksConfiguration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech Talks
 
Container Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesContainer Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher Kubernetes
 
TechBeats #2
TechBeats #2TechBeats #2
TechBeats #2
 

Recently uploaded

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 

Recently uploaded (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Serverless: A love hate relationship

  • 1. 1
  • 2. Hello • Jürgen Brüder • @jaybrueder • Works for Infralovers / Commandemy • Loves all things DevOps, Code and Infra 2
  • 3. 3
  • 4. 4
  • 5. Agenda • The concept • Serverless vs FaaS • Tooling • Demo • Cri7cism • My experience with customer projects 5
  • 6. What is "serveless" • Serverless is about abstrac0ng away servers, infrastructure and having to deal with low-level configura0on or the core opera0ng system • Code is not run as a full applica0on, but a set of small func0ons • Next step a@er using containers 6
  • 7. 7
  • 8. To be real serverless Func%ons need to run on ephemeral compute resources 8
  • 9. There is more • Command line tool of the same name • Rethinking architecture of so6ware 9
  • 10. 10
  • 11. IT-Marke)ng term of the year? Companies are looking for ways to brand their offerings as serverless 11
  • 12. Why call it "serverless"? • It's a bad choice • The server does not go away • It gets even more abstracted than with a VM or a container • Is there a be9er term? 12
  • 13. 13
  • 14. Let's look at what serverless is trying to achieve 14
  • 15. Lower opera)ons burden • Fewer people • Leaner teams • Lower cost • Be2er security • Be2er resilience 15
  • 16. It's about • No maintenance • Micro func0onality • Simplicity, but is not necessarily simpler • Rethinking code 16
  • 17. Faster (me to market Less to build = higher feature velocity 17
  • 18. Focus on business value What we’re talking about is outsourcing parts of our architecture and implemen8on that are not core to delivering business value - Ben Kehoe, iRobot 18
  • 19. Compute in a system should not be required to be con3nually-living 19
  • 20. Compute infrastructure should not even exist when not handling data 20
  • 21. A persistent compu.ng resource is a server no ma2er what form that resource takes 21
  • 22. Serverless is not FaaS • Func&on as a Service (FaaS) • FaaS is an integral component of serverless architecture 22
  • 23. Func%on as a Service (FaaS) • Deploy any individual piece of code, or func3on • Code runs and returns a value, in turn ending the process • Services and endpoints you would keep in one place are now sliced up into a bunch of snippets • Goal is to abstract away servers from the developer and bill based on the amount of 3mes the func3ons were invoked 23
  • 24. 24
  • 25. Serverless is not event-driven compute • "Serverless is all about the events" = wrong • Event-driven compu;ng is a natural fit for serverless architectures • Possible and reasonable to build tradi;onal data flows in serverless 25
  • 26. 26
  • 27. FaaS is not always F • Containers can be FaaS • Container have a stronger "contract" with the developer • S8ll, decouples developer from pla=orm • If container run during invoca8ons, and then are frozen/recycled, the container is ac8ng as a func8on 27
  • 28. 28
  • 29. FaaS is not always aaS • Serverless is not just public cloud • You can be your own FaaS provider • For big enterprises this makes sense • Can enable rest of company to "do" serverless • By running a lot of servers with so@ware on them 29
  • 30. 30
  • 31. A be%er term? • Service-Full • Coined by Patrick Debois, Townheroes • h=ps://twi=er.com/patrickdebois 31
  • 32. Service-Full • As a applica*on becomes increasingly serverless, it relies more on external services to provide the building blocks of the system • E.g. using Amazon Elas*csearch Service (AES) instead of hos*ng Elas*csearch yourself • 12 factor apps • Immutable infrastructure 32
  • 33. 33
  • 34. Service-Full FaaS • FaaS applica*on on cluster using on-premise servers • FaaS applica*on on cluster using public cloud IaaS • FaaS applica*on on managed cluster (e.g. Google Container Engine) • Managed FaaS • That are serverless if they use ephemeral compute resources 34
  • 35. FaaS does not have to use ephemeral compute resources 35
  • 36. 36
  • 37. 37
  • 38. 38
  • 40. 40
  • 41. 41
  • 42. 42
  • 43. 43
  • 44. Public billing model • Pay-per-use pricing model • Pay nothing at idle (except for data at rest) • Know what part of your applica<on costs the most 44
  • 45. 45
  • 46. Summing up • Spectrum • Serverless != FaaS • Service-full + ephemeral compute • Tighter correspondence between resources used and resources billed • Smaller and more abstracted control plane 46
  • 47. When should I consider serverless? 47
  • 48. Reasons • Easy scaling • Low maintenance • Any applica4on you have in produc4on where your user throughput varies is a valid contender • Response 4me is not your first concern 48
  • 49. What about the developers? 49
  • 50. Lastly, if you suck at the Linux shell, and if DevOps is not your thing, you have every reason to try Serverless. - Adnan Rahić, Hackernoon 50
  • 51. Requires us to change our approach • Serverless architecture is "special" • Se1ng it up takes a fair share of mental power • Live with the fact that we do not have overview of our whole system 51
  • 53. We will be using AWS Lambda AWS Lambda is a compute service that lets you run code without provisioning or managing servers. — AWS Documenta/on 53
  • 54. 54
  • 55. AWS Lambda • Event based system for running code in the cloud • "No servers" • Just code • Scales automa;cally • Easy to integrate into CI/CD pipelines 55
  • 56. AWS Lambda Docs say • It takes )me to set up a container and do the necessary bootstrapping, which adds some latency each )me the Lambda func)on is invoked. • You typically see this latency when a Lambda func)on is invoked for the first )me or a@er it has been updated because AWS Lambda tries to reuse the container for subsequent invoca)ons of the Lambda func)on. h"p://docs.aws.amazon.com/lambda/latest/dg/lambda- 56
  • 57. How it works • Lambda maintains the container for some 2me in an2cipa2on of another Lambda func2on invoca2on • It freezes the container a8er a Lambda func2on completes • If no further requests occur, it destroys the container 57
  • 58. Available run,mes • NodeJS (4.3.2 and 6.10.3) • Java (8) • Python (3.6, 2.7) • .NET Core 58
  • 59. AWS API Gateway • Instant API • To reach my code, I want to put it behind an API • API Requests will be the events that trigger the code 59
  • 60. Problems • Manual interac-on with AWS dashboard • Code editor, Drag n Drop etc. • I am an automa-ons guy, I avoid manual steps whenever I can 60
  • 61. Can I automate this right away? 61
  • 62. 62
  • 63. The Serverless Framework Serverless is your toolkit for deploying and opera4ng serverless architectures. Focus on your applica4on, not your infrastructure. — serverless.com 63
  • 64. The Serverless Framework • Removes the manual component of interac4ng with AWS Lambda / API Gateway • Node NPM package you control through the command line • bundles all the tools you need into a manageable package • Simplifies crea4on and deployments of applica4ons 64
  • 66. Be-Nice API • Setup a simple data processing pipeline • Expose one HTTP endpoint that allows use to submit a text note • The message is processed in the background • Messages above a certain sen>ment level are "saved" 66
  • 67. Sen$ment • AFINN-based sen.ment analysis for Node.js • Returns score for a specific string var sentiment = require('sentiment'); var r1 = sentiment('Cats are stupid.'); console.dir(r1); // Score: -2, Comparative: -0.666 var r2 = sentiment('Cats are totally amazing!'); console.dir(r2); // Score: 4, Comparative: 1 67
  • 68. AFINN AFINN is a list of English words rated for valence with an integer between minus five (nega<ve) and plus five (posi<ve). The words have been manually labeled by Finn Årup Nielsen in 2009-2011. The file is tab-separated. h"p://www2.imm.dtu.dk/pubdb/views/publica6on_details.php? id=6010 68
  • 69. We also use Amazon SNS • Amazon Simple No/fica/on Service (SNS) • Fully managed pub/sub messaging and mobile no/fica/ons service • publish-subscribe mode / retries • Is an event that can trigger a func/on for us • Helps us "unblock" ephemeral compute resources 69
  • 70. 70
  • 71. That's basically every mobile/web app backend in the world covered ;) 71
  • 72. I have prepared the environment already to save 2me 72
  • 73. Step 1: Installing serverless Have NodeJs installed on your worksta4on $ npm install -g serverless 73
  • 74. Step 2: Create an IAM User in your AWS Console • Have an AWS account • Create an IAM user with programma:c access • Add permissions according to whatever you want that user to do • Get Access Key ID and Secret Access Key 74
  • 75. Step 3: Tie your creden1als to serverless $ serverless config credentials --provider aws --key xxxxxxxxxxxxxx --secret xxxxxxxxxxxxxx Serverless: Setting up AWS... Serverless: Saving your AWS profile in "~/.aws/credentials"... Serverless: Success! Your AWS access keys were stored under the "default" profile. 75
  • 76. With that, we are ready to conquer the world! 76
  • 77. Create the service $ serverless create --template aws-nodejs --path benice Serverless: Generating boilerplate... Serverless: Generating boilerplate in "/Users/juergen/.../demo/benice" _______ __ | _ .-----.----.--.--.-----.----| .-----.-----.-----. | |___| -__| _| | | -__| _| | -__|__ --|__ --| |____ |_____|__| ___/|_____|__| |__|_____|_____|_____| | | | The Serverless Application Framework | | serverless.com, v1.24.1 -------' Serverless: Successfully generated boilerplate for template: "aws-nodejs" 77
  • 78. This generates 3 files • serverless.yml contains all the configura1on se2ngs • handler.js • .gi1gnore 78
  • 79. serverless.yml # serverless.yml service: my-service provider: name: aws runtime: nodejs6.10 functions: hello: handler: handler.hello 79
  • 80. What we can see • The func*ons property lists all the func*ons in the service. • You can see hello is the only func*on in the handler.js file 80
  • 81. handler.js 'use strict'; module.exports.hello = (event, context, callback) => { const response = { statusCode: 200, body: JSON.stringify({ message: 'Go Serverless v1.0! Your function executed successfully!', input: event, }), }; callback(null, response); // Use this code if you don't use the http event with the LAMBDA-PROXY integration // callback(null, { message: 'Go Serverless v1.0! Your function executed successfully!', event }); }; 81
  • 82. Let's add some real func1onality 82
  • 84. What happens during a deployment • CloudForma+on is used to orchestrate all this • It creates an S3 (AWS data store) bucket and stores the code in it • Creates IAM role (permissions) for the func+on • API Gateway gets created • Logging 84
  • 85. There is more than AWS Lambda 85
  • 86. How we use it in the wild 86
  • 87. How we use it in the wild • ChatOps • Empowering Devs to manage their own stuff on AWS with min. permissions • Alexa Skills / FAQ Bot • Personally: Mobile API prototype 87
  • 88. This means we can get rid of Ops altogehter, right? 88
  • 90. DevOps does not go away • Infrastructure management is not the only task that DevOps is doing • Automa;on, deployment, tes;ng, security, and monitoring 90
  • 91. Ops won’t go away in serverless • Serverless compu.ng is a form of u.lity compu.ng • Infrastructure completly abstracted from the developer 91
  • 92. 92
  • 93. Main problems for developers • Monitoring, debugging, tes0ng, latency, deployment • Basically everything you need Ops for 93
  • 94. How to test locally? Serverless offline plugin h"ps://github.com/dherault/serverless-offline 94
  • 95. We observed some pa-ers • First, there is a genuine concern about cloud provider lock-in • Second, there is a desire and hope to avoid or at least minimize such lock-in by embracing open source abstrac<ons and pla=orms • Most notably Docker and Kubernetes 95
  • 96. Complex applica,ons • An experiences Java Dev may not work on an applica7on with "just a few func7ons" • It sounds like a lot of extra work to move something like this into FaaS 96
  • 97. Architectural complexity • Tiny func*ons are nice from an architectural standpoint • Isn't the complexity moved to somewhere else? • Isn't complex code moved into complex configura*on? • AWS Lambda, for now, limits you to how many concurrent execu*ons you can be running of all your lambdas 97
  • 98. That means if someone, somewhere, in your organiza4on does a load test and starts trying to execute 1000 concurrent Lambda func4ons you’ll Denial of service (DoS) your produc4on applica4ons 98
  • 99. You can probably guess my standpoint • If you run something that complex, Lambda is not the right choice • You should think about running your own FaaS cluster • FaaS != Public cloud offerings 99
  • 100. Vendor lock-in • If that complex configura4on is proprietary, aren't we walking into a venor lock-in? • Unexpected limits / cost changes • This is true for IaaS and PaaS as well 100
  • 101. Secruity concerns • Third-Party API systems • What happens under the hood 101
  • 102. Control • Dependent on vendors for debugging and monitoring tools • At least your team will have these tools now ;) 102
  • 103. Integra(on tes(ng is #1 • The units of integra0on with Serverless are a lot smaller • Integra0on tes0ng becomes your #1 concern here 103
  • 104. Ar#facts • Problems related to deployment, versioning and packaging also exist • You may need to deploy a FaaS ar<fact separately for every func<on in your en<re logical applica<on 104
  • 105. Does every func-on start a new container? • Sounds like a lot of used resources • How does this affect startup 7mes? 105
  • 106. I introduced Serverless and all I got was a remote API 106
  • 107. What I would use it for • Applica(on Prototypes (e.g. for StartUp ideas) • Applica(ons in produc(on (if not (me sensi(ve) • Microservices • Bots • Orchestra(on and maintenance • Repor(ng 107
  • 108. What I would not use it for • Monoliths • Anything were every milisecond counts 108
  • 109. How is your experience with Serverless? 109
  • 111. Sources • h#ps://m.subbu.org/serverless-looking-back-to-see- forward-74dd1a02cb62 • h#ps://read.acloud.guru/the-serverless- spectrum-147b02cb2292 • h#ps://www.stardog.com/blog/5-hard-lessons-about-serverless/ • h#ps://medium.com/@PaulDJohnston/what-is-serverless- architecture-43b9ea4babca 111