All API calls are directed through the cloud gateways in the traditional model of API management. This approach has inherent limitations such as the following.
- Inefficiencies arising if both the API backend and the API consumers are not in cloud
- Security concerns associated with API calls going through external gateways.
WSO2 API Cloud offers users the hybrid gateway deployment option, to deploy API Gateway(s) on-premise. This enables them to get the best of both worlds.
- Rapid deployment model and low total cost of ownership: Most of the API management infrastructure including management user interfaces, developer portal and analytics are in the cloud, so they are always accessible to you and your subscribers and do not need any maintenance effort.
- High performance, security and compliance: You can put the API gateway anywhere including your own network. This cuts down the network overhead, ensures security and compliance, and removes the need for VPN or another network connectivity solution.
Follow the steps below to configure and test an on-premise gateway.
Step 1 - Download your On-Prem Gateway
- Log in to WSO2 API Cloud (https://api.cloud.wso2.com) as an Admin User
In the API Publisher, click On-Prem Gateways.
- Click Download On-Prem Gateway to begin the download.
- You will receive a confirmation of the download as follows, after the download starts.
Step 2 - Configure your On-Prem Gateway
- Configure the Gateway by going to
<ON-PREM_GATEWAY_HOME>/binand executing configuration script:
configure-gateway.bat --runOn Linux/Mac OS:
- Provide your email address, organization key and password.
Your organization key will be displayed as shown below.
- The status of the On-Prem Gateway will be displayed after you complete the configurations.
Step 3 - Run the on-premise gateway
- Start the API Gateway by going to
<ON-PREM_GATEWAY_HOME>/binand executing startup script:
wso2server.bat --runOn Linux/Mac OS:
- The status of the On-Prem Gateway will be updated after you start the gateway
Step 4 - Test your on-premise gateway
- Log in to WSO2 API Cloud and create an API.
- Subscribe to and invoke the API.
- Invoke the API using cURL.
The cURL command to invoke the GET method of the API should be similar to the following:
Replacein the above cURL command with your on-premise gateway url as indicated below and run it. The response to this cURL should be identical to that received in the previous step.
If your request is successful, your response will be similar to the following.
- If you create/update an API and publish/re-publish it from API Cloud Publisher, it could take up to a maximum of 10 minutes before your changes become effective in the on-premise gateway.
- If you create/update a throttling tier from API Cloud, it could take up to a maximum of 15 minutes before your changes become effective in the on-premise gateway.
- Statistics of API usage in your on-premise gateway are published to API Cloud every 6 - 6.5 hours.
Overriding the default gateway configurations
Replace the default configurations in the
on-premise-gateway.propertiesfile with the required custom configurations.
To customize the synchronization time interval of the API updates:
api.update.task.cronexperssion with a custom cron expression
To customize the synchronization time interval of the Throttling tiers:
throttling.synchronization.cronexperssion with a custom cron expression
To customize the time period it takes for API statistics to get published to API cloud:
file.data.upload.task.cronexperssion with a custom cron expression