Instructor: The last technique we will discuss is quota.
With quota, you can limit the number
of requests a specific client can make.
So in contrast to the rate limit
which deals with the request coming to the API,
with quota we deal with the request coming
from a specific client.
Now, by limiting the number
of requests a specific client can make,
we actually minimizing the risk of heavy load.
Now, many API providers define quotas
and you can see in this example
from the Google Analytics page
how a quota usually looks like.
So take a look at these numbers.
So we see here that there are two quotas.
The first one is that 50,000 request per project per day
is one limit and another limit, another quota
is of 10 queries per second per IP address.
So as you can see, the quota can be quite flexible
and you can define your own quotas.
But in any case, if you predict that your API
will be subject of a heavy load and a lot of request,
then it's always a good idea to define a quota.