Kong tests performance results for Kong Gateway using our public test suite.
The following sections explain the test methodology, results, and configuration.
The performance tests cover a number of baseline configurations and common use cases for Kong Gateway. The following describes the test cases used and the configuration methodology:
-
Environment: Kubernetes environment on AWS infrastructure.
-
Test use cases:
-
Routes and Consumers: Each case was tested with two different options: one with one Route and one Consumer, and one with 100 Routes and 100 Consumers, for a total of eight test cases. For test cases that didn’t require authentication, no Consumers were used.
-
Traffic distribution: Normal distribution across both Routes and Consumers.
-
Protocol: HTTPS only.
-
Sample size: Each test case was run five times, each for a duration of 15 minutes. The results are an average of the five different test runs.
Test case
|
Number of Routes and Consumers
|
Requests per second (RPS)
|
P99 (ms)
|
P95 (ms)
|
Kong proxy with no plugins
|
1 Route, 0 Consumers
|
127257.3
|
7.11
|
4.07
|
Kong proxy with no plugins
|
100 Routes, 0 Consumers
|
124402.3
|
7.39
|
4.15
|
Rate limit and no auth
|
1 Route, 0 Consumers
|
112025.7
|
8.38
|
3.89
|
Rate limit and no auth
|
100 Routes, 0 Consumers
|
108439.2
|
8.74
|
4.1
|
Rate limit and key auth
|
1 Route, 1 Consumer
|
97208.2
|
9.1
|
4.81
|
Rate limit and key auth
|
100 Routes, 100 Consumers
|
91859.1
|
9.61
|
5.11
|
Rate limit and basic auth
|
1 Route, 1 Consumer
|
92862.9
|
9.64
|
5.05
|
Rate limit and basic auth
|
100 Routes, 100 Consumers
|
87535.4
|
10.15
|
5.54
|
Test case
|
Number of Routes and Consumers
|
Requests per second (RPS)
|
P99 (ms)
|
P95 (ms)
|
Kong proxy with no plugins
|
1 Route, 0 Consumers
|
134940.8
|
6.79
|
3.7
|
Kong proxy with no plugins
|
100 Routes, 0 Consumers
|
130779.5
|
7.08
|
3.79
|
Rate limit and no auth
|
1 Route, 0 Consumers
|
115281.4
|
8.38
|
3.87
|
Rate limit and no auth
|
100 Routes, 0 Consumers
|
111324.6
|
8.57
|
3.83
|
Rate limit and key auth
|
1 Route, 1 Consumer
|
101822.8
|
9.09
|
4.46
|
Rate limit and key auth
|
100 Routes, 100 Consumers
|
96237.6
|
10.27
|
4.69
|
Rate limit and basic auth
|
1 Route, 1 Consumer
|
94680.2
|
9.58
|
5.04
|
Rate limit and basic auth
|
100 Routes, 100 Consumers
|
89378.4
|
10.2
|
5.37
|
Test case
|
Number of Routes and Consumers
|
Requests per second (RPS)
|
P99 (ms)
|
P95 (ms)
|
Kong proxy with no plugins
|
1 Route, 0 Consumers
|
142443.4
|
6.24
|
3.55
|
Kong proxy with no plugins
|
100 Routes, 0 Consumers
|
137561.7
|
6.36
|
3.58
|
Rate limit and no auth
|
1 Route, 0 Consumers
|
120897.4
|
8.08
|
3.6
|
Rate limit and no auth
|
100 Routes, 0 Consumers
|
116867.2
|
8.51
|
3.78
|
Rate limit and key auth
|
1 Route, 1 Consumer
|
105657.4
|
8.62
|
4.38
|
Rate limit and key auth
|
100 Routes, 100 Consumers
|
100047.6
|
9.12
|
4.45
|
Rate limit and basic auth
|
1 Route, 1 Consumer
|
98031.6
|
10.47
|
5.02
|
Rate limit and basic auth
|
100 Routes, 100 Consumers
|
92548.2
|
9.8
|
5.25
|
Test case
|
Number of Routes and Consumers
|
Requests per second (RPS)
|
P99 (ms)
|
P95 (ms)
|
Kong proxy with no plugins
|
1 Route, 0 Consumers
|
137358.8
|
7.25
|
4.06
|
Kong proxy with no plugins
|
100 Routes, 0 Consumers
|
133953.4
|
7.2
|
4.17
|
Rate limit and no auth
|
1 Route, 0 Consumers
|
121737.2
|
7.69
|
4.01
|
Rate limit and no auth
|
100 Routes, 0 Consumers
|
117521.4
|
8.53
|
4.22
|
Rate limit and key auth
|
1 Route, 1 Consumer
|
103777.6
|
9.43
|
4.39
|
Rate limit and key auth
|
100 Routes, 100 Consumers
|
98777.5
|
9.16
|
4.79
|
Rate limit and basic auth
|
1 Route, 1 Consumer
|
97397.6
|
9.69
|
4.93
|
Rate limit and basic auth
|
100 Routes, 100 Consumers
|
92372.6
|
10.17
|
5.31
|
Test case
|
Number of Routes and Consumers
|
Requests per second (RPS)
|
P99 (ms)
|
P95 (ms)
|
Kong proxy with no plugins
|
1 Route, 0 Consumers
|
137850.4
|
6.25
|
3.82
|
Kong proxy with no plugins
|
100 Routes, 0 Consumers
|
132302.8
|
6.55
|
3.99
|
Rate limit and no auth
|
1 Route, 0 Consumers
|
116413.8
|
7.59
|
4.56
|
Rate limit and no auth
|
100 Routes, 0 Consumers
|
111615.8
|
7.62
|
4.54
|
Rate limit and key auth
|
1 Route, 1 Consumer
|
102261.6
|
8.47
|
5.05
|
Rate limit and key auth
|
100 Routes, 100 Consumers
|
96289.6
|
8.82
|
5.25
|
Rate limit and basic auth
|
1 Route, 1 Consumer
|
95297.8
|
8.75
|
5.66
|
Rate limit and basic auth
|
100 Routes, 100 Consumers
|
89777.4
|
9.34
|
5.89
|
Kong ran these tests in AWS using EC2 machines. We used Kubernetes taints to ensure that Kong Gateway is on its own node while the load testing and observability tools are on their own separate nodes in the same cluster.
Kong Gateway ran on a single dedicated instance of c5.4xlarge, and the two nodes for the observability stack and K6 ran on dedicated c5.metal instances. We used the metal instances for the observability load generation toolchain to ensure they aren’t resource-constrained in any way. Since K6 is very resource-demanding when generating a high amount of traffic during tests, we observed that using smaller or less powerful instances for the toolchain caused the observability load generation tools to be a bottleneck for Kong Gateway performance.
For these tests, we changed the number of worker processes to match the number of available cores to the node running Kong Gateway, which was 16 vCPU. Accordingly, we set the number of processes to 16. This follows Kong’s overall performance guidance. Outside of this change, no other tuning was made.