Skip to content

Performance Testing

ykalidin edited this page May 14, 2019 · 24 revisions

gRPC to gRPC - Bidirectional streaming

Objective of this performance testing is to observe how well flogo-microgateway proxies a gRPC endpoint using a general purpose VM.

Following are the key performance metrics captured, when 500 concurent gRPC clients stream messages (send & receive from gRPC echo server) through flogo-microgateway running in a EC2 instance:

Results:

Sample No. Test Duration(Sec) Throughput Average Response Time(ms)
Messages Processed/Sec Kilo Bytes Processed/Sec
1 1800 93,905 3005 7.70
2 1800 94,170 3013 7.34
3 1800 94,156 3013 7.31
4 1800 93,957 3007 7.62
5 1800 94,169 3013 7.31
6 1800 94,202 3014 7.19

 

EC2 instance specification: t3.medium(Variable ECUs, 2 vCPUs, 2.5 GHz, Intel Skylake P-8175, 4 GiB memory, EBS only).

  • Test Duration: Total test time in Seconds.
  • Throughput (Messages Processed/Sec): Number of messages(Upstream + Downstream) transferred per second through the gateway.
  • Throughput (Kilo Bytes Processed/Sec): Number of bytes(Upstream + Downstream) transferred per second through the gateway in Kilo values.
  • Average Response Time(ms): Average of message round trip time. round trip - time taken for a message to travel from client -> gateway -> server -> gateway -> back to the client. Captured in Milliseconds.

Response Time and Transactions per second graph:

The below graph plots the Moving Average of Response Time and Throughput(Messages per second) with respect to time.

CPU Utilization Graph:

Memory Utilization Graph:

Setup:

Test set up consists of 3 programs (Test-Runner, Gateway & gRPC-Echo-Server) running on a single EC2 instance.

  • Test-Runner -> It is a go based application which simulates 1000 gRPC clients & captures required statistics.
  • Gateway -> It's a gRPC-Bidirectional proxy gateway.
  • gRPC-Echo-Server ->The light weight gRPC Echo Server which reads message object from incoming stream and writes the same on to outgoing stream.

The detailed setup for the test is given at gRPC bidi example.

During the test, Test-Runner application instantiates 500 gRPC clients with 20ms wait time between 2 consecutive instantiations. Each gRPC-Client establishes connection with microgateway (acts as proxy for gRPC-Echo-Server). And then starts sending & receiving messages simultaneously with 10ms wait time between 2 consecutive message sends. Message payload holds the origin timestamp and its size is 32 bytes. The message payload timestamp will be used by Test-Runner to calculate round trip time when it reaches back to the Client (message path: Client -> Microgateway -> Echo Server -> Gateway -> Client). Test-runner application captures all messages with time stamps and calculates average round trip time (also referred as response time).

Clone this wiki locally