KS & Q Q UE ANKS UESTIONS TIONS Microservices introduce new - - PowerPoint PPT Presentation
KS & Q Q UE ANKS UESTIONS TIONS Microservices introduce new - - PowerPoint PPT Presentation
Q S IM : E NABLING A CCURATE AND S CALABLE S IMULATION FOR I NTERACTIVE M ICROSERVICES Yanqi Zhang, Yu Gan, Christina Delimitrou Cornell University Session: Datacenters and Cloud Computing, March 26 th M AR TO M IC ARCHI CHING NG TO ICRO
MAR
ARCHI CHING NG TO TO MIC ICRO ROSER SERVI VICES CES
1
Monolith Application
MAR
ARCHI CHING NG TO TO MIC ICRO ROSER SERVI VICES CES
1
Monolith Application Microservices
MAR
ARCHI CHING NG TO TO MIC ICRO ROSER SERVI VICES CES
1
- Easier development & update
Monolith Application Microservices
MAR
ARCHI CHING NG TO TO MIC ICRO ROSER SERVI VICES CES
1
- Easier development & update
- Debugging & error isolation
Monolith Application Microservices
MAR
ARCHI CHING NG TO TO MIC ICRO ROSER SERVI VICES CES
1
- Easier development & update
- Debugging & error isolation
- Elasticity
Monolith Application Microservices
MAR
ARCHI CHING NG TO TO MIC ICRO ROSER SERVI VICES CES
1
- Easier development & update
- Debugging & error isolation
- Elasticity
- PL/framework heterogeneity
Monolith Application Microservices
MAR
ARCHI CHING NG TO TO MIC ICRO ROSER SERVI VICES CES
2
Visualization tool: https://github.com/netflix/vizceral.git
Real time traffic of Social Network Microservices
MAR
ARCHI CHING NG TO TO MIC ICRO ROSER SERVI VICES CES
2
- Complicate cluster management due to microservice dependencies
Visualization tool: https://github.com/netflix/vizceral.git
Real time traffic of Social Network Microservices
INF
NFRASTRUCTURE RASTRUCTURE CH CHALL ALLENGES ENGES FOR OR MIC ICROS ROSERVICES ERVICES
3
INF
NFRASTRUCTURE RASTRUCTURE CH CHALL ALLENGES ENGES FOR OR MIC ICROS ROSERVICES ERVICES
- Performance unpredictability usually occurs at large scale
3
INF
NFRASTRUCTURE RASTRUCTURE CH CHALL ALLENGES ENGES FOR OR MIC ICROS ROSERVICES ERVICES
- Performance unpredictability usually occurs at large scale
- Leverage simulation
3
INF
NFRASTRUCTURE RASTRUCTURE CH CHALL ALLENGES ENGES FOR OR MIC ICROS ROSERVICES ERVICES
- Performance unpredictability usually occurs at large scale
- Leverage simulation
- Architecture simulator: Gem5, Zsim (ISCA’13)
- Cluster level queueing simulator: BigHouse (ISPASS’12)
3
INF
NFRASTRUCTURE RASTRUCTURE CH CHALL ALLENGES ENGES FOR OR MIC ICROS ROSERVICES ERVICES
- Performance unpredictability usually occurs at large scale
- Leverage simulation
- Architecture simulator: Gem5, Zsim (ISCA’13)
- Cluster level queueing simulator: BigHouse (ISPASS’12)
- Microservices introduce new simulation requirements
3
INF
NFRASTRUCTURE RASTRUCTURE CH CHALL ALLENGES ENGES FOR OR MIC ICROS ROSERVICES ERVICES
- Performance unpredictability usually occurs at large scale
- Leverage simulation
- Architecture simulator: Gem5, Zsim (ISCA’13)
- Cluster level queueing simulator: BigHouse (ISPASS’12)
- Microservices introduce new simulation requirements
- Scalability to study cluster management
3
INF
NFRASTRUCTURE RASTRUCTURE CH CHALL ALLENGES ENGES FOR OR MIC ICROS ROSERVICES ERVICES
- Performance unpredictability usually occurs at large scale
- Leverage simulation
- Architecture simulator: Gem5, Zsim (ISCA’13)
- Cluster level queueing simulator: BigHouse (ISPASS’12)
- Microservices introduce new simulation requirements
- Scalability to study cluster management
- Accurate multi-stage models for individual service/microservice
3
INF
NFRASTRUCTURE RASTRUCTURE CH CHALL ALLENGES ENGES FOR OR MIC ICROS ROSERVICES ERVICES
- Performance unpredictability usually occurs at large scale
- Leverage simulation
- Architecture simulator: Gem5, Zsim (ISCA’13)
- Cluster level queueing simulator: BigHouse (ISPASS’12)
- Microservices introduce new simulation requirements
- Scalability to study cluster management
- Accurate multi-stage models for individual service/microservice
- Modeling arbitrary dependency graphs and dataflow paths
3
INF
NFRASTRUCTURE RASTRUCTURE CH CHALL ALLENGES ENGES FOR OR MIC ICROS ROSERVICES ERVICES
- Performance unpredictability usually occurs at large scale
- Leverage simulation
- Architecture simulator: Gem5, Zsim (ISCA’13)
- Cluster level queueing simulator: BigHouse (ISPASS’12)
- Microservices introduce new simulation requirements
- Scalability to study cluster management
- Accurate multi-stage models for individual service/microservice
- Modeling arbitrary dependency graphs and dataflow paths
- Modeling blocking and synchronization behavior
3
𝝂QSIM
IM DES ESIG IGN
4
𝝂QSIM
IM DES ESIG IGN
- Accurate yet scalable service models
- Event-driven queueing simulator
4
𝝂QSIM
IM DES ESIG IGN
- Accurate yet scalable service models
- Event-driven queueing simulator
- Simple microservice: single stage
4
Stage 0
𝝂QSIM
IM DES ESIG IGN
- Accurate yet scalable service models
- Event-driven queueing simulator
- Simple microservice: single stage
- Complex service: decomposed to multiple stages
4
Stage 0 Stage 0 Stage 1 Stage 2
𝝂QSIM
IM DES ESIG IGN
- Accurate yet scalable service models
- Event-driven queueing simulator
- Simple microservice: single stage
- Complex service: decomposed to multiple stages
- Modeling dependency graph & dataflow path
- Specify dependency graph & dataflow paths
4
Stage 0 Stage 0 Stage 1 Stage 2
Service A Service B Service A
client server client
𝝂QSIM
IM DES ESIG IGN
- Accurate yet scalable service models
- Event-driven queueing simulator
- Simple microservice: single stage
- Complex service: decomposed to multiple stages
- Modeling dependency graph & dataflow path
- Specify dependency graph & dataflow paths
- Modeling blocking/synchronization
- Encode blocking/synchronization behavior in
dataflow path
4
Stage 0 Stage 0 Stage 1 Stage 2
Service A Service B Service A
client server client
𝝂QSIM
IM DES ESIG IGN
- Accurate yet scalable service models
- Event-driven queueing simulator
- Simple microservice: single stage
- Complex service: decomposed to multiple stages
- Modeling dependency graph & dataflow path
- Specify dependency graph & dataflow paths
- Modeling blocking/synchronization
- Encode blocking/synchronization behavior in
dataflow path
- Model sources of blocking: network connections,
threads blocked by I/O accesses
4
Stage 0 Stage 0 Stage 1 Stage 2
Service A Service B Service A
client server client
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
- 𝝂qSim microservice model
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
- 𝝂qSim microservice model
- Multiple stages per microservice
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
- 𝝂qSim microservice model
- Multiple stages per microservice
TCP RX TCP TX
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
TCP RX TCP TX
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
TCP RX TCP TX Epoll Socket read
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
TCP RX TCP TX Epoll Socket read Mem$ read Mem$ write Socke t send
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
- Each stage optionally coupled with a queue
TCP RX TCP TX Epoll Socket read Mem$ read Mem$ write Socke t send
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
- Each stage optionally coupled with a queue
TCP RX TCP TX Epoll Socket read Mem$ read Mem$ write Socke t send
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
- Each stage optionally coupled with a queue
- Multiple execution paths (e.g., Memcached read/write) per microservice
TCP RX TCP TX Epoll Socket read Mem$ read Mem$ write Socke t send
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
- Each stage optionally coupled with a queue
- Multiple execution paths (e.g., Memcached read/write) per microservice
TCP RX TCP TX Epoll Socket read Mem$ read Mem$ write Socke t send
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
- Each stage optionally coupled with a queue
- Multiple execution paths (e.g., Memcached read/write) per microservice
TCP RX TCP TX Epoll Socket read Mem$ read Mem$ write Socke t send
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
Connection A Connection B 3 1 2
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
- Each stage optionally coupled with a queue
- Multiple execution paths (e.g., Memcached read/write) per microservice
TCP RX TCP TX Epoll Socket read Mem$ read Mem$ write Socke t send
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
Connection A Connection B 3 1 2
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
- Each stage optionally coupled with a queue
- Multiple execution paths (e.g., Memcached read/write) per microservice
TCP RX TCP TX Epoll Socket read Mem$ read Mem$ write Socke t send
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
Connection A Connection B 3 1 2
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
- Each stage optionally coupled with a queue
- Multiple execution paths (e.g., Memcached read/write) per microservice
TCP RX TCP TX Epoll Socket read Mem$ read Mem$ write Socke t send
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
Connection A Connection B 3 1 2
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
- Each stage optionally coupled with a queue
- Multiple execution paths (e.g., Memcached read/write) per microservice
TCP RX TCP TX Epoll Socket read Mem$ read Mem$ write Socke t send
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
Connection A Connection B 3 1 2
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
- Each stage optionally coupled with a queue
- Multiple execution paths (e.g., Memcached read/write) per microservice
TCP RX TCP TX Epoll Socket read Mem$ read Mem$ write Socke t send
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
Connection A Connection B 3 1 2
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
- Each stage optionally coupled with a queue
- Multiple execution paths (e.g., Memcached read/write) per microservice
TCP RX TCP TX Epoll Socket read Mem$ read Mem$ write Socke t send
MOD
ODELING ELING INDIVI IVIDU DUAL AL MIC ICRO ROSERVIC ERVICES ES
- Memcached
5
Connection A Connection B 3 1 2
- 𝝂qSim microservice model
- Multiple stages per microservice
- Provided models for common OS queueing utilities (e.g., epoll & socket read)
- Each stage optionally coupled with a queue
- Multiple execution paths (e.g., Memcached read/write) per microservice
TCP RX TCP TX Epoll Socket read Mem$ read Mem$ write Socke t send
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
6
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
6
- Microservice dependency graph
NGINX Memcached MongoDB
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
6
- Microservice dependency graph
- Dataflow
- Sequence of microservices to execute
- Differ across request types
- Dataflow node encodes blocking/synchronization operation
NGINX Memcached MongoDB
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
6
- Microservice dependency graph
- Dataflow
- Sequence of microservices to execute
- Differ across request types
- Dataflow node encodes blocking/synchronization operation
- Deployment
- Available servers and hardware resources
- Service to server mapping
- Services on the same server share network stack & disk I/O
NGINX Memcached MongoDB
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
7
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
- Example: 2-tier application & http 1/1.1 protocol
7
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
- Example: 2-tier application & http 1/1.1 protocol
- Dependency graph
7
NGINX
Memcached
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
- Example: 2-tier application & http 1/1.1 protocol
- Dependency graph
- Dataflow
7
NGINX
Memcached
NGINX Memcached NGINX
Block recv connection Unblock recv connection
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
- Example: 2-tier application & http 1/1.1 protocol
- Dependency graph
- Dataflow
7
Connection A Connection B
NGINX
Memcached
NGINX Memcached NGINX
NGINX
Memcached
1 3 2
Block recv connection Unblock recv connection
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
- Example: 2-tier application & http 1/1.1 protocol
- Dependency graph
- Dataflow
7
Connection A Connection B
NGINX
Memcached
NGINX Memcached NGINX
NGINX
Memcached
1 3 2
Block recv connection Unblock recv connection
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
- Example: 2-tier application & http 1/1.1 protocol
- Dependency graph
- Dataflow
7
Connection A Connection B
NGINX
Memcached
NGINX Memcached NGINX
NGINX
Memcached
1 3 2
Block recv connection Unblock recv connection
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
- Example: 2-tier application & http 1/1.1 protocol
- Dependency graph
- Dataflow
7
Connection A Connection B
NGINX
Memcached
NGINX Memcached NGINX
NGINX
Memcached
1 3 2
Block recv connection Unblock recv connection
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
- Example: 2-tier application & http 1/1.1 protocol
- Dependency graph
- Dataflow
7
Connection A Connection B
NGINX
Memcached
NGINX Memcached NGINX
NGINX
Memcached
1 3 2
Block recv connection Unblock recv connection
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
- Example: 2-tier application & http 1/1.1 protocol
- Dependency graph
- Dataflow
7
Connection A Connection B
NGINX
Memcached
NGINX Memcached NGINX
NGINX
Memcached
1 3 2
Block recv connection Unblock recv connection
MOD
ODELING ELING DEP EPENDEN ENDENCY CY GRA RAPH & DATA ATAFLOW FLOW
- Example: 2-tier application & http 1/1.1 protocol
- Dependency graph
- Dataflow
7
Connection A Connection B
NGINX
Memcached
NGINX Memcached NGINX
NGINX
Memcached
1 3 2
Block recv connection Unblock recv connection
DEP
EPENDEN ENDENCY CY GRA RAPH FOR OR COMPL OMPLEX EX MIC ICRO ROSERVICES SERVICES
8
- Social network application
MongoDB
NGINX
Compose Post Video Image
Text UserTag
Posts Storage Write Timeline Write Graph Memcached MongoDB Memcached MongoDB Memcached Source: http://www.csl.cornell.edu/~delimitrou/papers/2019.asplos.microservices.pdf Unique ID URL Shorten Read Timeline Read Post Follow User User Info MongoDB Memcached
DEP
EPENDEN ENDENCY CY GRA RAPH FOR OR COMPL OMPLEX EX MIC ICRO ROSERVICES SERVICES
8
- Social network application
MongoDB
NGINX
Compose Post Video Image
Text UserTag
Posts Storage Write Timeline Write Graph Memcached MongoDB Memcached MongoDB Memcached Source: http://www.csl.cornell.edu/~delimitrou/papers/2019.asplos.microservices.pdf Unique ID URL Shorten Read Timeline Read Post
R
Follow User User Info MongoDB Memcached
DEP
EPENDEN ENDENCY CY GRA RAPH FOR OR COMPL OMPLEX EX MIC ICRO ROSERVICES SERVICES
8
- Social network application
MongoDB
NGINX
Compose Post Video Image
Text UserTag
Posts Storage Write Timeline Write Graph Memcached MongoDB Memcached MongoDB Memcached Source: http://www.csl.cornell.edu/~delimitrou/papers/2019.asplos.microservices.pdf Unique ID URL Shorten Read Timeline Read Post Follow User User Info MongoDB Memcached
r r r r r r
DEP
EPENDEN ENDENCY CY GRA RAPH FOR OR COMPL OMPLEX EX MIC ICRO ROSERVICES SERVICES
8
- Social network application
MongoDB
NGINX
Compose Post Video Image
Text UserTag
Posts Storage Write Timeline Write Graph Memcached MongoDB Memcached MongoDB Memcached Source: http://www.csl.cornell.edu/~delimitrou/papers/2019.asplos.microservices.pdf Unique ID URL Shorten Read Timeline Read Post Follow User User Info MongoDB Memcached
r r r r r r
DEP
EPENDEN ENDENCY CY GRA RAPH FOR OR COMPL OMPLEX EX MIC ICRO ROSERVICES SERVICES
8
- Social network application
MongoDB
NGINX
Compose Post Video Image
Text UserTag
Posts Storage Write Timeline Write Graph Memcached MongoDB Memcached MongoDB Memcached Source: http://www.csl.cornell.edu/~delimitrou/papers/2019.asplos.microservices.pdf Unique ID URL Shorten Read Timeline Read Post Follow User User Info MongoDB Memcached
r r r
DEP
EPENDEN ENDENCY CY GRA RAPH FOR OR COMPL OMPLEX EX MIC ICRO ROSERVICES SERVICES
8
- Social network application
MongoDB
NGINX
Compose Post Video Image
Text UserTag
Posts Storage Write Timeline Write Graph Memcached MongoDB Memcached MongoDB Memcached Source: http://www.csl.cornell.edu/~delimitrou/papers/2019.asplos.microservices.pdf Unique ID URL Shorten Read Timeline Read Post Follow User User Info MongoDB Memcached
r r r
DEP
EPENDEN ENDENCY CY GRA RAPH FOR OR COMPL OMPLEX EX MIC ICRO ROSERVICES SERVICES
8
- Social network application
MongoDB
NGINX
Compose Post Video Image
Text UserTag
Posts Storage Write Timeline Write Graph Memcached MongoDB Memcached MongoDB Memcached Source: http://www.csl.cornell.edu/~delimitrou/papers/2019.asplos.microservices.pdf Unique ID URL Shorten Read Timeline Read Post
R
Follow User User Info MongoDB Memcached
r r r
DEP
EPENDEN ENDENCY CY GRA RAPH FOR OR COMPL OMPLEX EX MIC ICRO ROSERVICES SERVICES
8
- Social network application
MongoDB
NGINX
Compose Post Video Image
Text UserTag
Posts Storage Write Timeline Write Graph Memcached MongoDB Memcached MongoDB Memcached Source: http://www.csl.cornell.edu/~delimitrou/papers/2019.asplos.microservices.pdf Unique ID URL Shorten Read Timeline Read Post
R
Follow User User Info MongoDB Memcached
r r r
DEP
EPENDEN ENDENCY CY GRA RAPH FOR OR COMPL OMPLEX EX MIC ICRO ROSERVICES SERVICES
8
- Social network application
MongoDB
NGINX
Compose Post Video Image
Text UserTag
Posts Storage Write Timeline Write Graph Memcached MongoDB Memcached MongoDB Memcached Source: http://www.csl.cornell.edu/~delimitrou/papers/2019.asplos.microservices.pdf Unique ID URL Shorten Read Timeline Read Post
R
Follow User User Info MongoDB Memcached
r r r
DEP
EPENDEN ENDENCY CY GRA RAPH FOR OR COMPL OMPLEX EX MIC ICRO ROSERVICES SERVICES
8
- Social network application
MongoDB
NGINX
Compose Post Video Image
Text UserTag
Posts Storage Write Timeline Write Graph Memcached MongoDB Memcached MongoDB Memcached Source: http://www.csl.cornell.edu/~delimitrou/papers/2019.asplos.microservices.pdf Unique ID URL Shorten Read Timeline Read Post
R
Follow User User Info MongoDB Memcached
r r r
DEP
EPENDEN ENDENCY CY GRA RAPH FOR OR COMPL OMPLEX EX MIC ICRO ROSERVICES SERVICES
8
- Social network application
MongoDB
NGINX
Compose Post Video Image
Text UserTag
Posts Storage Write Timeline Write Graph Memcached MongoDB Memcached MongoDB Memcached Source: http://www.csl.cornell.edu/~delimitrou/papers/2019.asplos.microservices.pdf Unique ID URL Shorten Read Timeline Read Post
R
Follow User User Info MongoDB Memcached
r r r
SIM
IMULATOR ULATOR IN INPUTS UTS
9
SIM
IMULATOR ULATOR IN INPUTS UTS
9
- Microservice queueing model
- Identifying sources of queueing
- Typical queues: network, epoll/kqueue, socket read, disk I/O…
- Microservice models reusable (open source community)
SIM
IMULATOR ULATOR IN INPUTS UTS
9
- Microservice queueing model
- Identifying sources of queueing
- Typical queues: network, epoll/kqueue, socket read, disk I/O…
- Microservice models reusable (open source community)
- Processing time distribution
- Instrumenting applications and profiling on real servers
- Instrumentations reusable
SIM
IMULATOR ULATOR IN INPUTS UTS
9
- Microservice queueing model
- Identifying sources of queueing
- Typical queues: network, epoll/kqueue, socket read, disk I/O…
- Microservice models reusable (open source community)
- Processing time distribution
- Instrumenting applications and profiling on real servers
- Instrumentations reusable
- Microservice dependencies & dataflow paths
- Obtained from app developers
SIM
IMULATOR ULATOR IN INPUTS UTS
9
- Microservice queueing model
- Identifying sources of queueing
- Typical queues: network, epoll/kqueue, socket read, disk I/O…
- Microservice models reusable (open source community)
- Processing time distribution
- Instrumenting applications and profiling on real servers
- Instrumentations reusable
- Microservice dependencies & dataflow paths
- Obtained from app developers
- Server & system resources
VAL
ALIDATIO IDATION
10
- Validation experiments
- Multi-tier microservices: 2/3-tier application
- Load balancing & fanout effects
- Microservices based on RPC
- Comparison with BigHouse
- Server platform for trace collection
- 10-server cluster
- Intel(R) Xeon(R) CPU E5-2660 v3
- 2 sockets, 10 cores/socket, 2 threads/core
- Min/max DVFS frequency: 1.2GHz/2.6GHz
- Network bandwidth: 1Gbps
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
NGINX Memcached
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
NGINX Memcached
R
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
NGINX Memcached
R
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
NGINX Memcached
R
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
NGINX Memcached
R
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
- 3-tier application
NGINX Memcached MongoDB NGINX Memcached
R
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
- 3-tier application
NGINX Memcached MongoDB NGINX Memcached
R R
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
- 3-tier application
NGINX Memcached MongoDB NGINX Memcached
R R
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
- 3-tier application
NGINX Memcached MongoDB NGINX Memcached
R R
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
- 3-tier application
NGINX Memcached MongoDB NGINX Memcached
R R R
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
- 3-tier application
NGINX Memcached MongoDB NGINX Memcached
R R R
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
- 3-tier application
NGINX Memcached MongoDB NGINX Memcached
R R R
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
- 3-tier application
NGINX Memcached MongoDB NGINX Memcached
R R R
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
- 3-tier application
NGINX Memcached MongoDB NGINX Memcached
R R R
2/3-TIER
IER APPLICA ICATION TION
11
- 2-tier application
- 3-tier application
NGINX Memcached MongoDB NGINX Memcached
R R R
LOA
OAD BAL ALAN ANCING CING
12
Load Balancer
NGINX Web Server NGINX Web Server NGINX Web Server
R R
LOA
OAD BAL ALAN ANCING CING
12
Load Balancer
NGINX Web Server NGINX Web Server NGINX Web Server
R R
LOA
OAD BAL ALAN ANCING CING
12
Load Balancer
NGINX Web Server NGINX Web Server NGINX Web Server
R R
LOA
OAD BAL ALAN ANCING CING
12
Load Balancer
NGINX Web Server NGINX Web Server NGINX Web Server
R R
LOA
OAD BAL ALAN ANCING CING
12
Load Balancer
NGINX Web Server NGINX Web Server NGINX Web Server
R R
LOA
OAD BAL ALAN ANCING CING
12
Load Balancer
NGINX Web Server NGINX Web Server NGINX Web Server
R R
LOA
OAD BAL ALAN ANCING CING
12
Load Balancer
NGINX Web Server NGINX Web Server NGINX Web Server
R R
LOA
OAD BAL ALAN ANCING CING
12
Load Balancer
NGINX Web Server NGINX Web Server NGINX Web Server
R R
LOA
OAD BAL ALAN ANCING CING
12
Load Balancer
NGINX Web Server NGINX Web Server NGINX Web Server
R R
LOA
OAD BAL ALAN ANCING CING
12
- Linear throughput increase from cluster size of 4 to 8
- Sub-linear increase from cluster size of 8 to 16
Load Balancer
NGINX Web Server NGINX Web Server NGINX Web Server
R R
REQ
EQUEST UEST FAN ANOU OUT
13
NGINX Root Aggregator
NGINX Web Server NGINX Web Server NGINX Web Server
R
REQ
EQUEST UEST FAN ANOU OUT
13
NGINX Root Aggregator
NGINX Web Server NGINX Web Server NGINX Web Server
R
REQ
EQUEST UEST FAN ANOU OUT
13
NGINX Root Aggregator
NGINX Web Server NGINX Web Server NGINX Web Server
r r r
REQ
EQUEST UEST FAN ANOU OUT
13
NGINX Root Aggregator
NGINX Web Server NGINX Web Server NGINX Web Server
r r r
REQ
EQUEST UEST FAN ANOU OUT
13
NGINX Root Aggregator
NGINX Web Server NGINX Web Server NGINX Web Server
R
REQ
EQUEST UEST FAN ANOU OUT
13
NGINX Root Aggregator
NGINX Web Server NGINX Web Server NGINX Web Server
R
REQ
EQUEST UEST FAN ANOU OUT
13
- Throughput decreases with request fanout
NGINX Root Aggregator
NGINX Web Server NGINX Web Server NGINX Web Server
R
RPC & LAR
ARGE GE-SCALE CALE MIC ICRO ROSERVIC ERVICES ES
14
- Simplified social network
Frontend
Post Service Media Service User Service Mem$ Mongo Mem$ Mongo Mem$ Mongo
R RPC
RPC & LAR
ARGE GE-SCALE CALE MIC ICRO ROSERVIC ERVICES ES
14
- Simplified social network
Frontend
Post Service Media Service User Service Mem$ Mongo Mem$ Mongo Mem$ Mongo
R RPC
RPC & LAR
ARGE GE-SCALE CALE MIC ICRO ROSERVIC ERVICES ES
14
- Simplified social network
Frontend
Post Service Media Service User Service Mem$ Mongo Mem$ Mongo Mem$ Mongo
r r RPC
RPC & LAR
ARGE GE-SCALE CALE MIC ICRO ROSERVIC ERVICES ES
14
- Simplified social network
Frontend
Post Service Media Service User Service Mem$ Mongo Mem$ Mongo Mem$ Mongo
r r RPC
RPC & LAR
ARGE GE-SCALE CALE MIC ICRO ROSERVIC ERVICES ES
14
- Simplified social network
Frontend
Post Service Media Service User Service Mem$ Mongo Mem$ Mongo Mem$ Mongo
R RPC
RPC & LAR
ARGE GE-SCALE CALE MIC ICRO ROSERVIC ERVICES ES
14
- Simplified social network
Frontend
Post Service Media Service User Service Mem$ Mongo Mem$ Mongo Mem$ Mongo
R RPC
RPC & LAR
ARGE GE-SCALE CALE MIC ICRO ROSERVIC ERVICES ES
14
- Simplified social network
Frontend
Post Service Media Service User Service Mem$ Mongo Mem$ Mongo Mem$ Mongo
R RPC
COMPARI
OMPARISON SON WIT ITH BIG IGHOU OUSE SE
15
- Memcached
- NGINX
Epoll Socket read Mem$ proc Socket send TCP RX TCP TX Epoll Socket read Nginx proc TCP RX TCP TX
COMPARI
OMPARISON SON WIT ITH BIG IGHOU OUSE SE
15
- Memcached
- NGINX
Epoll Socket read Mem$ proc Socket send TCP RX TCP TX Epoll Socket read Nginx proc TCP RX TCP TX
- BigHouse saturates at 50kQPS
- 𝝂qSim & real server saturates at 450kQPS
COMPARI
OMPARISON SON WIT ITH BIG IGHOU OUSE SE
15
- Memcached
- NGINX
Epoll Socket read Mem$ proc Socket send TCP RX TCP TX Epoll Socket read Nginx proc TCP RX TCP TX
- BigHouse saturates at 50kQPS
- 𝝂qSim & real server saturates at 450kQPS
- BigHouse saturates at 2.5kQPS
- 𝝂qSim & real server saturates at 15kQPS
SIM
IMULATION ULATION SPEE EED
16
- Simulation speed relevant factors
- Simulated input load
- Processing time distribution
- Microservice model complexity & network complexity
SIM
IMULATION ULATION SPEE EED
16
- Simulation speed relevant factors
- Simulated input load
- Processing time distribution
- Microservice model complexity & network complexity
- Performance compared to real system
- Tail@Scale experiment: 26.5x slow down for cluster of 500 servers
- 4-thread Memcached at 50kQPS: 2.5x speed up
- 1-process Nginx at 10kQPS: 4x speed up
SIM
IMULATION ULATION SPEE EED
16
- Simulation speed relevant factors
- Simulated input load
- Processing time distribution
- Microservice model complexity & network complexity
- Performance compared to real system
- Tail@Scale experiment: 26.5x slow down for cluster of 500 servers
- 4-thread Memcached at 50kQPS: 2.5x speed up
- 1-process Nginx at 10kQPS: 4x speed up
- Future work
- Parallelizing simulation
- Each thread simulates a partition of the network
CONCLUS
ONCLUSION ION
17
- Microservices introduce new system challenges
- Need scalable simulation techniques to study large scale effects
- 𝝂qSim: validated microservice simulator
- Modeling the internal queueing structure of individual microservices
- Modeling dataflow behavior across the microservices
- Validated against simple & complex microservices and accurately capturing
throughput/latency
- Planning to open source @ microservices.ece.cornell.edu
THAN
ANKS KS & Q
QUE
UESTIONS TIONS
18
- Microservices introduce new system challenges
- Need scalable simulation techniques to study large scale effects
- 𝝂qSim: validated microservice simulator
- Modeling the internal queueing structure of individual microservices
- Modeling dataflow behavior across the microservices
- Validated against simple & complex microservices and accurately capturing
throughput/latency
- Planning to open source @ microservices.ece.cornell.edu
SPEE
EED COMPARI OMPARISON SON WIT ITH BIG IGHOUS OUSE (B
(BAC
ACKUP KUP)
19
𝝂qSim simulated real time 5s 20s 60s 𝝂qSim simulation time 12.8 s 51.2s 154.1 s BigHouse warmup samples 5 x50k 20 x50k 60 x50k 5000 BigHouse simulation time 8.2s 28.7s 154s 1.2s 𝝂qSim simulated real time 5s 20s 60s 𝝂qSim simulation time 0.7s 2.7s 8.1s BigHouse warmup samples 5 x2k 20 x2k 60 x2k 5000 BigHouse simulation time 9s 23s 64s 7.1s
4-thread Memcached at 50k 1-process NGINX at 2k
USE
SE CAS ASES ES – TAI AIL@S
@SCA
CALE LE (B
(BAC
ACKUP UP)
20
- For simple single-tier single stage
- Different Cluster Sizes
- Different Fraction of Slow Servers
USE
SE CAS ASES ES – POW OWER ER MAN ANAGEMEN AGEMENT (B
(BAC
ACKU KUP)
21
- End-to-End QoS Target
- 5ms
- Input Load
- Diurnal pattern
- Results