Software AG Products 10.11 | Integrate Software AG Products Using Digital Event Services | webMethods API Gateway Documentation | Upgrading API Gateway | Upgrading | Upgrading API Gateway in Zero Downtime | API Gateway Quiesce Mode
 
API Gateway Quiesce Mode
You must perform the operations in the API Gateway quiesce mode capability in the old instance of API Gateway.
When you operate API Gateway in quiesce mode, API Gateway temporarily disables access to the API Gateway server. When the API Gateway server access is disabled, you can perform the required upgrade tasks since the API Gateway server is not connected to any external resources.
API Gateway supports the following two types of quiesce mode.
*Design Time Request Block Mode
In this mode, API Gateway server blocks all design time requests such as the CRUD operations for API Gateway assets like APIs, policies, applications, and so on, and returns status code 503 to the client.
*All Request Block Mode
In this mode, API Gateway is unreachable for all the requests, that is design time and runtime requests. Any requests that are already in progress are allowed to complete. However, any new inbound requests to the API Gateway server are blocked. This mode is an extension of the Integration API Gateway server's quiesce mode, where API Gateway flushes the quota, performance, and transaction license metrics data to the API Data Store before the API Gateway package is disabled.
While flushing the performance, license, and quota metrics data, API Gateway performs the following operations:
*Resets performance and license metrics intervals for all the APIs and immediately stores the data into the API Data Store.
*Stores the Subscription quota into the API Data Store immediately.
Once all the performance metrics and other data are flushed completely, quiesce mode is enabled for all API Gateway nodes and a notification is sent through a webhook event.
To operate API Gateway in quiesce port, execute the following steps
1. Create Quiesce port
Before you invoke the quiesce mode, you must create a quiesce port as a prerequisite and enable it in the in old instance of API Gateway.
You can use the following API to create and enable the quiesce port. In this example 4444 port is used.
POST /rest/apigateway/ports
{
"factoryKey": "webMethods/HTTP",
"pkg": "WmRoot",
"port": "4444",
"portAlias": "QuiescePort"
}
Once you create the port, you must enable it by using the following API.
PUT rest/apigateway/ports/enable
{
"listenerKey": "HTTPListener@4444",
"pkg": "WmRoot",
"requestServiceStatus": ""
}
Once enabled, you must set the quiesce port by using the following API. You must use the same portAlias value that you used in the port creation API (QuiescePort).
PUT invoke/wm.API Gateway server.quiesce/setQuiescePort
{
"portAlias": "QuiescePort"
}
2. Enable or Disable Quiesce Port
You can use the following API to enable or disable quiesce mode.
PUT /rest/apigateway/quiescemode
{
"enable": "true/false",
"block": "designtime/all",
"flush": [
"license_metrics",
"performance_metrics",
"subscription_quota"
]
}
The parameters used in the above API are described in the following table:
Parameter
Description
enable
Set the enable parameter as true to enable quiesce mode and false to disable the quiesce mode. You can disable the quiesce mode only when the block parameter is set as designtime. When the block parameter is set as all, API Gateway is quiesced and is unreachable. Hence you cannot disable the API Gateway quiesce mode by invoking this API.
block
Set the block parameter as designtime to block only design time requests and all to block all requests.
flush
This parameter is not applicable when you set the block parameter as designtime. The flush parameter is applicable only when you set the block parameter as all. In the above example, when you set the block parameter as all, API Gateway blocks all the requests and flushes the license metrics, performance metrics, and subscription quota data. If you do not specify any value in this parameter, all the data is flushed.
3. Retrieving Quiesce mode status
Apart from the webhook notification of the quiesce mode status, you can use the following API to retrieve the status of the quiesce mode status.
GET /rest/apigateway/quiescemode
{
"enable": "true/false",
"block": "designtime/all",
"flush": [
"license_metrics",
"performance_metrics",
"subscription_quota"
],
"status": "success",
"failureReason": null
}
Note:
This API works only for quiesce mode for designtime. This API fails for quiesce mode for all as the API Gateway package is disabled when you invoke it in quiesce mode and set the quiesce mode to all. In such cases, you must invoke the API Gateway health check API through quiesce port. If it returns a status code other than 200 or no response, you can say that the quiesce mode for all is completed in that node successfully.