mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader
synced 2025-08-14 15:45:55 +08:00
chore: update rate limits
This commit is contained in:
parent
2e3c217479
commit
ec4ce4fef3
@ -375,8 +375,8 @@ ${this.content}
|
||||
|
||||
const apiRoll = await this.rateLimitControl.simpleRPCUidBasedLimit(rpcReflect, uid, ['CRAWL'],
|
||||
[
|
||||
// 1000 requests per minute
|
||||
new Date(Date.now() - 60 * 1000), 1000
|
||||
// 200 requests per minute
|
||||
new Date(Date.now() - 60 * 1000), 200
|
||||
]
|
||||
);
|
||||
|
||||
@ -393,8 +393,8 @@ ${this.content}
|
||||
} else if (ctx.req.ip) {
|
||||
const apiRoll = await this.rateLimitControl.simpleRpcIPBasedLimit(rpcReflect, ctx.req.ip, ['CRAWL'],
|
||||
[
|
||||
// 100 requests per minute
|
||||
new Date(Date.now() - 60 * 1000), 100
|
||||
// 20 requests per minute
|
||||
new Date(Date.now() - 60 * 1000), 20
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -153,8 +153,8 @@ export class SearcherHost extends RPCHost {
|
||||
|
||||
await this.rateLimitControl.simpleRPCUidBasedLimit(rpcReflect, uid, ['CRAWL'],
|
||||
[
|
||||
// 1000 requests per minute
|
||||
new Date(Date.now() - 60 * 1000), 1000
|
||||
// 40 requests per minute
|
||||
new Date(Date.now() - 60 * 1000), 40
|
||||
]
|
||||
);
|
||||
|
||||
@ -169,8 +169,8 @@ export class SearcherHost extends RPCHost {
|
||||
this.threadLocal.set('ip', ctx.req.ip);
|
||||
await this.rateLimitControl.simpleRpcIPBasedLimit(rpcReflect, ctx.req.ip, ['CRAWL'],
|
||||
[
|
||||
// 100 requests per minute
|
||||
new Date(Date.now() - 60 * 1000), 100
|
||||
// 5 requests per minute
|
||||
new Date(Date.now() - 60 * 1000), 5
|
||||
]
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user