API Gateway: Database tuning
search cancel

API Gateway: Database tuning

book

Article ID: 199456

calendar_today

Updated On: 02-11-2025

Products

CA API Gateway

Issue/Introduction

What settings are available to tune the database performance for API Gateway?

Environment

API GATEWAY

Resolution

Below are some settings that we have found to be beneficial (Note: You will need to restart the Gateway once the .properties and .cnf file changes have been made). Depending on the version you are running some may already be in place in the default code. Lastly, ensure that you have at the very least 4 GB of RAM assigned to each of the nodes but for higher performance 16 GB is recommended.

 

  1. node.properties
    /opt/SecureSpan/Gateway/node/default/etc/conf/node.properties
    • c3p0DataSource.maxPoolSize=1150
  2. system.properties
    /opt/SecureSpan/Gateway/node/default/etc/conf/system.properties
    • com.l7tech.message.httpParamsMaxFormPost=5242880
    • com.l7tech.http.maxParameterLength=1000000
    • org.apache.tomcat.util.http.ServerCookie.ALLOW_EQUALS_IN_VALUE=true
    • com.l7tech.common.http.prov.apache.CommonsHttpClient.maxConnectionsPerHost=1500
    • com.l7tech.common.http.prov.apache.CommonsHttpClient.maxTotalConnections=3000
    • com.l7tech.server.policy.assertion.ServerHttpRoutingAssertion.statePool.enable=true
  3. my.cnf
    /etc/my.cnf
    • by changing this line:
    • max_connections=2625
    • to this:
    • max_connections=10000
  4. ClusterWide Properties
    • io.httpConnectionIdleTimeout = 5s
    • io.httpCoreConcurrency = 1800
    • io.httpMaxConcurrency = 2000
  5. JDBC connection settings (if used)
    • Set the min and max pool size both to be a value of 150 on the jdbc connection settings.

We added the following properties to the jdbc connection
maxIdleTime 0 //c3p0 setting
maxConnectionAge 0 //c3p0 setting
idleConnectionTestPeriod 600 //c3p0 setting
EnableCancelTimeout true

If you disable timeouts and connection max ages, ensure you have 8MB of memory per pooled connection to account for cached query data on top of the amount required for "normal" traffic processing.