API Gateway Why Perfomance and Load Testing Matters(2)

2) Preparations for Performance and Load Testing
As mentioned earlier, the API Gateway acts as the entry point for API requests and responses. The subject of performance and load testing is the API Gateway with proxy functionality.
The objective of the test is to determine how many requests can be processed per second and how much system resources (CPU, Memory) are utilized, allowing for comparison.
Preparing the API Gateway
Dedicated server preparation
CPU: 4CPU
Memory: 8G
Test Functions
Proxy: Receives API requests from the client, forwards them to the API server, and delivers the response back to the client.
Additional setup of Tomcat + Proxy Servlet for comparison testing
Preparing the API
Dedicated server preparation
CPU: 4CPU
Memory: 8G
API
Generates and returns a 4 KB JSON response upon receiving a request.
Preparing the Client
Dedicated server preparation
CPU: 4CPU
Memory: 8G
Using nGrinder Open Source Testing Tool
Prepare nGrinder Controller, Agent, Monitor
Notably, nGrinder provides a monitor for measuring system resources of the target server, enabling post-test UI-based analysis of TPS, CPU, and memory usage. Additionally, the use of separate Agents allows for increasing concurrent users.
3) Performance and Load Test Execution and Results
Test Environment
Concurrent users: 100 users (5 processes * 20 threads each)
Test duration: 5 minutes
Test 1
[Client] — https → [OSORI API Gateway] — https → [API Server: 4k JSON]
Test 2
[Client] — https → [Tomcat + Proxy Servlet] — https → [API Server: 4k JSON]
Test Results
OSORI API Gateway
Average TPS: 11,177
Requests/responses processed in 5 minutes: 3,310,757
Average CPU usage: 76%
Average Memory usage: 0.3G (excluding 1.5G used by the Monitor process)


Tomcat + Proxy Servlet
Average TPS: 6,232
Requests/responses processed in 5 minutes: 1,845,405
Average CPU usage: 91%
Average Memory usage: 2.7G (excluding 1.5G used by the Monitor process)


4) Summary
OSORI demonstrated nearly twice the TPS performance compared to Tomcat. The number of requests/responses processed in 5 minutes shows that OSORI handled approximately 1.5 million more than Tomcat. (If each API request is assumed to generate 10 KRW, this would result in an additional revenue of 15 million KRW.)
Another noteworthy aspect is that while processing more requests, OSORI’s CPU usage was 15% lower, and its memory consumption was only 11% of Tomcat’s.
💡(Questions, curiosity, guidance, sharing, etc.) Coffee chats or meeting requests are always welcome! Feel free to contact us via Channel Talk.
#WEBARESOFT #OSORI #OpenAPI #APIGateway #APIM #APIManagement #APIPortal #APIPlatform #APISolution #APIMarket