Webmethods.io API Gateway When To Use Traffic Monitoring
This article explains about when to use what policy in traffic monitoring.
It is assumed that readers of this article know how to setup policies on API gateway.
- Configure the API at API gateway.
- Refer the link to create API
Why do we need Traffic Monitoring Policy?
- It provides ways to enable logging request and response payload,
- Enable monitoring run-time performance conditions for APIs and applications,
- Enforce limits for the number of service invocations during a specified time interval
- Send alerts to a specified destination when the performance conditions are violated
- Enable caching of the results of API invocations depending on the caching criteria defined
List of sub policies available in Traffic Monitoring
- This policy enables logging requests or responses to a specified destination.
- This action also logs other information about the requests or responses, such as the API name, operation name, the Integration Server user, a timestamp, and the response time.
- All these details can be viewed in Analytics tab once we enforce this policy.
Monitor Service Performance:
- This policy is used to monitor the run time performance conditions for an API and sends the alert when performance conditions are violated.
- Service Performance is calculated on different parameters like success count, fail count and total request count etc.
- We enable this policy when we want to keep track of how many requests got success or failed, requirement for high availability of API etc.
Monitor Service Level Agreement:
- This policy monitors a set of run-time performance conditions for an API.
- This policy enables you to monitor run-time performance for one or more specified applications.
- This policy is mainly configured to keep check on Service Level Agreement (SLA)
- For example, you might define an agreement with a application that sends an alert to the application if responses are not sent within a certain maximum response time. You can configure SLAs for each API or application combination.
Throttling Traffic Optimization:
- This policy limits the number of service invocations during a specified time interval
- We can use this policy to avoid overloading the back-end services and their infrastructure, to limit specific clients in terms of resource usage.
Service Result Cache:
- This policy enables caching of the results of API invocations depending on the caching criteria defined.
- We define the elements for which the API responses are to be cached based on the criteria such as HTTP Header, XPath, Query parameters etc.
- You can also limit the values to store in the cache using a whitelist.
Use Case Summary: