Protecting with Apigee Spike Arrest

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

Sudden surges in network traffic—regardless of the reason—can severely impact the performance of an API, even to the point of overwhelming it. Apigee has a built-in policy capable of handling such surges: the Spike Arrest policy. In this hands-on lab, we’ll implement the Spike Arrest policy and configure it so that traffic is throttled on a per-developer basis.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Add the Spike Arrest Policy
  1. On the Apigee dashboard page, click API Proxies.
  2. Choose LA-Weather from the list of proxies.
  3. Switch to the DEVELOP tab.
  4. In the Proxy Endpoints section of the Navigator, select PreFlow.
  5. In the Request area, click + Step.
  6. Under Traffic Management, select Spike Arrest.
  7. Leave the default names and click Add.
  8. If necessary, drag the Spike Arrest policy so that it is among the first executed.
Set the Desired Parameters
  1. Select the Spike Arrest policy.
  2. Modify the code to the following:
    <Identifier ref="request.queryparam.dev"/>
    <MessageWeight ref="request.header.weight"/>
    <Rate>2pm</Rate>
  3. Click Save.
Test for Spiking Traffic
  1. Select the TRACE tab.
  2. In the URL field, add the following query parameters to the API proxy URI:
    ?appid=[YOUR_OPENWEATHERMAP_API_KEY]&q=phoenix&dev=1
    If you do not have a OpenWeatherMap API key, use fd4698c940c6d1da602a70ac34f0b147.
  3. Click Start Trace Session.
  4. Click Send 3-4 times within a minute.
  5. Review the results.
  6. Change the dev parameter value to 2.
  7. Click Send again.

Additional Resources

Your team has noticed that recent sudden surges in traffic are having an adverse effect on their API's performance. You've been asked to integrate measures to handle these surges and have decided to apply Appigee's Spike Arrest policy.

You’ll need to complete the following steps to accomplish your task:

  1. Open an existing API proxy.
  2. Add the Spike Arrest policy.
  3. Set the desired parameters.
  4. Test.

Please note: There are several prerequisites for this hands-on lab:

  1. You must have an Apigee account.
  2. You must have completed the following hands-on labs: Creating an Apigee API Proxy and Testing an API Proxy.
  3. Optionally, you should have registered for an API key with OpenWeathermap.org.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!