Lab 3 - Rate Limiting

In this lab, you configure and test a rate limiting policy in an application plan for the API created in the previous lab.

  • Go to https://3scale-admin.3scale.suffix_value
  • Login as admin/admin
  • Click on the APIs tab.
  • Expand the Products API.
  • Scroll down to the Published Application Plans section.
  • Click on the ProductsBasicPlan.

  • Scroll down to the Metrics, Methods & Limits section.
  • Disable both Create and Delete methods by clicking on their Enabled column.

  • Click on the Limits link for the Get Product method.
  • Click on the New usage limit link.

  • Enter the following values:
Parameter Value
Period hour
Max. Value 5
  • Click on the Create usage limit button.

  • Click on the Limits link for the Get All Products method.
  • Click on the New usage limit link.

  • Enter the following values:
Parameter Value
Period minute
Max. Value 1
  • Click on the Create usage limit button.

  • Click on the Update Application Plan button.

  • Click on the Integration tab.
  • Click on the edit APIcast configuration link.

  • Scroll down to the bottom of the page.
  • Select and copy the url next to “curl”.

  • Open a new web browser tab.
  • Paste the URL and reload it 5 times.

After 6 invokations, you should receive an "Limits exceeded" message since you exceeded the application plan limit (5 per hour), as defined in the Application Plan:

  • Go back to 3scale admin console.
  • Click on the Applications tab.
  • Click on the ProductsApp application.
  • Scroll down to the bottom of the page, to the Current Utilization section.

results matching ""

    No results matching ""