mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader
synced 2025-08-15 21:55:56 +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'],
|
const apiRoll = await this.rateLimitControl.simpleRPCUidBasedLimit(rpcReflect, uid, ['CRAWL'],
|
||||||
[
|
[
|
||||||
// 1000 requests per minute
|
// 200 requests per minute
|
||||||
new Date(Date.now() - 60 * 1000), 1000
|
new Date(Date.now() - 60 * 1000), 200
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -393,8 +393,8 @@ ${this.content}
|
|||||||
} else if (ctx.req.ip) {
|
} else if (ctx.req.ip) {
|
||||||
const apiRoll = await this.rateLimitControl.simpleRpcIPBasedLimit(rpcReflect, ctx.req.ip, ['CRAWL'],
|
const apiRoll = await this.rateLimitControl.simpleRpcIPBasedLimit(rpcReflect, ctx.req.ip, ['CRAWL'],
|
||||||
[
|
[
|
||||||
// 100 requests per minute
|
// 20 requests per minute
|
||||||
new Date(Date.now() - 60 * 1000), 100
|
new Date(Date.now() - 60 * 1000), 20
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -153,8 +153,8 @@ export class SearcherHost extends RPCHost {
|
|||||||
|
|
||||||
await this.rateLimitControl.simpleRPCUidBasedLimit(rpcReflect, uid, ['CRAWL'],
|
await this.rateLimitControl.simpleRPCUidBasedLimit(rpcReflect, uid, ['CRAWL'],
|
||||||
[
|
[
|
||||||
// 1000 requests per minute
|
// 40 requests per minute
|
||||||
new Date(Date.now() - 60 * 1000), 1000
|
new Date(Date.now() - 60 * 1000), 40
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -169,8 +169,8 @@ export class SearcherHost extends RPCHost {
|
|||||||
this.threadLocal.set('ip', ctx.req.ip);
|
this.threadLocal.set('ip', ctx.req.ip);
|
||||||
await this.rateLimitControl.simpleRpcIPBasedLimit(rpcReflect, ctx.req.ip, ['CRAWL'],
|
await this.rateLimitControl.simpleRpcIPBasedLimit(rpcReflect, ctx.req.ip, ['CRAWL'],
|
||||||
[
|
[
|
||||||
// 100 requests per minute
|
// 5 requests per minute
|
||||||
new Date(Date.now() - 60 * 1000), 100
|
new Date(Date.now() - 60 * 1000), 5
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user