Real-time Serverless: Enabling Application Performance Guarantee
Hai Duc Nguyen1, Chaojie Zhang1, Zhujun Xiao1, and Andrew A. Chien1,2
1University of Chicago 2Argonne NaKonal Lab
Real-time Serverless: Enabling Application Performance Guarantee Hai - - PowerPoint PPT Presentation
Real-time Serverless: Enabling Application Performance Guarantee Hai Duc Nguyen 1 , Chaojie Zhang 1 , Zhujun Xiao 1 , and Andrew A. Chien 1,2 1 University of Chicago 2 Argonne NaKonal Lab Serverless has Limitation Function-as-a-Service (FaaS)
Hai Duc Nguyen1, Chaojie Zhang1, Zhujun Xiao1, and Andrew A. Chien1,2
1University of Chicago 2Argonne NaKonal Lab
12/09/2019 5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19)
h"ps://serverless-benchmark.com
Serverless is the fastest growing element of cloud workload
But
Computation demand surges when interest events happen
Timely response to these events
4
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Time Demand
Serverless invoca-ons are best-effort ❌ No way to guarantee when an invoca-on will run
Resource Time Serverless
5
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Bursty Load
Real-time Serverless (RTS) = Serverless + Guaranteed Invocation Rate
12/09/2019 5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19)
6
Resource Time
Real-time Serverless
guaranteed invoca6on rate
1 sec 3 sec 10 inv. 30 inv. 10 inv. per sec
Deploy Function description:
invocation per period of (%/!"#$) seconds.
7
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
✓ Timely resource access
Time Resource
Bursty Load Real-5me Serverless invoca5on Time Serverless Bursty Load Resource
Value is represented as: !"#$%&#'(% = *#+&#'(% ⋅ %
8
8
Response Delay Frame Value
Burst Height Burst Duration
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Guaranteed Invocation Rate (9.:;) Camera Real-Bme Serverless Framework Video Monitoring Burst arrival Response
100
B e t t e r V a l u e D i s t r i b u t i
■ !"#$ = 0.0 ()*+,-.(+)/0. ■ !"#$ = 0.1 ()*+,-.(+)/0. ■ !"#$ = 0.3 ()*+,-.(+)/0. ■ !"#$ = 0.9 ()*+,-.(+)/0. ■ !"#$ = 1.0 ()*+,-.(+)/0.
ü High guaranteed invoca8on rate à high value ü Guarantee Sta8s8cs for Frame Value
9
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Guarantee Invocation Rates
0.03 0.3 3 30 0.2 0.4 0.6 0.8 1 Percentage of Burst Frames
Normalized Frame Value ft = frame-time = 1/30 sec
Application can adjust guaranteed invocation rate to meet any value target
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 0.2 0.4 0.6 0.8 1 Percentage of Burst Frame Guarantee Invocation Rate (instance per frame-time) 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 0.2 0.4 0.6 0.8 1 Percentage of Burst Frame Guarantee InvocaJon Rate (instance per frame-Jme)
0.86 0.92
ü Enable applicaJon to engineer the value distribuJon
10
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Higher is better
90% of max. value 70% of max. value 50% of max. value
Time Burst interference duty factor ↔ burst interference
ü For realistic bursty applications, the interference probability is low
11
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1 2 3 4 5 Probability Burst Interfering
■ Duty factor = 1% ■ Duty factor = 10% ■ Duty factor = 25% 2.5% 0.2%
ü Real-time Serverless can support multiple bursts ü Approach is simple – just increase the guaranteed invocation rate
12
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Higher is be,er Bursts can happen simultaneously
Real-&me serverless interface
<function name> lang: <Language of function body> handler: <Location of function body> image: <Docker image reference> realtime: <Guaranteed invocation rate> timeout: <Runtime limit> limits: <Maximum resource use> requests: <Minimum resource use>
13
12/09/2019 5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19)
Working prototype
registra'on
14
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Rush hours Night time DayAme
Vary guaranteed invocation rate (large background load)
12/09/2019 5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19)
15
0.2 0.4 0.6 0.8 1 5 10 15 20 Successful Frame Rate (normalized) Hour of Day
■ ApplicaHon Requests ■ Serverless/OpenFaaS (!"#$ = 0) ■ Real-Hme Serverless, !"#$ = 0.3 ■ Real-Hme Serverless, !"#$ = 1.0
Serverless cannot respond to demand changes ✓ RTS’ guarantee invocation rate enables it to respond to application demand despite competition from background load ✓ Higher RTS invocation rate improves for success rate for multiple bursts
2019)
None focus on performance guarantees / real-time.
16
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
applica2ons.
17
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Founda3on Grants CNS-1405959, CMMI-1832230, and CNS-
Samsung.
18
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
19
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
IT Server Real-,me Bursty Our focus! Cloud Data Center Edge Providers
Computa,on Infrastructure Applications
20
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
12/09/2019 5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19)
22
12/09/2019 5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19)
23
Glimpse Pipeline Architecture1
1 Tiffany Yu-Han Chen et. al., Glimpse: Continuous, Real-time Object Recognition on Mobile Devices, SenSys’15
24
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Burst StaLsLcs
ü Guaranteed invoca.on rate enables value guarantee
25
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Realistic Workload Synthe.c Workload
26
ü Enable ra+onal design for value guarantee
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Realis+c Workload Synthetic Workload
burst
height) ü Any value are achievable at an appropriate !"#$ ü Maximum value is achieved at !"#$ = 1, regardless burst shape
27
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Higher is better
Change variability by varying burst duration standard deviation
Duty factor = 1% Duty factor = 25% Variability causes value drop Higher duty factor creates more damage ✓ Increase !"#$ cancels variability effect ✓ RTS value can be maintained for wide burst variance 28
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19)
Higher is better
12/09/2019
27% 0.25 40% 0.35
✓ RTS resource cost scales with actual demand ✓ RTS resource consumption is 2.2x to 5x lower than UI ✓ RTS helps cloud provider save resource to serve more applications
500 1000 1500 2000 2500 3000 200 400 600 800 1000 1200 Resource (instances) Time (min)
10 Apps 100 Apps ■ Total demand ■ UI allocaEon ■ RTS allocaEon ■ RTS avg. allocaEon
200 400 600 800 1000 1200 Time (min)
29
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Lower is beJer
value with different duty factors
✓ RTS resource value per unit cost is 16-24x higher than UI ✓ RTS enables low cost solu@ons for real-@me, bursty applica@ons
30
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Lower is better
12/09/2019 5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19)
31
✓ RTS is 2x to 8x cheaper than UI ✓ Actual resource requirement is 70x lower than the worst case
32
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
Lower is better Lower is be-er
RTS instances can be quickly reuse after reaching the max. runtime !"#$ RTS pool capacity is bounded C A'(), R'() = A'() ⋅ !"#$
Fixed Dura+on (!"#$) Pool Size (Size) Instances Reused
. . . t 33
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
34
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019
<func(on’s name> lang: <prog. language> handler: <refers to a folder where func(on body can be found> image: <Docker image reference> real%me: <minimum invoca%on rate> environment: exec_(meout: <Hard processing (meout> limits: # <---- Maximum resources used by the func7on memory: <max. memory> cpu: <max. cpu> requests: # <---- Resource requested by an instance memory: <req. memory> cpu: <req. cpu> RTS Extension
Serverless is the fastest growing element
future cloud compu%ng
12/09/2019
35 ■ Serverless ■ Virtualiza/on ■ MapReduce ✓ Easy for development and deployment ✓ Dynamic resource scaling enables cost efficiency ✓ High resource management flexibility
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19)
RS Real-'me Serverless Serverless (best-effort) Serverless Serverless (best-effort) Driver Background load generator Image viewer Streaming app Driver Image viewer Streaming app
36
5TH WORKSHOP ON SERVERLESS COMPUTING (WOSC’19) 12/09/2019