Timeout settings for an API call
The following diagram shows the communication/network paths that occur when an API is called. Timeout settings for each network call are explained below.
key validation
Key validation takes place via a Servlet HTTP call and the connection timeout can be configured by changing the following configuration details in
file. All timeout values are in milliseconds./repository/conf/axis2/axis2_client.xml 60000 60000 < /transporteRemetente>If Key Manager caching is enabled, calls between API Gateway and Key Manager are cached. As a result, the Key Manager is not called for every API call.
API Gateway Client Call + API Gateway Call Backend
For backend communication, API Manager uses the PassThrough transport. This is configured in
file. For more information, seeConfiguring passthru-http.propertiesin the EI documentation./repository/conf/passthru-http.properties Note that the default value for
http.socket.timeout
differs between WSO2 products. In WSO2 API-M, the default value forhttp.socket.timeout
it is 180000ms.
General APIM level recommendations
Some general APIM level recommendations are listed below:
Improvement Area | performance recommendations | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
API Gateway Nodes | Increase the allocated memory by modifying the
Set the following in
The above settings are only applicable when WS key validation is enabled. | ||||||||||||||
Transporte NHTTP do API Gateway | Recommended values for the Property Descriptions:
Recommended values:
| ||||||||||||||
PassThrough transportof API Gateway | Recommended values for the Property Descriptions
recommended values
| ||||||||||||||
timeout settings | API Gateway routes your client's requests to an appropriate endpoint. The most common reason for your client to get a timeout is when the Gateway's timeout is greater than the client's timeout values. You can resolve this by increasing the timeout on the client side or decreasing it on the API Gateway side. Here are some parameters, inin addition to the timeout parameters discussed in previous sections.
| ||||||||||||||
key manager nodes | Set the maximum MySQL connections: mysql> shows variables like "max_connections"; max_connections was 151 set to global max_connections = 250; Set the open file limit to 200,000 by editing the sudo sysctl -p Set the following in If you use WSO2 Identity Server (WSO2 IS) as the Key Manager, the root location of the above path and the subsequent path need to change from maxThreads="750" minSpareThreads="150" disableUploadTimeout="false" enableLookups="false" connectionUploadTimeout="120000" maxKeepAliveRequests="600" acceptCount="600" Define the following connection pool elements in
Note that you set the |
Registry indexing settings
The record indexing process only needs to be performed on the API Publisher and API Store nodes. To disable the execution of the indexing process on the other nodes (Gateways and Key Managers), you need to set the
element for false no_HOME>/repository/conf/registry.xml
file of the relevant nodes.
Registry cache based settings
When registry caching is enabled, it requires a unique ID to cache resources. The getConnectionId method is called in the last mentioned order of situation to retrieve the username of the connection. For some database vendors, thegetConnectionIdThe method makes a database call to fetch the last mentioned information. This database call is a huge overhead because thegetConnectionIdis often called. Therefore, it is recommended to avoid these database calls to improve performance.
You needget the latest product updatesfor your product, use the following instructions in the current version of WSO2 API-M. This feature is available as a product update onFebruary 20, 2020on.
Note that you can only deploy updates to a production environment if you have a valid subscription with WSO2.Read more aboutWSO2 Updates.
Follow the instructions below to avoid these database calls and improve performance when caching the record.
Add the following JVM parameter in
_HOME>/bin/wso2server.sh
(for Linux/Mac OS) or_HOME>/bin/wso2server.bat
(for Windows OS) based on your OS and save the file.-Dcarbon.registry.database.connectionid.avoiddbcalls=true
- Restart the WSO2 API Manager server.
Accelerate data and settings related to Analytics
This section describes the parameters you need to configure to tune the performance of API-M Analytics and Throttling when it is affected by high load, network traffic, etc. You need to adjust these parameters based on your deployment environment.
Tuning the data broker parameters
The following parameters must be configured in theANALYTICS_HOME>/repository/conf/data-bridge/data-agent-config.xml
file. Note that there are two subsections in this file, namedEconomyeBinary.
Thrift ...Binary ...
The Thrift section is related to Analytics and the Binary section is related to Throttling. The same set of parameters mentioned below can be found in both sections. Parameter descriptions and recommendations are for Analytics performance tuning, but the same recommendations are relevant for tuning related to throttling data in the Binary section. Note that the section for Thrift is only relevant if Analytics is enabled.
Parameter | Description | Standard value | Fit recommendation |
---|---|---|---|
QueueSize | The number of messages that can be stored in WSO2 API-M at a given time before being published to Analytics Server. | 32768 | This value should be increased when Analytics Server is busy due to request overload or if there is high network traffic. This avoids the generation of the queue When the Analytics server is not very busy and when network traffic is relatively low, the queue size can be reduced to avoid excessive memory consumption. The number specified for this parameter must be a power of 2. |
batch size | WSO2 API-M statistical data sent to Analytics Server to be published to Analytics Dashboard is batched. This parameter specifies the number of requests to include in a batch. | 200 | This value must be proportionally adjusted to the volume of requests sent from WSO2 API-M to Analytics Server. This value should be reduced if you want to reduce the Analytics Server system overhead. This value should be increased if the WSO2 API-M is generating a lot of statistics and if theQueueSize cannot be increased without causing excessive memory consumption. |
CorePoolSize | The number of threads allocated to publish WSO2 API-M statistical data to Analytics Server via Thrift at the time WSO2 API-M starts. This value increases when the yield of generated statistics increases. However, the number of threads will not exceed the number specified for theMaxPoolSize parameter. | 1 | The number of available CPU cores must be taken into account when specifying this value. Increasing the core pool size can improve the throughput of statistical data published to the Analytics Dashboard, but latency will also increase due to context switching. |
MaxPoolSize | The maximum number of threads that should be allocated at any one time to publish WSO2 API-M statistical data to Analytics Server. | 1 | The number of available CPU cores must be taken into account when specifying this value. Increasing the maximum core pool size can improve the throughput of statistical data published in the Analytics dashboard as more threads can be spawned to handle a larger number of events. However, latency will also increase as a larger number of threads would cause context switching more frequently. |
MaxTransportPoolSize | The maximum number of transport threads that must be allocated at any one time to publish WSO2 API-M statistical data to Analytics Server. | 250 | This value should be increased when there is an increase in throughput of events handled by WSO2 API-M Analytics. the value of Example dataReceivers: - # Data receiver configuration dataReceiver: # Data receiver type # THIS IS A REQUIRED FIELD TYPE: Thrift # Data receiver properties: tcpPort: '7611' sslPort: '7711' tcpMaxWorkerThreads: '1750' sslMaxWorkerThreads : '1750' |
SecureMaxTransportPoolSize | The maximum number of secure transport threads that must be allocated at any one time to publish WSO2 API-M statistical data to Analytics Server. | 250 | This value should be increased when there is an increase in throughput of events handled by WSO2 API-M Analytics. the value of Example dataReceivers: - # Data receiver configuration dataReceiver: # Data receiver type # THIS IS A REQUIRED FIELD TYPE: Thrift # Data receiver properties: tcpPort: '7611' sslPort: '7711' tcpMaxWorkerThreads: '1750' sslMaxWorkerThreads : '1750' |
FAQs
How to use WSO2 API Manager? ›
- Click Create New API and then click Design a new REST API.
- Click Create & Publish. This will publish your first API on the Developer Portal as well as deploy it on the API Gateway. You now have an OAuth2. 0 secured REST API that is ready to be consumed.
- Go to CREATE API and Click Design a New REST API.
- Click CREATE or CREATE & PUBLISH to create the API. The overview page of the newly created API appears.
- Configure the API design configurations. ...
- Configure the runtime configurations. ...
- Configure the resources. ...
- Optionally, view the API definition.
Enter the http://localhost:9443/dashboard URL on a web browser to access WSO2 Dashboard.
How do I make an application active in API manager? ›Configuring API Manager
You can login to AnyPoint Platform and navigate to API Manager => Manage API from Exchange and select your RAML. Select Managing type as Basic Endpoint ad check on “Check this box if you are managing this API in Mule 4 or above“. Click Save.
Click Deploy Application and click Open in Browser to grab the URL of your published API and integration from Runtime Manager. This will open the application deployment window where you can select the environment you'll be publishing to (same as prior steps), set the runtime version, resource allocation, etc.
What is the default URL for WSO2 API manager? ›The default URL of WSO2 API Manager Developer Portal is https://<HostName>:9443/devportal .
How do I check my WSO2 status? ›Status Check via SOAP API
WSO2 includes a considerable list of admin services. The list is viewable when starting the server with the OSGI console enabled using ./wso2server.sh –DosgiConsole , and issuing the command osgi> listAdminServices in the console.
WSO2 was started during the web services era a little more than 8 years ago and the name refers to Web Services oxygenated.
What is the default login for WSO2? ›WSO2 IoT Server has the admin user created by default. This user is also known as the super administrator as it has all the permissions assigned to it. The default username and password of this user is admin .
What is API configuration setting? ›The configuration API provides a central place for modules to store configuration data. This data can be simple configuration like your site name, or more complex information managed with configuration entities, such as views and content types.
Where is API settings? ›
Use the Settings tab in the Auth0 Dashboard at Dashboard > Applications > APIs to configure registered APIs that you can consume from your authorized applications. To configure an API's settings, click ... next to an API in the list and select Settings or click the API name.
What are API settings? ›The Application Programming Interface (API) settings allow the System Administrator to monitor the new companies, contracts, and projects that users enter in the Contracts system, as well as any updates they make to the Company, Contract, and Project Profiles.
What is the difference between API Manager and Runtime manager? ›API manager will be used to govern or manage the API lifecycle and it will enable API authentication or authorization for client to connect APIs securely. Runtime Manager will peer the API Manager via API Proxy or API Auto Discovery.
What types of alerts can be configured from the API Manager *? ›The platform supports three types of alerts: API alerts, contracts alerts, and runtime alerts.
What types of alerts can be configured from the API Manager? ›Alert Name | Alert Type |
---|---|
Approve Application API Access Request | Governance |
Application API Access Approved | Governance |
Remove Application API Access | Governance |
Enable Application API Access | Governance |
- Sign in to WSO2 API Cloud and the API Publisher web application will open automatically.
- Close the interactive tutorial that starts automatically if you are a first-time user, and then click ADD NEW API.
- Select Design a New REST API and click Start Creating.
- Grant permission to enable the API.
- Create a separate Google Cloud project for each caller.
- Create an API key for each caller.
- Create one API key for all callers.
An API management platform is a tool used to access, distribute, control, and analyze APIs used by developers in an enterprise setting. API management platforms benefit organizations by centralizing control over their API integrations while ensuring they continuously meet high performance and security standards.
How do I enable permissions in API? ›Create a name for the permission set, and select your org's user license then click Save. Go to the System section and select System Permissions, then click Edit. Select API Enabled and click Save.
How do I enable API and services? ›- In the Google Cloud Console, go to the Projects page. ...
- Enable the Android Performance Parameters API on the project you selected. ...
- Select the Credentials tab on the left.
- If the project does not have an existing API key, click CREATE CREDENTIALS and select API Key. ...
- Copy the API key.
How do I deploy my API? ›
- In the APIs navigation pane, choose the API you want to deploy.
- In the Resources navigation pane, choose Actions.
- From the Actions drop-down menu, choose Deploy API.
- In the Deploy API dialog, choose an entry from the Deployment stage dropdown list.
WSO2 API Gateway is the. WSO2 API Gateway which is powered by WSO2 EI provides a runtime, backend component (an API proxy) for API calls. It secures, protects, manages, and scales API calls by intercepting API requests and applying policies such as throttling and security using handlers and managing API statistics.
What is the default URL for REST API? ›The default URL to access the messaging REST API is: https://localhost:9443/ibmmq/rest/v1/messaging . If the host or port is changed from the default, or if HTTP is enabled, you can determine the URL by using the dspmqweb command.
How do I change my default port in WSO2? ›- Pass the port offset to the server during startup. The following command starts the server with the default port incremented by 3 :./wso2server.sh -DportOffset=3.
- Set the Ports section of <PRODUCT_HOME>/repository/conf/carbon. xml as follows: <Offset>3</Offset>
( default path is https://localhost:9943/carbon). Login with the admin credentials (default is admin/admin).
What is WSO2 API manager? ›WSO2 API Manager is a complete solution for designing and publishing APIs, creating and managing a developer community, and for scalably routing API traffic.
Where is WSO2 installed? ›OS | Home Directory |
---|---|
Mac OS | /Library/WSO2/APIManager/3.2.0 |
Windows | C:\Program Files\WSO2\APIManager\3.2.0 |
Ubuntu | /usr/lib/wso2/APIManager/3.2.0 |
CentOS | /usr/lib64/APIManager/3.2.0 |
At WSO2, we provide free open source software – which can be used and improved by anyone – together with valuable business services that help customers save time at a reasonable cost.
Which database support WSO2? ›WSO2 supports the most common DBMS such as MySQL, MS SQL Server, Oracle, H2, DB2, Derby. Go to WSO2 API Manager 3.0. 0 - Product Compatibility. If you use any of the following WSO2 Identity Server versions with MySQL version 5.7.
How do I get my WSO2 user token? ›
Sign in to WSO2 API Store. Click the Applications menu and open the application for which you want to generate an access token. Click the Production Keys tab and click Generate Keys to create an application access token. You can use this token to invoke all APIs that you subscribe to using the same application.
How do I change my WSO2 admin password? ›Login with the admin credentials (default is admin / admin), Go to the Configure Tab and select Users and Roles. After that, select Change My password. You enter the current password and the new password to change it.
How do I reset my WSO2 admin password? ›Access the WSO2 Identity Server dashboard using the following link: https://localhost:<port_number>/dashboard . Click Forgot Password. Enter the user's username, select Recover with Email, and then click Submit.
How to use APIs to pull data? ›- Configure the API endpoint. An API endpoint can be complex. ...
- Create an API resource. ...
- Store data into a database. ...
- Transform the API data. ...
- Export the data to an application. ...
- Check and maintain the pipeline.
- Determine Your Requirements. First, you'll need to determine your API requirements. ...
- Design Your API. Next, you'll need to consider API design. ...
- Develop Your API. Now, it's time to start developing your API product. ...
- Test Your API. ...
- Publish/Deploy Your API. ...
- Monitor Your API.
- IBM API Connect.
- Postman.
- IBM Cloud Pak for Integration.
- Workato.
- Stoplight.
- WSO2 API Manager.
- SwaggerHub.
- Kong API Gateway.
While API Gateways and API management can be used interchangeably, strictly speaking an API gateway refers to the individual proxy server, while API management refers to the overall solution of managing APIs in production which includes a set of API gateways acting in a cluster, an administrative UI, and may even ...
Why do I need an API manager? ›An API management system allows developers to store documentation in a portal where developers inside and outside the organization can access it. This centralized repository allows engineers to quickly implement the proper methods to call the API and know what response to expect, smoothing the onboarding process.
Do APIs push or pull data? ›Learn more about APIs. An API is useful for pulling specific information from another program. If you know how to read the documentation and write the requests, you can get lots of great data back.
Can APIs push and pull data? ›Many companies use both pull and push approaches in their APIs and have endpoints to receive full lists of user's tasks, items, etc; as well as offering push services to notify other applications of updates.
Can you push data through an API? ›
Abstract. The Push API enables sending of a push message to a web application via a push service. An application server can send a push message at any time, even when a web application or user agent is inactive. The push service ensures reliable and efficient delivery to the user agent.
Is APIM an API gateway? ›API Management (APIM) is a way to create consistent and modern API gateways for existing back-end services. APIM system consists of following components, The API gateway is the endpoint that: Accepts API calls and routes them to your backends.
How do I access API endpoint? ›- Go to View -> Developer -> Developer Tools to open Chrome's Developer Tools. ...
- After that, select the XHR filter. ...
- After that, you'll need to devote some time to researching the specific request.
- Then, to view the data, go to the preview tab.
What is an API for a beginner? An API key for beginners is a set of methods and functions that an app or program uses to communicate with another app or program. They are also known as "methods" in computer science. Users can use an API to obtain information from other programs, get data, and more.