1
00:00:01,230 --> 00:00:04,920
Instructor: The last technique we will discuss is quota.

2
00:00:04,920 --> 00:00:07,530
With quota, you can limit the number

3
00:00:07,530 --> 00:00:10,560
of requests a specific client can make.

4
00:00:10,560 --> 00:00:12,840
So in contrast to the rate limit

5
00:00:12,840 --> 00:00:16,260
which deals with the request coming to the API,

6
00:00:16,260 --> 00:00:19,110
with quota we deal with the request coming

7
00:00:19,110 --> 00:00:21,630
from a specific client.

8
00:00:21,630 --> 00:00:23,340
Now, by limiting the number

9
00:00:23,340 --> 00:00:25,410
of requests a specific client can make,

10
00:00:25,410 --> 00:00:28,650
we actually minimizing the risk of heavy load.

11
00:00:28,650 --> 00:00:31,650
Now, many API providers define quotas

12
00:00:31,650 --> 00:00:33,570
and you can see in this example

13
00:00:33,570 --> 00:00:35,130
from the Google Analytics page

14
00:00:35,130 --> 00:00:37,140
how a quota usually looks like.

15
00:00:37,140 --> 00:00:39,510
So take a look at these numbers.

16
00:00:39,510 --> 00:00:42,420
So we see here that there are two quotas.

17
00:00:42,420 --> 00:00:46,800
The first one is that 50,000 request per project per day

18
00:00:46,800 --> 00:00:50,250
is one limit and another limit, another quota

19
00:00:50,250 --> 00:00:54,930
is of 10 queries per second per IP address.

20
00:00:54,930 --> 00:00:57,840
So as you can see, the quota can be quite flexible

21
00:00:57,840 --> 00:01:00,090
and you can define your own quotas.

22
00:01:00,090 --> 00:01:03,720
But in any case, if you predict that your API

23
00:01:03,720 --> 00:01:07,290
will be subject of a heavy load and a lot of request,

24
00:01:07,290 --> 00:01:09,783
then it's always a good idea to define a quota.

