webMethods API Gateway Quiesce Mode

About this task

You must perform this operation in the old webMethods API Gateway instance.

Quiescing webMethods API Gateway temporarily disables access to the webMethods API Gateway server. When the webMethods API Gateway server access is disabled, you can perform the required upgrade tasks while the webMethods API Gateway server is not connected to any external resources. For more information on quiesce mode, see Quiesce Mode.

While flushing the performance, license, and quota metrics data, webMethods API Gateway performs the following operations:

  • Resets performance and license metrics intervals for all the APIs and stores the data in the Elasticsearch or API Data Store.
  • Stores the subscription quota in the Elasticsearch or API Data Store.

When all the performance metrics and other data are flushed completely, quiesce mode is enabled for all the webMethods API Gateway nodes, and a notification is sent through a webhook event.

To operate webMethods API Gateway in quiesce mode, execute the following steps:

Procedure

  1. Create a quiesce port.

    Before you invoke the quiesce mode, you must create a quiesce port, and enable it in the old webMethods API Gateway instance.

    You can use the following request to create and enable the quiesce port.

    POST /rest/apigateway/ports
    {
        "factoryKey": "webMethods/HTTP",
        "pkg": "WmRoot",
        "port": "4444",
        "portAlias": "QuiescePort"
    }

    In the example above, the 4444 port is used.

    Once you create the port, use the following request to enable the quiesce port.

    PUT rest/apigateway/ports/enable
    {
        "listenerKey": "HTTPListener@4444",
        "pkg": "WmRoot",
        "requestServiceStatus": ""
    }

    After the quiesce port is enabled, use the following request to set the quiesce port. You must use the same portAlias value that you used while creating the quiesce port. In this example, the portAlias used while creating the quiesce port is QuiescePort.

    PUT invoke/wm.API Gateway server.quiesce/setQuiescePort
    {
        "portAlias": "QuiescePort"
    }
  2. Enable or disable the quiesce mode.

    You can use the following request to enable or disable the 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 request 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, webMethods API Gateway is quiesced and is unreachable. Hence, you cannot disable the webMethods API Gateway quiesce mode by invoking this request.
    block Set the block parameter as designtime to block only design time requests and all to block all the 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, webMethods API Gateway blocks all the requests and flushes the license metrics, performance metrics, and the subscription quota data. If you do not specify any value in this parameter, all the data is flushed.
  3. Retrieving the quiesce mode status.

    Apart from the webhook notification of the quiesce mode status, you can use the following request to retrieve the quiesce mode status.

    GET /rest/apigateway/quiescemode
    

    Response

    
    {
        "enable": "true/false",
        "block": "designtime/all",
        "flush": [
            "license_metrics",
            "performance_metrics",
            "subscription_quota"
        ],
        "status": "success",
        "failureReason": null
    }
    Note: This request works only for quiesce mode for designtime. This request will not work for all, because the webMethods API Gateway package is disabled when you invoke quiesce mode for all. In such cases, you must invoke the webMethods API Gateway health check API through the quiesce port. If it returns a status code other than 200 or no response, then the quiesce mode for all is completed in that node successfully.