Friday, August 31, 2012

How to fine tune WSO2 API Manager gateway

WSO2 API Manager is a complete solution for publishing APIs, creating and managing a developer community and for scalably routing API traffic. It leverages proven, production-ready, integration, security and governance components from the WSO2 Enterprise Service Bus, WSO2 Identity Server, and WSO2 Governance Registry. In addition, as it is also powered by the WSO2 Business Activity Monitor, the WSO2 API Manager is ready for massively scalable deployment immediately. 

Here in this article i will briefly  describe how we can tune up gateway to get response with minimum time. Fine tuning is depend on the load on you system.
following configurations for get minimum response time when you have 350 to 30000 gateway calls per second(in a cluster with maximum 10 nodes).

Memory allocated for the server increase by modifying /bin/ with the following setting.

Default setting : -Xms256m -Xmx512m -XX:MaxPermSize=256m. 
New setting     : -Xms2048m -Xmx2048m -XX:MaxPermSize=1024m
NHTTP and PT HTTP transports
In /repository/conf/ set the following
Please note that number of threads above should equal to number of processor cores in your system.These parameters vary on the load on machine processing time and etc. So you can change them and observe how results behave. Based on observations you can decide optimum parameters. Also apply followings to keymgt node to get maximum out come for login requests.

<parameter name="defaultMaxConnPerHost">1000</parameter> 
<parameter name="maxTotalConnections">30000</parameter> 

Mysql maximum connections 
mysql> show variables like "max_connections"; 
 max_connections was 151 
 set to global max_connections = 250; 

Open Files Limit 
Set open files limit to 200000 by editing 
sudo sysctl -p

No comments:

Post a Comment