SlideShare a Scribd company logo
31 May 2017 - at EPITA
Introduction to
Serverless through
Architectural Patterns
1/18
Who am I?
DevOps @CloudScreener
EPITA 2015
Specialised in Systems, Networks and Security
Cloud Systems Engineer @Axiad IDS, 2015-2016
Passion for creating products,
while learning new technologies
@MathieuMailhos
Cloud & Ops Enthousiast
2/18
Context & Introduction
I/ Introducing Serverless
II/ Architectural Patterns
III/ Serverless Framework Demo
IV/ Overall Benefits and Drawbacks
Conclusion
Agenda
3/18
Adopt the lean startup methodology:
Business Hypothesis needs to be validated
Only invest time and money on non-risky projects
If you fail, fail fast. Then learn and retry.
We need less overhead in our development
Focus on building the product:
Remove the boring and hard part around managing
your infrastructure
Timing is a major key of success
4/18
Internet based systems where application process rely on:
1. A combination of 3rd party services: Backend As A Service
2. Remote procedure calls: Function As A Service
3. Rich client-side logic
Basically, write scalable code without having to think about
details of the container, operating system or infrastructure that
run the program
Only pay for what you use
Connecting APIs to avoid hosting and managing servers
Introducing Serverless
5/18
Provide Hardware
by abstracting
physical
environment
Deploy in Months
Live for Years
Provide OS
through
Virtual Machines
Deploy in minutes
Live for weeks
Provide
Application
Environment
through
Containers
Deploy in seconds
Live for hours
Provide
completely
abstracted
environment
through
Functions
Deploy in
milliseconds
Live for seconds
Infrastructure Abstraction Evolution
Datacenter IaaS PaaS FaaS
6/18
Function As A Service
Multiple Providers:
AWS Lambda, Google Cloud Functions, MS Azure Functions, IBM OpenWhisk, Twilio Functions,
iron.io (on-premise), Galactic Fog (on-premise)
Or build your own: http://blog.alexellis.io/functions-as-a-service/
Unit of
deployment:
A Function
Stateless:
Running in an
ephemeral
containers
Pricing Model:
Pay per execution
count and length
Scaling & High
Availability:
Automatic
Execute code, without managing servers, based on direct
invocations or events
Use your own language
Zip and upload.
Choose the amount of
memory you need.
RAM, Disk and
Processes are not
persistent.
Do not count on them!
Usually, pay per 100ms.
Direct consequences of
running optimised code
Each vendor has its own
limits. However, there is
no SLA guaranteed (yet).
7/18
We can find all we need to build our product out there
APIs are the new libraries
Database,
Storage
Authentication,
Analytics,
Messaging,
Tooling (Logging, Monitoring…),
Artificial Intelligence,
As A Service
Backend As A Service
8/18
Standard Web App,
All the logic is on the servers
Serverless: More logic in the
client. Use of multiple services.
Implies the need to manage
monitoring and security on each
component.
Web Application Pattern
AWS API Gateway /
Google Cloud Endpoints: 

Gateway/Proxy for HTTP Calls.
Manage authentication, caching,
monitoring, throttling.
Update requests on the fly
9/18
Recurring Jobs:
Log analysis, SSL Checks, Backups…
Use of a scheduler / source of trigger
Multiple notifications channels, log file
Automations
Event Driven:
Processing files upload,
Reacting to database key change,
New created user…
10/18
Presenting the Fan Out Pattern
Batch Processing
Process huge volume of data on a regular basis
Non-interactive background job
Apply the MapReduce programming model to serverless
Speed depends on the number of invoked concurrent functions
Save state in any storage / database depending on your data structure
11/18
Stream Processing
Process non-interrupted stream of data in near real-time
Handle spiky traffic and message ordering
Use of Kinesis or a Message Queueing Service to store data
Beware of poisoning messages & be prepared for Lambda failures (DLQ)
Then process those data subsets by calling functions concurrently
Tune your functions capacities and concurrent calls to keep up with ingest rate
12/18
Demo
Write and deploy your entire serverless infrastructure using only
configuration files and functions
Handle multiple vendors
Serverless Framework
https://github.com/serverless/serverless
13/18
Demo
Custom OAuth Authentication
https://github.com/mathieumailhos/sls-oauth-instagram
14/18
Custom OAuth Authentication
Typical use case where 2 functions make you avoid provisioning a server, setting up the system and the
development environment, its security, installing a reverse proxy, monitoring it and managing it over time…
15/18
Overall Benefits and Drawbacks
Benefits
Costs: Don’t pay for idle, overall less Ops work
Scale: Managed by the vendor, no over-provisioning anymore
High-Availability: automatic availability zones redundancy
Ops: Easy to maintain and deploy
Time: focus on code only
Greener: shared environment
Drawbacks
Beware of Vendor lock-in: migrations won’t be easy
Multi tenancy problems: security, robustness, performances
More front-end development required
Stateless changes the way to code, might require additional component
Startup latency and network dependencies
Debugging, Versioning, Testing and Monitoring can be tricky: need more tools
16/18
Conclusion
Serverless is not a correct approach for every problem
since it still has major drawbacks: latency, vendor lock-in…
But it is awesome when applied to lean methodology: deliver
fast, get feedbacks quickly.
Easy to get started: take advantage of the “free tier”

plan provided by vendors.
Bring huge opportunities for engineers with both
infrastructure and development skills.
17/18
Thank You
Question Time!
@MathieuMailhos linkedin.com/in/mathieumailhos github.com/MathieuMailhos
18/18

More Related Content

PPTX
Securing Serverless Systems
PDF
Securing serverless system
PPTX
Implementing Fast IT Deploying Applications at the Pace of Innovation
PDF
Automate Your Container Deployments Securely
PPTX
Network Bandwidth management - Mumbai Seminar
PPTX
Hybrid cloud monitoring - Mumbai seminar
PPTX
Optimize application performance - Mumbai Seminar
PDF
Application Gateways for Industry 4.0
Securing Serverless Systems
Securing serverless system
Implementing Fast IT Deploying Applications at the Pace of Innovation
Automate Your Container Deployments Securely
Network Bandwidth management - Mumbai Seminar
Hybrid cloud monitoring - Mumbai seminar
Optimize application performance - Mumbai Seminar
Application Gateways for Industry 4.0

What's hot (20)

PPTX
Cloud design pattern
PPTX
Rethinking Security: The Cloud Infrastructure Effect
PDF
AWS Community Day - Vitaliy Shtym - Pragmatic Container Security
PPTX
Getting Started with Runtime Security on Azure Kubernetes Service (AKS)
PPTX
ICS Cybersecurity: How to Protect the Proprietary Cyber Assets That Hackers C...
PPT
Cloud Security: Make Your CISO Successful
PPTX
Security and Compliance for Enterprise Cloud Infrastructure
PDF
Automating security compliance for physical, virtual, cloud, and container en...
PPTX
DevOps Underground - Microservices Monitoring
PDF
Best Practices for Workload Security: Securing Servers in Modern Data Center ...
PDF
Secure Cloud Development Resources with DevOps
PPTX
45 Minutes to PCI Compliance in the Cloud
PPTX
Technologies You Need to Safely Use the Cloud
PDF
CDN Performance at eBay from Thousandeyes Connect
PPT
Claudit (cloud asset auditing)
PDF
Practical Steps to Scale Legal Support for Open Source
PPTX
Protecting Your IP with Perforce Helix and Interset
PDF
Dynatrace FreeTrial Test Drive
PPTX
10 Tips for Your Journey to the Public Cloud
PPTX
IBM QRadar BB & Rules
Cloud design pattern
Rethinking Security: The Cloud Infrastructure Effect
AWS Community Day - Vitaliy Shtym - Pragmatic Container Security
Getting Started with Runtime Security on Azure Kubernetes Service (AKS)
ICS Cybersecurity: How to Protect the Proprietary Cyber Assets That Hackers C...
Cloud Security: Make Your CISO Successful
Security and Compliance for Enterprise Cloud Infrastructure
Automating security compliance for physical, virtual, cloud, and container en...
DevOps Underground - Microservices Monitoring
Best Practices for Workload Security: Securing Servers in Modern Data Center ...
Secure Cloud Development Resources with DevOps
45 Minutes to PCI Compliance in the Cloud
Technologies You Need to Safely Use the Cloud
CDN Performance at eBay from Thousandeyes Connect
Claudit (cloud asset auditing)
Practical Steps to Scale Legal Support for Open Source
Protecting Your IP with Perforce Helix and Interset
Dynatrace FreeTrial Test Drive
10 Tips for Your Journey to the Public Cloud
IBM QRadar BB & Rules
Ad

Similar to Introduction to Serverless through Architectural Patterns (20)

PDF
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
PDF
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
PPTX
10 Reasons Why You Should Consider Google App Engine (GAE) for Your Next Project
PDF
AWS Community Day - Amy Negrette - Gateways to Gateways
PDF
Building and Adopting a Cloud-Native Security Program
PDF
Build and Manage Serverless APIs (APIDays Nordic, May 19th 2016)
PDF
Secure, Strengthen, Automate, and Scale Modern Workloads with Red Hat & NGINX
PPT
Three SOA Case Studies
PDF
Monitoring Your AWS Cloud Infrastructure
PDF
Spring and Pivotal Application Service - SpringOne Tour Dallas
PDF
IBM Bluemix Tech Meetup 18-02-2015
PDF
vinay-mittal-new
PPT
Cloud Computing
PDF
Application security in current era
PDF
Ml ops on AWS
PDF
Compliance as Code Everywhere
PPTX
PDF
Docebo: history of a journey from legacy to serverless
PDF
apidays LIVE Paris - Serverless security: how to protect what you don't see? ...
PPTX
Breaking the Monolith
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
10 Reasons Why You Should Consider Google App Engine (GAE) for Your Next Project
AWS Community Day - Amy Negrette - Gateways to Gateways
Building and Adopting a Cloud-Native Security Program
Build and Manage Serverless APIs (APIDays Nordic, May 19th 2016)
Secure, Strengthen, Automate, and Scale Modern Workloads with Red Hat & NGINX
Three SOA Case Studies
Monitoring Your AWS Cloud Infrastructure
Spring and Pivotal Application Service - SpringOne Tour Dallas
IBM Bluemix Tech Meetup 18-02-2015
vinay-mittal-new
Cloud Computing
Application security in current era
Ml ops on AWS
Compliance as Code Everywhere
Docebo: history of a journey from legacy to serverless
apidays LIVE Paris - Serverless security: how to protect what you don't see? ...
Breaking the Monolith
Ad

Recently uploaded (20)

PDF
medical staffing services at VALiNTRY
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
PDF
Build Multi-agent using Agent Development Kit
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
DOCX
The Five Best AI Cover Tools in 2025.docx
PPTX
Materi-Enum-and-Record-Data-Type (1).pptx
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
ai tools demonstartion for schools and inter college
PPTX
AIRLINE PRICE API | FLIGHT API COST |
PDF
How to Confidently Manage Project Budgets
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Presentation of Computer CLASS 2 .pptx
PDF
Become an Agentblazer Champion Challenge Kickoff
PDF
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Materi_Pemrograman_Komputer-Looping.pptx
PDF
Best Practices for Rolling Out Competency Management Software.pdf
medical staffing services at VALiNTRY
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Build Multi-agent using Agent Development Kit
How to Migrate SBCGlobal Email to Yahoo Easily
The Five Best AI Cover Tools in 2025.docx
Materi-Enum-and-Record-Data-Type (1).pptx
PTS Company Brochure 2025 (1).pdf.......
ai tools demonstartion for schools and inter college
AIRLINE PRICE API | FLIGHT API COST |
How to Confidently Manage Project Budgets
How to Choose the Right IT Partner for Your Business in Malaysia
Online Work Permit System for Fast Permit Processing
Presentation of Computer CLASS 2 .pptx
Become an Agentblazer Champion Challenge Kickoff
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Materi_Pemrograman_Komputer-Looping.pptx
Best Practices for Rolling Out Competency Management Software.pdf

Introduction to Serverless through Architectural Patterns

  • 1. 31 May 2017 - at EPITA Introduction to Serverless through Architectural Patterns 1/18
  • 2. Who am I? DevOps @CloudScreener EPITA 2015 Specialised in Systems, Networks and Security Cloud Systems Engineer @Axiad IDS, 2015-2016 Passion for creating products, while learning new technologies @MathieuMailhos Cloud & Ops Enthousiast 2/18
  • 3. Context & Introduction I/ Introducing Serverless II/ Architectural Patterns III/ Serverless Framework Demo IV/ Overall Benefits and Drawbacks Conclusion Agenda 3/18
  • 4. Adopt the lean startup methodology: Business Hypothesis needs to be validated Only invest time and money on non-risky projects If you fail, fail fast. Then learn and retry. We need less overhead in our development Focus on building the product: Remove the boring and hard part around managing your infrastructure Timing is a major key of success 4/18
  • 5. Internet based systems where application process rely on: 1. A combination of 3rd party services: Backend As A Service 2. Remote procedure calls: Function As A Service 3. Rich client-side logic Basically, write scalable code without having to think about details of the container, operating system or infrastructure that run the program Only pay for what you use Connecting APIs to avoid hosting and managing servers Introducing Serverless 5/18
  • 6. Provide Hardware by abstracting physical environment Deploy in Months Live for Years Provide OS through Virtual Machines Deploy in minutes Live for weeks Provide Application Environment through Containers Deploy in seconds Live for hours Provide completely abstracted environment through Functions Deploy in milliseconds Live for seconds Infrastructure Abstraction Evolution Datacenter IaaS PaaS FaaS 6/18
  • 7. Function As A Service Multiple Providers: AWS Lambda, Google Cloud Functions, MS Azure Functions, IBM OpenWhisk, Twilio Functions, iron.io (on-premise), Galactic Fog (on-premise) Or build your own: http://blog.alexellis.io/functions-as-a-service/ Unit of deployment: A Function Stateless: Running in an ephemeral containers Pricing Model: Pay per execution count and length Scaling & High Availability: Automatic Execute code, without managing servers, based on direct invocations or events Use your own language Zip and upload. Choose the amount of memory you need. RAM, Disk and Processes are not persistent. Do not count on them! Usually, pay per 100ms. Direct consequences of running optimised code Each vendor has its own limits. However, there is no SLA guaranteed (yet). 7/18
  • 8. We can find all we need to build our product out there APIs are the new libraries Database, Storage Authentication, Analytics, Messaging, Tooling (Logging, Monitoring…), Artificial Intelligence, As A Service Backend As A Service 8/18
  • 9. Standard Web App, All the logic is on the servers Serverless: More logic in the client. Use of multiple services. Implies the need to manage monitoring and security on each component. Web Application Pattern AWS API Gateway / Google Cloud Endpoints: 
 Gateway/Proxy for HTTP Calls. Manage authentication, caching, monitoring, throttling. Update requests on the fly 9/18
  • 10. Recurring Jobs: Log analysis, SSL Checks, Backups… Use of a scheduler / source of trigger Multiple notifications channels, log file Automations Event Driven: Processing files upload, Reacting to database key change, New created user… 10/18
  • 11. Presenting the Fan Out Pattern Batch Processing Process huge volume of data on a regular basis Non-interactive background job Apply the MapReduce programming model to serverless Speed depends on the number of invoked concurrent functions Save state in any storage / database depending on your data structure 11/18
  • 12. Stream Processing Process non-interrupted stream of data in near real-time Handle spiky traffic and message ordering Use of Kinesis or a Message Queueing Service to store data Beware of poisoning messages & be prepared for Lambda failures (DLQ) Then process those data subsets by calling functions concurrently Tune your functions capacities and concurrent calls to keep up with ingest rate 12/18
  • 13. Demo Write and deploy your entire serverless infrastructure using only configuration files and functions Handle multiple vendors Serverless Framework https://github.com/serverless/serverless 13/18
  • 15. Custom OAuth Authentication Typical use case where 2 functions make you avoid provisioning a server, setting up the system and the development environment, its security, installing a reverse proxy, monitoring it and managing it over time… 15/18
  • 16. Overall Benefits and Drawbacks Benefits Costs: Don’t pay for idle, overall less Ops work Scale: Managed by the vendor, no over-provisioning anymore High-Availability: automatic availability zones redundancy Ops: Easy to maintain and deploy Time: focus on code only Greener: shared environment Drawbacks Beware of Vendor lock-in: migrations won’t be easy Multi tenancy problems: security, robustness, performances More front-end development required Stateless changes the way to code, might require additional component Startup latency and network dependencies Debugging, Versioning, Testing and Monitoring can be tricky: need more tools 16/18
  • 17. Conclusion Serverless is not a correct approach for every problem since it still has major drawbacks: latency, vendor lock-in… But it is awesome when applied to lean methodology: deliver fast, get feedbacks quickly. Easy to get started: take advantage of the “free tier”
 plan provided by vendors. Bring huge opportunities for engineers with both infrastructure and development skills. 17/18
  • 18. Thank You Question Time! @MathieuMailhos linkedin.com/in/mathieumailhos github.com/MathieuMailhos 18/18