using serverless to modernize legacy applications: quick ...€¦ · cloud native applications...

30
May 09, 2019 Using Serverless to Modernize Legacy Applications: Quick Wins, Key Use Cases & Design Patterns Hybrid clouds that just work 1 Vamsi Chemitiganti Platform9 Systems

Upload: others

Post on 01-Jan-2021

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

May 09, 2019

Using Serverless to Modernize Legacy Applications: Quick Wins, Key Use Cases & Design Patterns

Hybrid clouds that just work

1

Vamsi Chemitiganti

Platform9 Systems

Page 2: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Agenda

• About Us

• Introduction to Hybrid Cloud Computing

• Introduction to Serverless & Fission (FaaS on K8s)

• FaaS Architecture & Developer Flow

• Overall FaaS flow

• The Five Popular Use Cases and Design Patterns

• Serverless Best Practices & Value Proposition

• Q&A

Page 3: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

About Us

3

Page 4: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Speaker IntroductionVamsi Chemitiganti, Chief Strategist• Over 20 years of high tech experience in various customer facing roles• Various leadership positions at Red Hat, HortonWorks, Siemens Medical Solutions• Check out his blog on serverless, Kubernetes, and more! http://www.vamsitalkstech.com/

Page 5: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Platform9 Overview

• Founded in 2013 by a team of VMware engineers with a goal to make it easy to transform any infrastructure into a cloud

• Recognized for innovative technology

• $36.5 million has been raised to date

5

Page 6: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Cloud Native Applications & the Hybrid Cloud..

Page 7: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Introduction to Serverless & Fission

7

Page 8: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Serverless: A New Way To Build Modern Apps

Code, Deploy And Operate Instant ‘Production-Ready’ Apps.

Fission is a full featured Serverless framework for

running serverless applications on Kubernetes.

Fission lets you easily code, deploy and operate

applications that are production-ready from the get-go

- without having to learn anything about Kubernetes.

8

Page 9: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To
Page 10: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Fission: An open source alternative to AWS Lambda

• AWS started the serverless movement with Lambda, but it locks Developers into AWS ecosystem• Pricing lock-in• Not multi-cloud or multi-tool friendly. Developers want choice. (eg how to I consume my

Kafka stream events in Lambda instead of using Kinesis?)• Fission opens up these advantages to everyone on any infrastructure. Its open and extensible

and thus enables a wider ecosystem.

10

vs

Page 11: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Introduction to Serverless

Page 12: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Fission: Kubernetes based Serverless Framework

• Use Kubernetes and containers without a steep learning curve

• Write short-lived functions in any language

• Map functions to triggers (e.g., message queues, timers, HTTP requests)

✓No containers to build✓No Docker registries✓Works on any Kubernetes

cluster, anywhere✓ Extensible to any language

Page 13: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Fission

13

Architecture

Page 14: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

FaaS: Only two concepts to learn => Reduced complexity

Triggers bind an event to a function, e.g.,• HTTP triggers map HTTP

requests to functions • A message queue can also act

as a trigger to map events to functions

Functions can be written in various major languages.

ff

HTTP, NATS, Kafka, Azure Storage

Queues, Kubernetes Watches, Timers, …

Page 15: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

The Benefits of combining FaaS and Kubernetes

Page 16: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Serverless Platform Architecture and Internals

Page 17: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Typically Uses NoSQL Backends

HTTPTrigger

NodeJSFunction

Node JS Environment

Fission FN Test

Load Generated 10,000 Executions

Page 18: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Cloud Native App Dev

Page 19: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

DevOps with Serverless

Page 20: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Five Key Serverless Real World Usecases

20

Page 21: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

FaaS Overall Flow

21

Thus reflecting the above principles, the overall flow involved in a FaaS architecture is fairly straightforward: as depicted below –

•An event (e.g. an online order at a retailer) is received by an API Manager.

•The Manager creates an http request that results in a function being launched

•The function is created just in time and first instantiated in a container

•The container has all the configuration the function needs to run including its dependencies preloaded

•The function processes the request

•The container is then automatically destroyed. The user only pays for the resources consumed/utilized (RAM, CPU, Disk etc) during the time the function ran.

Page 22: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Use Case Pattern One – IoT & Edge Data Processing

Page 23: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Use Case Pattern Two – Financial Services Specific

Page 24: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Use Case Pattern Three - Augment Web Applications

Page 25: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Use Case Pattern Four - Augment Mainframe BasedApplications

Page 26: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Use Case Pattern Five – ML Oriented Data Processing

Page 27: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Serverless Best Practices

• Statelessness is a best practice and provides infinite scalability

• Optimize for Speed: cold start optimizations, autoscaling

• More Powerful Frontends richer client libraries minimize backend calls

• Think DevOps & IaC: automation with Ansible & Terraform, "alt-tab" dev/test cycle, metrics, tracing, canaries (and lots more)

• Use Events and Workflows: Event based architectures & Workflow engine for chaining functions

27

Page 28: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Why Use Serverless

28

Page 29: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

Value Proposition

• Simple on-ramp for both devs and ops: up and running in your first hour

• Fast: cold start optimizations, autoscaling

• Out of the box support for 10+ languages and 5+ triggers

• Batteries included: builders, "alt-tab" dev/test cycle, metrics, tracing, canaries (and lots more)

• Composable: Workflow engine for composing functions

29

Page 30: Using Serverless to Modernize Legacy Applications: Quick ...€¦ · Cloud Native Applications &theHybrid Cloud.. Introduction to Serverless & Fission 7. Serverless: A New Way To

QUESTIONS

30