Ballerina Performance Test Results

July 7, 2021 · View on GitHub

During each release, we execute various automated performance test scenarios and publish the results.

Test ScenariosDescription
Passthrough HTTP service (h1c -> h1c)An HTTP Service, which forwards all requests to an HTTP back-end service.
Passthrough HTTPS service (h1 -> h1)An HTTPS Service, which forwards all requests to an HTTPS back-end service.
JSON to XML transformation HTTP serviceAn HTTP Service, which transforms JSON requests to XML and then forwards all requests to an HTTP back-end service.
JSON to XML transformation HTTPS serviceAn HTTPS Service, which transforms JSON requests to XML and then forwards all requests to an HTTPS back-end service.
Passthrough HTTP/2(over TLS) service (h2 -> h2)An HTTPS Service exposed over HTTP/2 protocol, which forwards all requests to an HTTP/2(over TLS) back-end service.
Passthrough HTTP/2(over TLS) service (h2 -> h1)An HTTPS Service exposed over HTTP/2 protocol, which forwards all requests to an HTTPS back-end service.
Passthrough HTTP/2(over TLS) service (h2 -> h1c)An HTTPS Service exposed over HTTP/2 protocol, which forwards all requests to an HTTP back-end service.
HTTP/2 client and server downgrade service (h2 -> h2)An HTTP/2(with TLS) server accepts requests from an HTTP/1.1(with TLS) client and the HTTP/2(with TLS) client sends requests to an HTTP/1.1(with TLS) back-end service. Both the upstream and the downgrade connection is downgraded to HTTP/1.1(with TLS).

Our test client is Apache JMeter. We test each scenario for a fixed duration of time. We split the test results into warmup and measurement parts and use the measurement part to compute the performance metrics.

A majority of test scenarios use a Netty based back-end service which echoes back any request posted to it after a specified period of time.

We run the performance tests under different numbers of concurrent users, message sizes (payloads) and back-end service delays.

The main performance metrics:

  1. Throughput: The number of requests that the Ballerina service processes during a specific time interval (e.g. per second).
  2. Response Time: The end-to-end latency for an operation of invoking a Ballerina service. The complete distribution of response times was recorded.

In addition to the above metrics, we measure the load average and several memory-related metrics.

The following are the test parameters.

Test ParameterDescriptionValues
Scenario NameThe name of the test scenario.Refer to the above table.
Heap SizeThe amount of memory allocated to the application2G
Concurrent UsersThe number of users accessing the application at the same time.100, 300, 1000
Message Size (Bytes)The request payload size in Bytes.50, 1024
Back-end Delay (ms)The delay added by the back-end service.0

The duration of each test is 900 seconds. The warm-up period is 300 seconds. The measurement results are collected after the warm-up period.

A c5.xlarge Amazon EC2 instance was used to install Ballerina.

The following are the measurements collected from each performance test conducted for a given combination of test parameters.

MeasurementDescription
Error %Percentage of requests with errors
Average Response Time (ms)The average response time of a set of results
Standard Deviation of Response Time (ms)The “Standard Deviation” of the response time.
99th Percentile of Response Time (ms)99% of the requests took no more than this time. The remaining samples took at least as long as this
Throughput (Requests/sec)The throughput measured in requests per second.
Average Memory Footprint After Full GC (M)The average memory consumed by the application after a full garbage collection event.

The following is the summary of performance test results collected for the measurement period.

Scenario NameConcurrent UsersMessage Size (Bytes)Back-end Service Delay (ms)Error %Throughput (Requests/sec)Average Response Time (ms)Standard Deviation of Response Time (ms)99th Percentile of Response Time (ms)Ballerina GC Throughput (%)Average Ballerina Memory Footprint After Full GC (M)
Passthrough HTTP service (h1c -> h1c)100500014455.276.873.817N/AN/A
Passthrough HTTP service (h1c -> h1c)10010240013936.997.133.8317N/AN/A
Passthrough HTTP service (h1c -> h1c)300500014986.2519.967.6440N/AN/A
Passthrough HTTP service (h1c -> h1c)30010240014558.4320.557.9442N/AN/A
Passthrough HTTP service (h1c -> h1c)1000500014071.9370.9819.17125N/AN/A
Passthrough HTTP service (h1c -> h1c)100010240013984.4371.4218.86125N/AN/A
JSON to XML transformation HTTP service10050009446.1510.545.6127N/AN/A
JSON to XML transformation HTTP service1001024006915.3514.416.3134N/AN/A
JSON to XML transformation HTTP service30050009608.5731.169.4959N/AN/A
JSON to XML transformation HTTP service3001024007085.6342.289.7273N/AN/A
JSON to XML transformation HTTP service100050009449.33105.7517.82159N/AN/A
JSON to XML transformation HTTP service10001024006992.01142.9325.15209N/AN/A
Passthrough HTTPS service (h1 -> h1)100500012567.747.913.9819N/AN/A
Passthrough HTTPS service (h1 -> h1)10010240011160.178.914.1620N/AN/A
Passthrough HTTPS service (h1 -> h1)300500012306.8624.318.9149N/AN/A
Passthrough HTTPS service (h1 -> h1)30010240011516.1425.989.352N/AN/A
Passthrough HTTPS service (h1 -> h1)1000500011935.8683.722.85148N/AN/A
Passthrough HTTPS service (h1 -> h1)100010240011237.4388.923.35154N/AN/A
JSON to XML transformation HTTPS service10050008338.3511.946.0630N/AN/A
JSON to XML transformation HTTPS service1001024006295.1115.837.7239N/AN/A
JSON to XML transformation HTTPS service30050008484.4435.312.471N/AN/A
JSON to XML transformation HTTPS service3001024006407.3646.7513.9288N/AN/A
JSON to XML transformation HTTPS service100050008275.23120.7325.05193N/AN/A
JSON to XML transformation HTTPS service10001024006027.15165.8130.8248N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h1c)100500011571.618.444.0919N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h1c)10010240011264.378.584.0520N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h1c)300500011420.7625.829.2551N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h1c)30010240010887.9326.899.5254N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h1c)1000500010965.2190.3225.36163N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h1c)100010240010709.0892.3126.06168N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h1)100500010664.019.184.2521N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h1)10010240010135.619.594.2522N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h1)300500010708.6427.599.7755N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h1)30010240010385.1728.269.9457N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h1)1000500010338.1896.1226.53172N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h1)100010240010198.8696.7827.28175N/AN/A
HTTP/2 client and server downgrade service (h2 -> h2)100500012423.5784.0419N/AN/A
HTTP/2 client and server downgrade service (h2 -> h2)10010240011315.518.784.1820N/AN/A
HTTP/2 client and server downgrade service (h2 -> h2)300500012433.6524.068.8448N/AN/A
HTTP/2 client and server downgrade service (h2 -> h2)30010240011628.9625.739.2851N/AN/A
HTTP/2 client and server downgrade service (h2 -> h2)1000500012408.680.4921.75142N/AN/A
HTTP/2 client and server downgrade service (h2 -> h2)100010240011448.6287.2523.56152N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h2)100500011473.078.514.1120N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h2)10010240011072.858.744.1220N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h2)300500012007.7224.578.9149N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h2)30010240011778.8124.798.950N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h2)1000500011874.2283.7922.22146N/AN/A
Passthrough HTTP/2(over TLS) service (h2 -> h2)100010240011596.5585.2123.84154N/AN/A