Using the Throughput Quota Policy

Learn how to monitor web service throughput performance by specifying a throughput limit (quota) and queue size, and by configuring fault and alert notifications.

About Policies Managing Policies QoS Policies

For information about using policies in the context of the developer portal, see Business Policies.

Table of Contents

  1. Introduction
  2. Throughput Quota Policy Options
  3. Configuration
  4. Throughput Quota Policy: use cases for Policy Manager
  5. Throughput Quota Policy: use cases for the Akana API Platform (Community Manager)

Introduction

A Throughput Quota Policy is a Quality of Service (QoS) policy that allows you to monitor web service throughput performance by specifying a throughput limit (quota) and queue size, and by configuring fault and alert notifications.

If the quota is exceeded, a Consumer Fault Message is returned to the service consumer and an alert is logged.

back to top

Throughput Quota Policy Options

The policy includes the configuration options listed below.

Concurrency Quota Policy Details
  • Name: A read-only field that displays the name of the Throughput Quota Policy.
  • Description: A read-only field that displays the description of the Throughput Quota Policy.
Throughput Quota
  • Throughput Limit: Allows you to specify the throughput limit; number, and unit of measure (secs or mins).
  • Fault Message: Allows you to enter the SOAP fault message (<faultString>).
  • Fault Element Name: Allows you to enter the SOAP fault element that holds errors and status information for a SOAP message.
  • Fault Namespace URI: Allows you to enter the URL that points to the fault code schema.
  • Fault Namespace Prefix: Allows you to enter the fault namespace prefix.
  • Time to Clear Alert(s): Allows you to enter the time that the throughput needs to be within the limit before a second alert is sent to signify that the consumer is once again within the quota.
  • Set Reminder Alert: A checkbox that enables the Reminder Alert function. This function is an alert that is sent at the specified Reminder Alert Interval until the consumer is within the quota.
  • Reminder Alert Interval(s): Allows you to enter an interval (in seconds) that Reminder Alerts will be sent until the consumer is within the quota.

Configuration

Let's take a quick walkthrough of the Throughput Quota Policy configuration process to get you started.

Step 1: Add Policy

In Policy Manager, to create a Throughput Quota Policy instance, go to Policies > QoS Policies and choose Add Policy.

Step 2: Modify Policy

When you click Modify to make changes to the Throughput Quota Policy on the Policy Details page, the initial policy looks like this:

Configure the policy options based on your requirements and click Apply.

Step 3: Attach Policy

After you've saved your policy, you can attach it to a web service, operation, or binding.

Step 4: Test Policy and View Monitoring Data

After you've attached the Throughput Quota Policy to a web service, operation, or binding, send a request to your service and go to the Services > Monitoring section to view the results for Logs, Real Time Charts, and Historical Charts. For more information on using the monitoring functions, refer to the Policy Manager Online Help, available via the Help button.

back to top

Throughput Quota Policy: use cases for Policy Manager

This section provides a list of Policy Manager-specific usage scenarios for the Throughput Quota Policy.

It includes:

  1. Generate Alert When Throughput Exceeds Limit
  2. Generate Reminder Alert When Throughput Exceeded
  3. Generate Clear Alert When Throughput Stops Crossing Limit
  4. Timeline view

Generate Alert When Throughput Exceeds Limit

Generate an alert and trigger an email to the administrator when throughput has crossed the 10 per minute limit

  1. Create a physical service in the Policy Manager Management Console using Create Physical Service.
  2. Provide service details and finish the wizard.
  3. Using Virtualize Service, virtualize and host the physical service on Network Director (ND1), and assign a name (for example, Vs1).
  4. Navigate to Organization > Policies > QOS Policies and use Add Policy to create a Throughput Quota Policy.
  5. Configure the Throughput Quota Policy as per the use case with 10 Throughput Limit per minute and a custom Fault message.

  6. Activate the policy in the Policy Workflow portlet and attach it to the Vs1 service in the Service Details > Policy Attachments > QoS section.
  7. Send 20 requests from the application/client to the Vs1 service in a minute. Results:
    1. When the Throughput limit has been exceeded, the Fault Message will be returned to the service consumer and an alert will be logged at the service level.
    2. The subsequent requests will fail after the throughput has exceeded.
    3. The details in the usage logs show the error being displayed as configured in the policy.

  8. In the alert code, an email must be configured that will be sent to the administrator, as shown below.

Generate Reminder Alert When Throughput Exceeded

Generate a reminder alert and run a management script when throughput has crossed the 5 per second limit.

  1. Create a physical service in the Policy Manager Management Console using Create Physical Service.
  2. Provide service details and finish the wizard.
  3. Using Virtualize Service, virtualize and host the physical service on Network Director (ND1), and assign a name (for example, Vs1).
  4. Navigate to Organization > Policies > QOS Policies and use Add Policy to create a Throughput Quota Policy.
  5. Configure the Throughput Quota Policy as per the use case with 5 Throughput Limit per second and a custom Fault message and reminder time interval.

  6. Activate the policy in the Policy Workflow portlet and attach it to the Vs1 service in the Service Details > Policy Attachments > QoS section.
  7. Send 10 requests from the application/client to the Vs1 service in a second.
    1. When the Throughput limit has been exceeded, the Fault Message will be returned to the service consumer and an alert will be logged at the service level.
    2. The subsequent requests will fail after the throughput has exceeded.
    3. The details in the usage logs show the error being displayed as configured in the policy.
    4. If the limit still exceeds during Reminder Alert Interval (s), a remainder alert is generated.

  8. In the reminder alert code, management script has to be configured to run (for example, to store information related to the alert as shown below).

Generate Clear Alert When Throughput Stops Crossing Limit

Generate a clear alert and trigger an email to the administrator when throughput has stopped crossing the 15 requests per second limit.

  1. Create a physical service in the Policy Manager Management Console using Create Physical Service.
  2. Provide service details and finish the wizard.
  3. Using Virtualize Service, virtualize and host the physical service on Network Director (ND1), and assign a name (for example, Vs1).
  4. Navigate to Organization > Policies > QOS Policies and use Add Policy to create a Throughput Quota Policy.
  5. Configure the Throughput Quota Policy as per the use case with 15 Throughput Limit per second and a custom Fault message.
  6. Activate the policy in the Policy Workflow portlet and attach it to the Vs1 service in the Service Details > Policy Attachments > QoS section.
  7. Send 20 requests from the application/client to the Vs1 service in a second.
    1. When the Throughput limit has been exceeded, the Fault Message will be returned to the service consumer and an alert will be logged at the service level.
    2. The subsequent requests will fail after the throughput has exceeded.
    3. The details in the usage logs show the error being displayed as configured in the policy.
    4. After the time to clear, a clear alert is generated and the subsequent requests will be successful until the Throughput quota is violated.

  8. In the clear alert code, an email must be configured that will be sent to the administrator.

Timeline view

After 60 seconds, in the new UNIX time minute, requests count from 1 (not 11).

Back to top

Throughput Quota Policy: use cases for the Akana API Platform (Community Manager)

This section provides a list of Community Manager-specific usage scenarios for the Throughput Quota Policy.

It includes:

  1. Add / Configure Throughput Quota Policy
  2. Scenario 1: How Do I Verify Throughput Quota Policy at the Service Level?
  3. Scenario 2: How Do I Verify Throughput Quota Policy at the Contract Level?
  4. Scenario 3: How Do I Verify Throughput Quota Policy at License > Term Level?

Add / Configure Throughput Quota Policy

If you are using a Throughput Quota Policy with Community Manager, you must first add the policy to the Community Manager Tenant Organization in Policy Manager. Once that's done, it will be available for selection in the developer portal.

  1. In the Policy Manager Management Console, go to the Tenant Organization, choose Policies > QoS Policies, and then click Add Policy.

  2. Specify Policy Name, Policy Type (Throughput Quota Policy), click Finish, and then click Close.

  3. On the Throughput Quota Policy Details screen, click Modify.

  4. Provide the policy details and click Finish.

  5. Activate the policy.

Scenario 1: How Do I Verify Throughput Quota Policy at the Service Level?

  1. Launch Community Manager.
  2. Attach the Throughput Quota Policy at the Service Level.

  3. Send requests from App > Test Client. If the throughput limit exceeded, a fault message will display in the response window. Alerts will display (as shown below).

  4. Go to API Monitoring > Logs and you'll see that error logs are displayed with the correct error message.

  5. In the Policy Manager Management Console, observe the following logs for the service in Monitoring > Logs.

Scenario 2: How Do I Verify Throughput Quota Policy at the Contract Level?

  1. Launch Community Manager.
  2. Attach the Throughput Quota Policy at the Contract Level and activate the contract.

  3. Send requests from App > Test Client. If the throughput limit exceeded, you will see a fault message in the response window. Alerts will be displayed as shown below.

Scenario 3: How Do I Verify Throughput Quota Policy at License > Term Level?

  1. Launch Community Manager.
  2. Attach Throughput Quota Policy at License > Term level.

  3. Test the Throughput Quota Policy at the License > Term level. This assumes that the same scope (as above) is used for Scope mapping, and the same license is selected while requesting API access.
  4. Go to Test Client and send requests. If the throughput limit exceeded, a fault message will display in the response window:

  5. Logs will display in API > Monitoring Logs:

  6. Alerts will display on the API Board:

Back to top