Using the Service Level Enforcement Policy

Learn how to enable and configure the error message returned to the consumer when an SLA (service level agreement) is violated.

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. Service Level Enforcement Policy Options
  3. Configuration
  4. Service Level Enforcement Policy: use cases for Policy Manager
  5. Service Level Enforcement Policy: use cases for the Akana API Platform (Community Manager)

Introduction

The Service Level Enforcement Policy is a Quality of Service (QoS) policy that allows you to enable and configure the error message returned to the consumer when an SLA is violated.

This policy only applies to the following Service Level rules:

  • Usage Count
  • Total Request Message Size
  • Total Response Message Size

The Service Level Enforcement Policy works in conjunction with a Service Level Policy. You define a Service Level Policy and specify each service level condition and alert code; then, you define a Service Level Enforcement Policy and specify the error message you would like displayed when the specified service level condition is violated.

When the Service Level Policy and Service Level Enforcement Policy are attached to the same Organization/Service/Contract, and the Service Level Policy is violated, the messages are rejected and the error message that you configured is returned.

Service Level Enforcement Policy Options

The policy includes the configuration options listed below.

Service Level Enforcement Policy Details
  • Name: A read-only field that displays the name of the Service Level Enforcement Policy.
  • Description: A read-only field that displays the description of the Service Level Enforcement Policy.
Service Level Enforcement
  • Consumer Fault Message: A field display that allows you to specify the error message returned to the consumer when an SLA is violated.

back to top

Configuration

Let's take a quick walkthrough of the Service Level Enforcement Policy configuration process to get you started.

Step 1: Add Policy

In Policy Manager, to create a Service Level Enforcement Policy instance, go to Policies > QoS Policies and choose Add Policy.

Step 2: Modify Policy

When you click Modify to make changes to the Service Level Enforcement 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 Service Level Enforcement 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

Service Level Enforcement Policy: use cases for Policy Manager

This section provides a list of Policy Manager-specific usage scenarios for the Service Level Enforcement Policy.

It includes:

  1. Scenario 1: Block Request to Service
  2. Scenario 2: SLA Clear Alert
  3. Scenario 3: SLA Reset
  4. Timeline

Scenario 1: Block Request to Service

Block request to service for 15 minutes after 300 requests SLA has been violated. In this scenario, a fault message is returned to the app. The message that's returned is the one defined in the Service Level Enforcement Policy.

  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 Service Level Enforcement Policy.
  5. Configure the Service Level Enforcement Policy and define a custom Fault message that reflects the use case scenario purpose.
  6. Next, use Add Policy and create a Service Level Policy.
  7. Configure this policy as per the use case with a Custom alert for Usage Count > 300 in a 15-minute interval.
  8. Attach the Service Level Enforcement policy and Service Level policy to the Vs1 service in the Service Details > Policy Attachments > QoS section.

  9. Send more than 300 requests to Vs1 from the application/client.
  10. The first 300 requests will be successful, and subsequent requests will fail and generate the custom Fault message defined in the Service Level Enforcement Policy.

Scenario 2: SLA Clear Alert

SLA generates a clear alert and sends an email to alert the administrator(s) after the App has been denied access for 15 minutes.

  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 Directory (ND1), and assign a name (for example, Vs1).
  4. Navigate to Organization > Policies > QOS Policies and use Add Policy to create a Service Level Enforcement Policy.
  5. Configure the Service Level Enforcement Policy as per the use case a with a custom Fault message.
  6. Navigate to Organization > Policies > QOS Policies and use Add Policy to create a Service Level Policy.
  7. Configure the Service Level Policy as per the use case with a custom alert for Usage Count > 300 in a 15-minute interval.
  8. Activate the policies in the Service Level Enforcement Policy and Service Level Policy in the Policy Workflow portlet and attach them to the Vs1 service in the Service Details > Policy Attachments > QoS section.
  9. Send more than 300 requests to Vs1 from the application/client.
  10. The first 300 requests will be successful and subsequent requests will fail and generate the custom Fault message defined in the Service Level Enforcement Policy.
  11. After the alert is generated, if the SLA is not violated again, a clear alert will be generated.
  12. If the alert is configured with an email, it will be sent to the assigned users when triggered.

Scenario 3: SLA Reset

SLA has been reset and the App can send to the API.

  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 Service Level Enforcement Policy.
  5. Configure the Service Level Enforcement Policy as per the use case a custom Fault message
  6. Navigate to Organization > Policies > QOS Policies and use Add Policy to create a Service Level Policy.
  7. Configure the Service Level Policy as per the use case with custom alert for Usage Count > 300 in 15-minute intervals.
  8. Activate the policies in the Service Level Enforcement Policy and Service Level Policy in the Policy Workflow portlet and attach them to the Vs1 service in the Service Details > Policy Attachments > QoS section.
  9. Send more than 300 requests to Vs1 from the application/client.
  10. The first 300 requests will be successful and subsequent requests will fail and generate the custom Fault message in Service Level Enforcement Policy.
  11. After the alert is generated, if the SLA is not violated again, a clear alert will be generated.
  12. After clear alert is generated the requests should be successful until it violates the SLA again.

Timeline

Back to top

Service Level Enforcement Policy: use cases for the Akana API Platform (Community Manager)

This section provides a list of Community Manager-specific usage scenarios for the Service Level Enforcement Policy.

It includes:

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

Overview

The Service Level Enforcement Policy allows you to enable and configure the error message returned to the consumer when their SLA is violated. It works in conjunction with the Service Level Policy.

If you are using a Service Level Enforcement 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.

The policy only applies to the following Service Level Policy rules:

  • Usage Count
  • Total Request Message Size
  • Total Response Message Size

Add / Configure Service Level Enforcement Policy

  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 (Service Level Enforcement Policy), click Finish, and then click Close.

  3. On the Service Level Enforcement Policy Details screen, click Modify.

  4. Configure error message as shown below, then Finish.

  5. Activate the policy.

Scenario 1: How Do I Verify Service Level Enforcement Policy Alerts at the Service Level?

  1. Launch Community Manager.
  2. Go to API Details > Edit API > Proxy Section > Advanced Options and attach the following policies:
  3. In Quality of Service Policies section, attach Service Level Enforcement Policy.
  4. In Operational Policies section, attach Atmosphere Application Security Policy (No Signature) and Detailed Auditing.

  5. Go to the app that's connected with the above API. Go to Test client and send more than 5 requests (as Service Level Policy rule is configured with Usage Count > 5).
  6. When the SLA is violated, the error message configured in the Service Level Enforcement Policy will display.

Scenario 2: How Do I Verify Service Level Enforcement Policy Alerts at the Contract Level?

  1. Launch Community Manager.
  2. While requesting API Access, select the Service Level Enforcement Policy and Service Level Policy checkbox and finish the process. Make sure the contract is activated.

  3. Go to App > Test Client and send more than 5 requests.
  4. You will see an error message after there are more than 5 successful requests.

  5. You will see a Service Level Policy alert also in the Community Manager Dashboard. Once it is cleared, then requests will be successful.

Scenario 3: How Do I Verify Service Level Enforcement Policy Alerts at the License > Term Level?

  1. To verify this policy, you'll need to set up scope mapping for an API. Assuming that a license is already added as part of the Service Level Policy Configuration, complete the following steps:
  2. Go to Edit License and attach the Service Level Enforcement Policy and Service Level Policy.

  3. Use this License >Scope for scope mapping of an API.

  4. Now go to the app that's connected to the API. go to Test Client and send more than 5 requests. Once the SLA is violated, you will see an error message. The specific message is configured in the Service Level Enforcement Policy.

  5. Go to App > Monitoring > Logs. You will see an error record along the lines of the below.

  6. Once SLA is cleared, requests will be successful.

Back to top