Score:0

nginx limit_req_zone rate limiting granularity

in flag

How should the rate be interpreted in the nginx rate limiting module?

10 r/s means 1 request every 100ms - this means granularity is 100ms; and 2nd request within the 100ms will get rejected.

Does 30 r/m mean 1 request every 2 seconds (2000ms)? Thus granularity is 2000ms? Therefore 2nd request within the 2000ms will get rejected?

Similarly, 6 r/m means 1 request every 10 seconds (10000ms) Thus granularity is 10000ms?

cn flag
Bob
That appears the correct interpretation to me.
in flag
So the granularity is per request, and not millisecond really.
cn flag
Bob
The internal time keeping by nginx is with millisecond accuracy. When you have a rate of `10 r/s` AND don't allow bursts the subsequent request is rejected if it arrives between 0 and 99 milliseconds after after the previous permitted one. If it arrives exactly 100 milliseconds later (or much later) it will be permitted.
in flag
Can you give the example considering 12r/m - this makes the granularity at second level - so 5 second granularity right?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.