Eureka routing to Kong [ECS]
Overview
The main idea of the test is to check how the direct routing by the sidecars affect performance to compare with routing through the API Gateway, Kong.
Test of implementation of the feature https://folio-org.atlassian.net/browse/MODSIDECAR-163
Jira ticket: Test Eureka routing to Kong
Summary
All tests completed successfully.
All tests show stable results in both routing approaches. Direct routing to Kong performs 6%-10% better than regular sidecar in scope of measured transactions:
/inventory/instances/{instanceId} - 6%, RTAC 1 vUser - 6%, RTAC 5 vUsers - 10%, CI/CO 20 vUsers - 7%, CI/CO 40 vUsers - 8%.
Service CPU distribution shifted — especially around user-keycloak, inventory-storage, and roles services. See CPU utilization most used modules values.
DB CPU utilization increased in some cases but stayed within manageable limits.
Test Runs
Test # | Workflow | Transaction | Duration | vUsers | Eureka routing |
|---|---|---|---|---|---|
1 | Simple | GET /inventory/instances/{instanceId} | 10 minutes | 1 | sidecar |
2 | Medium | TC_RTAC: edge-rtac | 10 minutes | 1 | sidecar |
3 | Medium | TC_RTAC: edge-rtac | 10 minutes | 5 | sidecar |
4 | Complex | Check-In/Check-Out | 10 minutes | 20 | sidecar |
5 | Complex | Check-In/Check-Out | 10 minutes | 40 | sidecar |
6 | Simple | GET /inventory/instances/{instanceId} | 10 minutes | 1 | kong |
7 | Medium | TC_RTAC: edge-rtac | 10 minutes | 1 | kong |
8 | Medium | TC_RTAC: edge-rtac | 10 minutes | 5 | kong |
9 | Complex | Check-In/Check-Out | 10 minutes | 20 | kong |
10 | Complex | Check-In/Check-Out | 10 minutes | 40 | kong |
Results
|
|
|
| Sidecar routing | Kong routing | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Workflow | Transaction | Duration | vUsers | Samples # | Response times, ms | CI, ms | CO, ms | Samples # | Response times, ms | CI, ms | CO, ms |
Simple | GET /inventory/instances/{instanceId} | 10 minutes | 1 | 9501 | 63 |
|
| 9985 | 59 |
|
|
Medium | TC_RTAC: edge-rtac | 10 minutes | 1 | 1163 | 516 |
|
| 1236 | 487 |
|
|
Medium | TC_RTAC: edge-rtac | 10 minutes | 5 | 2516 | 1136 |
|
| 2787 | 1025 |
|
|
Complex | Check-In/Check-Out | 10 minutes | 20 |
|
| 478 | 1127 |
|
| 444 | 1050 |
Complex | Check-In/Check-Out | 10 minutes | 40 |
|
| 490 | 1186 |
|
| 449 | 1083 |
Comparisons
The comparison table shows Kong routing perform slightly better or the same.
|
|
|
| Sidecar routing | Kong routing |
| ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Workflow | Transaction | Duration | vUsers | Samples # | Response times, ms | CI, ms | CO, ms | Samples # | Response times, ms | CI, ms | CO, ms | Delta, ms | Delta CI, ms | Delta CO, ms |
Simple | GET /inventory/instances/{instanceId} | 10 minutes | 1 | 9501 | 63 |
|
| 9985 | 59 |
|
| -4 (-6%) |
|
|
Medium | TC_RTAC: edge-rtac | 10 minutes | 1 | 1163 | 516 |
|
| 1236 | 487 |
|
| -29 (-6%) |
|
|
Medium | TC_RTAC: edge-rtac | 10 minutes | 5 | 2516 | 1136 |
|
| 2787 | 1025 |
|
| -111 (-10%) |
|
|
Complex | Check-In/Check-Out | 10 minutes | 20 |
|
| 478 | 1127 |
|
| 444 | 1050 |
| -34 (-7%) | -77 (-7%) |
Complex | Check-In/Check-Out | 10 minutes | 40 |
|
| 490 | 1186 |
|
| 449 | 1083 |
| -41 (-8%) | -103 (-9%) |
Service CPU utilization
most used modules:
Workflow | max CPU Sidecar | max CPU Kong |
|---|---|---|
GET /inventory/instances/{instanceId} | mod-inventory - 38%,mod-inventory-storage - 35% | mod-inventory - 41%,mod-inventory-storage - 39% |
TC_RTAC: edge-rtac | mod-inventory - 17%, mod-consortia-keycloak - 42% | mod-inventory - 17%, mod-consortia-keycloak - 58% |
TC_RTAC: edge-rtac | mod-inventory - 17%, mod-consortia-keycloak - 67/% | mod-inventory - 17%, mod-consortia-keycloak - 80% |
Check-In/Check-Out | mod-inventory-storage - 61%, mod-user-keycloak - 58%, mod-roles-keycloak - 48%, mod-inventory - 34% | mod-user-keycloak - 66%, roles-keycloak - 60%,mod-inventory-storage - 51%, mod-inventory - 33% |
Check-In/Check-Out | mod-inventory-storage - 113%, mod-user-keycloak - 103%, mod-roles-keycloak - 104%, mod-inventory - 52% | mod-user-keycloak - 111%, roles-keycloak - 89%, mod-inventory-storage - 88%, mod-inventory - 46% |
Sidecar routing
Kong routing
Service memory usage
Memory usage showed stable trends with no spikes. No memory leaks in both routing modes.
Sidecar routing
Kong routing
Database metrics
Database connections are close to 1700
Sidecar routing
Test #3
Test #5
Kong routing
Test #3
Test #5
Additional steps
Few more tests were carried out for CI/CO and RTAC in HA mode in KONG and SIDECAR to get info from sidecars CPU utilization. The main observation here KONG routing consume 3 times more CPU than default SIDECAR configuration, but sidecars containerCPU didn’t change much. The chart which may describe the ingress and egress requests in sidecars below as well.
Appendix
Infrastructure
PTF - environment Sunflower(secon) |
|---|
|