This document discusses how to apply a rate limiting policy based on service level agreements (SLAs) to an API using MuleSoft API Gateway. It involves first creating SLAs with different rate limits. Then applications are associated with an SLA and requests are approved or require approval based on the SLA. The rate limiting policy is applied and uses the application client ID and secret to enforce the rate limits defined in the SLA. Tests are run to validate that requests for each application adhere to the limits of its assigned SLA tier.
2. Pre-requisites
• API in Mulesoft API Gateway
– e.g. http://www.slideshare.net/VinceSoliza/proxy-existing-soap-web-service
3. Apply Rate Limiting – SLA Based Policy
in API Manager
This presentation will show how to apply Rate
Limiting – SLA Based Policy in API Gateway
using Anypoint Platform for APIs
4. Run in Anypoint Studio
• Run the api application in anypoint studio
5. Apply Rate Limiting – SLA Based Policy
• Login to anypoint platform and open the API Manager where we want to
apply the policy
• Click the Policies tab in the bottom part of the API Manager
6. Apply Rate Limiting – SLA Based Policy
• We can view the list of applied and currently available policies within the
API. Currently we have no applied policies.
• Look for the Rate Limiting – SLA Based policy then click Apply
7. Create SLA
• If there’s no SLA tiers defined in the API, a prompt occur with a message
saying SLA has to be created first before applying the policy. It contains
the link where to create SLA in the API Manager. Alternately there’s a tab
where SLAs can be defined.
• Click add SLA tier. The SLA example in the
right has a limit of 10 requests/second.
The API access requests for this SLA will be
granted without the need of approval.
8. Create SLA
• We have created 3 SLA tiers, each has different rate limits. Request for
access in Silver and Gold SLAs requires approval.
• Now we have SLAs, let’s proceed in
creating applications. On the API Manager
main page. Click Create Portal, We doesn’t
need to edit the portal contents at the
moment.
• Click live portal in the upper right corner.
In the live portal, click request API access
also in the upper right.
• Add new application.
9. Create Application
• Now let’s match application with
SLA and click Request for API access.
• The request will be automatically
approved as configured in the SLA.
• Applications are assigned with
cliend_id & client_secret this is used to
identify the application doing the certain
Request.
• Proceed to applying the
Rate Limiting – SLA Based Policy.
• Click apply, the form in the right
will be shown.
• Extracting client_id &
client_secret from the request is
configured with MEL
expression in this form .
10. Grant API access requests
• Silver and Gold applications are still pending for approval, the API owner
can approve the request.
11. Test the Policy
• Open the application details listed in Developer
Portal. Get the client_id & client_secret.
• Open SOAPUI and make request for each applications having their unique
client_id and client_secret.
• See the rate limit response properties, it coincides with the specified limit
of the application’s SLA tier.
12. Summary
• This is how to define SLA tiers for your API
version in the Anypoint Platform for APIs.
• To enforce SLA tiers, you need to apply a rate-
limiting or throttling policy that is SLA-based.
• SLA based policies require all applications to
register for access to a specific tier, passing client
credentials is required to identify the application
doing the requests.
• The additional response headers are used to
inform users about the SLA restrictions and the
remaining spare capacity that the SLA allows.
This template can be used as a starter file for presenting training materials in a group setting.
Sections
Sections can help to organize your slides or facilitate collaboration between multiple authors. On the Home tab under Slides, click Section, and then click Add Section.
Notes
Use the Notes pane for delivery notes or to provide additional details for the audience. You can see these notes in Presenter View during your presentation.
Keep in mind the font size (important for accessibility, visibility, videotaping, and online production)
Coordinated colors
Pay particular attention to the graphs, charts, and text boxes.
Consider that attendees will print in black and white or grayscale. Run a test print to make sure your colors work when printed in pure black and white and grayscale.
Graphics, tables, and graphs
Keep it simple: If possible, use consistent, non-distracting styles and colors.
Label all graphs and tables.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Give a brief overview of the presentation. Describe the major focus of the presentation and why it is important.
Introduce each of the major topics.
To provide a road map for the audience, you can repeat this Overview slide throughout the presentation, highlighting the particular topic you will discuss next.
Summarize presentation content by restating the important points from the lessons.
What do you want the audience to remember when they leave your presentation?