Control traffic
How much each client may send, where a share of the traffic goes, what the gateway does when a backend fails, and when it answers from a cache. Each guide does one job, in the order the console does it, and ends with a request you send and the answer to expect.
Before the guides, read Where a plugin runs. It says which copy of a plugin wins when a route, a service, a consumer and a global rule all carry one.
Read in this order
- Limit requests on a route. Allow each client address a number of requests a minute.
- Limit one client wherever it calls. Give one consumer its own limit, counted over every route that asks for its key.
- Give a group of clients one limit. Put consumers in a group and set the limit once on the group.
- Apply a plugin to every request. Put a plugin on a global rule so it runs on every request of the environment.
- Send a share of requests to a new version. Send a tenth of a route's requests to a new version of its backend, and raise the share as the new version proves itself.
- Stop calling a failing backend. Answer clients from the gateway for a while once a route's backend keeps failing, and give the backend time to recover.
- Serve answers from a cache. Keep a route's answers in the gateway's memory for a minute and serve repeated requests without asking the backend.
G8 dev