This section describes some recommended performance tuning configurations to optimize the API Manager. It assumes that you have set up the API Manager on Unix/Linux, which is recommended for a production deployment. We also recommend a distributed API Manager setup for most production systems. Out of all components of an API Manager distributed setup, the API Gateway is the most critical, because it handles all inbound calls to APIs. Therefore, we recommend you to have at least a 2-node cluster of API Gateways in a distributed setup.
The values we discuss below are only general recommendations for the API Gateway. They work best when there are 350 to 30000 calls per second to the API Gateway. They might not be the optimal for the specific hardware configurations in your environment. We recommend you to carry out load tests on your environment to tune the API Manager accordingly.
Improvement Area | Performance Recommendations |
---|---|
API Gateway nodes | Increase memory allocated by modifying
|
NHTTP and PT HTTP transports of API Gateway | Set the following in
Note that the number of threads should be equal to the number of processor cores . |
Key management nodes | Apply the following to get the maximum outcome for login requests. Set the following in <parameter name="defaultMaxConnPerHost">1000</parameter> <parameter name="maxTotalConnections">30000</parameter> Set the MySQL maximum connections: mysql> show variables like "max_connections"; max_connections was 151 set to global max_connections = 250; Set the open files limit to 200000 by editing the sudo sysctl -p Set the following in maxThreads="750" minSpareThreads="150" disableUploadTimeout="false" enableLookups="false" connectionUploadTimeout="120000" maxKeepAliveRequests="600" acceptCount="600" Set the following connection pool elements in <maxActive>50</maxActive> <maxWait>60000</maxWait> <testOnBorrow>true</testOnBorrow> <validationQuery>SELECT 1</validationQuery> <validationInterval>30000</validationInterval> Note that you set the |