75
Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter , Venkateshwaran Venkataramani , Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dusseau Unaffiliated

Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Serverless Computationwith OpenLambda

Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dusseau

Unaffiliated

Page 2: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Web development in the cloud

CDN: static content (e.g., JavaScript)

Compute: dynamic logic (e.g., Python)

Storage: application data

RPCs Queries

Page 3: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Web development in the cloud

CDN: static content (e.g., JavaScript)

Compute: dynamic logic (e.g., Python)

Storage: application data

RPCs Queries

(VMs)

Page 4: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Web development in the cloud

CDN: static content (e.g., JavaScript)

Compute: dynamic logic (e.g., Python)

Storage: application data

compute is evolving

RPCs Queries

(VMs)

Page 5: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Web development in the cloud

CDN: static content (e.g., JavaScript)

Compute: dynamic logic (e.g., Python)

Storage: application data

compute is evolving

RPCs Queries

(Containers)

Page 6: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Web development in the cloud

CDN: static content (e.g., JavaScript)

Compute: dynamic logic (e.g., Python)

Storage: application data

RPCs Queries

compute is evolving

(Lambdas)

Page 7: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Web development in the cloud

CDN: static content (e.g., JavaScript)

Compute: dynamic logic (e.g., Python)

Storage: application data

prior to the Lambda model, cloud compute was neither elastic nor pay-as-you-go

RPCs Queries

(Lambdas)

Page 8: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Outline

Evolution of compute

Non-conventional virtualization

Lambda model

Why OpenLambda?

Conclusion

Page 9: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

How to virtualize compute?

Page 10: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Classic web stack

Hardware

OS

Server

ApplicationRPCs

Page 11: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Classic web stack

Hardware

OS

Server

ApplicationRPCs

weak virtualization

Page 12: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Hardware

OS

Server

ApplicationRPCs

1st generation: virtual machines

virtual H/W

Page 13: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

1st generation: virtual machines

Hardware

OS

Server

ApplicationRPCs

virtual H/WOS

Server

Application

Page 14: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

1st generation: virtual machines

Hardware

OS

Server

ApplicationRPCs

virtual H/WOS

Server

Application

advantages: • very flexible • use any OS

problems: • interposition • is RAM used? (ballooning) • redundancy (e.g., FS journal)

Page 15: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

2nd generation: containers

Hardware

OS

Server

ApplicationRPCs

virtual OSServer

Application

advantages: • centralized view • init H/W once

Page 16: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Are containers good enough?

Page 17: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Container case studies

Literature: Google Borg • Internal container platform [1] • 25 second median startup • 80% of time spent on package installation • matters for flash crowds, load balance, interactive development, etc

[1] Large-scale cluster management at Google with Borg. http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43438.pdf

Page 18: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Container case studies

Literature: Google Borg • Internal container platform [1] • 25 second median startup • 80% of time spent on package installation • matters for flash crowds, load balance, interactive development, etc

Experimental: Amazon Elastic Beanstalk • Autoscaling cloud service • Build applications as containerized servers, service RPCs • Rules dictate when to start/stop (various factors)

[1] Large-scale cluster management at Google with Borg. http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43438.pdf

Page 19: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Interesting “autoscaling” rule

Page 20: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Experiment

Simulate a small short burst • Maintain 100 concurrent requests • Use 200 ms of compute per request • Run for 1 minute

Page 21: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Container Case Study: Elastic Beanstalk

Page 22: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Container Case Study: Elastic Beanstalk

Page 23: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Container Case Study: Elastic Beanstalk

Conclusion: Elastic Beanstalk does not scale quickly enough to handle load bursts.

Page 24: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Container Case Study: Elastic Beanstalk

Conclusion: Elastic Beanstalk does not scale quickly enough to handle load bursts.

Elastic BS

Page 25: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Why should it take minutes (or even seconds) to execute scripts that are <1000s of LOC?

Page 26: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

2nd generation: containers

Hardware

OS

Server

ApplicationRPCs

virtual OSServer

Application

advantages: • centralized view • init H/W once

problems: • large deployment bundle • server spinup

Page 27: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

2nd generation: containers

Hardware

OS

Server

ApplicationRPCs

virtual OSServer

Application

Page 28: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

3rd generation: Lambdas

Hardware

OS

Server and Runtime

ApplicationRPCs virtual servers

Application

Page 29: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

3rd generation: Lambdas

Hardware

OS

Server and Runtime

ApplicationRPCs virtual servers

Application

serverless computing

Page 30: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

3rd generation: Lambdas

Hardware

OS

Server and Runtime

RPCs virtual servers

decompose application

FnA FnZ… Fn0 Fn9…

Page 31: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

3rd generation: Lambdas

Hardware

OS

Server and Runtime

RPCs virtual servers

advantages: • very fast startup • agile deployment • share memory

problems: • not flexible

FnA FnZ… Fn0 Fn9…

already running

already in mem

small deployment

bundle

Page 32: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Lambda elasticity

Repeat ElasticBS experiment • Maintain 100 concurrent requests • Spin 200 ms per request • Run for 1 minute

Page 33: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Lambda elasticity

Page 34: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Lambda elasticity

Conclusion: Lambdas are highly elastic

Page 35: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Lambda elasticity

Conclusion: Lambdas are highly elastic (though a little slow)

Page 36: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Outline

Evolution of compute

Non-conventional virtualization

Lambda model

Why OpenLambda?

Conclusion

Page 37: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Lambda model

Run user handlers in response to events • web requests (RPC handlers) • database updates (triggers) • scheduled events (cron jobs)

Pay per function invocation • actually pay-as-you-go • no charge for idle time between calls • e.g., charge actual_time * memory_cap

Page 38: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Share everything

Share server pool between customers • Any worker can execute any handler • No spinup time • Less switching

Encourage specific runtime (C#, Node.JS, Python) • Minimize network copying • Code will be in resident in memory

Page 39: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Multi-node architecture

Load Balancer

Server

Python

Server

Python

workers

Load Balancer

load balancers

handler store

Page 40: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Multi-node architecture

Load Balancer

Server

Python

Server

Python

workers

Load Balancer

load balancers

handler store

developerupload code

H1 H2

Page 41: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Multi-node architecture

Load Balancer

Server

Python

Server

Python

workers

Load Balancer

load balancers

handler store

small

large

H1 H2

Page 42: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Multi-node architecture

Load Balancer

Server

Python

Server

Python

workers

Load Balancer

load balancers

handler store

userRPC

H1 H2

Page 43: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Multi-node architecture

Load Balancer

Server

Python

Server

Python

workers

Load Balancer

load balancers

handler store

userRPC

H1 H2

Page 44: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Multi-node architecture

Load Balancer

Server

Python

Server

Python

workers

Load Balancer

load balancers

handler store

userRPC

H2

H1 H2

Page 45: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Multi-node architecture

Load Balancer

Server

Python

Server

Python

workers

Load Balancer

load balancers

handler store

userRPC

H2 sandbox

H1 H2

Page 46: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Multi-node architecture

Load Balancer

Server

Python

Server

Python

workers

Load Balancer

load balancers

handler store

userRPC

H2 sandbox

H1 H2

Page 47: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Outline

Evolution of compute

Non-conventional virtualization

Lambda model

Why OpenLambda?

Conclusion

Page 48: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Need for open source serverless

Many research areas • Applications, tools, distributed systems, execution engines • Evaluate ideas by building, not just simulating

Page 49: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Need for open source serverless

Many research areas • Applications, tools, distributed systems, execution engines • Evaluate ideas by building, not just simulating

AWS Lambda Google Cloud Functions

First implementations are proprietary

Page 50: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Need for open source serverless

Many research areas • Applications, tools, distributed systems, execution engines • Evaluate ideas by building, not just simulating

AWS Lambda Google Cloud Functions

First implementations are proprietary

OpenLambda: explore further-reaching techniques• Goal: enable academic research on Lambdas • Storage awareness, kernel support, RPC inspection • …

Page 51: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Need for open source serverless

Many research areas • Applications, tools, distributed systems, execution engines • Evaluate ideas by building, not just simulating

Other recent open-source implementations

AWS Lambda Google Cloud Functions

Azure Functions

First implementations are proprietary

IBM OpenWhisk

OpenLambda: explore further-reaching techniques• Goal: enable academic research on Lambdas • Storage awareness, kernel support, RPC inspection • …

Page 52: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

OpenLambda research topics

Workloads • Workload studies • Benchmarks • Versioning+dependencies • Code characteristics • Package management

Distributed systems • Databases • Load balancing • Scatter gather patterns • Sessions and streams

Tools • Debugging • Monetary cost optimization • Porting legacy applications

Execution engines • Sandboxing • Containers • Just-in-time interpreters

Page 53: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Load Balancer

Server

Python

workers

Load Balancer

load balancers

handler store

H2 sandbox

H1 H2developerupload code

userRPC

OpenLambda research topics

Page 54: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Load Balancer

Server

Python

workers

Load Balancer

load balancers

handler store

H2 sandbox

H1 H2developerupload code

userRPC

workloads

tools

distributed systems

execution engine

OpenLambda research topics

Page 55: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Load Balancer

Server

Python

workers

Load Balancer

load balancers

handler store

H2 sandbox

H1 H2developerupload code

userRPC

workloads

tools

distributed systems

execution engine

OpenLambda research topics

Page 56: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Understanding Lambda workloadsCollaborate with industry, measurement studies

• e.g., Azure Functions

Build LambdaBench • Everybody joining builds an application • Ticketing, calendar, autocomplete, OCR, flash card, stock alert,

blog, and scientific compute applications

Trace RPC calls (e.g., AJAX) of existing apps

Gmail:

Page 57: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Load Balancer

Server

Python

workers

Load Balancer

load balancers

handler store

H2 sandbox

H1 H2developerupload code

userRPC

workloads

tools

distributed systems

execution engine

OpenLambda research topics

Page 58: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Load Balancer

Server

Python

workers

Load Balancer

load balancers

handler store

H2 sandbox

H1 H2developerupload code

userRPC

workloads

tools

distributed systems

execution engine

OpenLambda research topics

Page 59: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Developer toolsPortability

• E.g., can Django apps run on Lambdas?

Debugging • Understand Lambda flows, may be a complex graph

Optimizing expense • Hard with containers: how to share 1-hour server time across requests? • With Lambdas: know cost of every RPC and query • Show where money is going

Page 60: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Load Balancer

Server

Python

workers

Load Balancer

load balancers

handler store

H2 sandbox

H1 H2developerupload code

userRPC

workloads

tools

distributed systems

execution engine

OpenLambda research topics

Page 61: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Load Balancer

Server

Python

workers

Load Balancer

load balancers

handler store

H2 sandbox

H1 H2developerupload code

userRPC

workloads

tools

distributed systems

execution engine

OpenLambda research topics

Page 62: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Building locality-aware Lambdas

Use deep inspection of RPCs for routing • Working with gRPC group • GSOC project (Stephen Sturdevant)

Page 63: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Building locality-aware Lambdas

Use deep inspection of RPCs for routing • Working with gRPC group • GSOC project (Stephen Sturdevant)

Locality factors • code locality • data locality • session locality

Page 64: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Building locality-aware Lambdas

Use deep inspection of RPCs for routing • Working with gRPC group • GSOC project (Stephen Sturdevant)

Locality factors • code locality • data locality • session locality

Load Balancer

Lambda workers

call B ?

Page 65: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Building locality-aware Lambdas

Use deep inspection of RPCs for routing • Working with gRPC group • GSOC project (Stephen Sturdevant)

Locality factors • code locality • data locality • session locality

Load Balancer

Lambda workers

mem

disk

mem

disk

numpy …

numpy …

A numpy

call B(uses numpy)

Page 66: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Building locality-aware Lambdas

Use deep inspection of RPCs for routing • Working with gRPC group • GSOC project (Stephen Sturdevant)

Locality factors • code locality • data locality • session locality

Load Balancer

Lambda workers

DB shard: A-M (keys)

DB shard: N-Z (keys)

call predict XBBlocal

query

Page 67: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Building locality-aware Lambdas

Use deep inspection of RPCs for routing • Working with gRPC group • GSOC project (Stephen Sturdevant)

Locality factors • code locality • data locality • session locality

Load Balancer

Lambda workers

browser sessionservice

sessionservice

web socket

LambdaEngine

LambdaEngine

B

Page 68: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Load Balancer

Server

Python

workers

Load Balancer

load balancers

handler store

H2 sandbox

H1 H2developerupload code

userRPC

workloads

tools

distributed systems

execution engine

OpenLambda research topics

Page 69: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Load Balancer

Server

Python

workers

Load Balancer

load balancers

handler store

H2 sandbox

H1 H2developerupload code

userRPC

workloads

tools

distributed systems

execution engine

OpenLambda research topics

Page 70: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Minimizing latency

Page 71: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Minimizing latency

reduce

How can we reduce base latency?

Page 72: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Execution engine

Sandboxing • Process VMs (e.g., JVM): how to mostly initialize? • Containers: how to speed up restart and optimize pausing?

Page 73: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Execution engine

Language runtimes • Challenge: code warms up over time • How to share dynamic optimizations?

code code

worker A worker B

interpretedcompiled

cold

cold

cold

Sandboxing • Process VMs (e.g., JVM): how to mostly initialize? • Containers: how to speed up restart and optimize pausing?

tracing enables inline optimization

Page 74: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

Outline

Evolution of compute

Non-conventional virtualization

Lambda model

Why OpenLambda?

Conclusion

Page 75: Serverless Computation with OpenLambda · Serverless Computation with OpenLambda Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani†, Andrea C. Arpaci-Dusseau,

ConclusionLambdas finally deliver on promises of the cloud

• finally pay-as-you-go • finally elastic • will fundamentally change how people build scalable applications

New challenges in every area of systems • scheduling, isolation, languages, debugging, tools, storage, …

Getting involved • contribute at https://github.com/open-lambda • site: https://open-lambda.org/