mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader
synced 2025-08-19 04:05:58 +08:00
fix: set maxConcurrentStreams for http2 so it can be load-balanced reasonably
This commit is contained in:
parent
01539b7300
commit
a9fe036ddc
@ -44,6 +44,10 @@ export class CrawlStandAloneServer extends KoaServer {
|
|||||||
const ar = new AsyncResource('HTTP2ServerRequest');
|
const ar = new AsyncResource('HTTP2ServerRequest');
|
||||||
ar.runInAsyncScope(fn, this.koaApp, req, res);
|
ar.runInAsyncScope(fn, this.koaApp, req, res);
|
||||||
});
|
});
|
||||||
|
// HTTP2 p2p may break the load balancing
|
||||||
|
this.httpServer.updateSettings({
|
||||||
|
maxConcurrentStreams: 8,
|
||||||
|
});
|
||||||
// useResourceBasedDefaultTracker();
|
// useResourceBasedDefaultTracker();
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -44,6 +44,10 @@ export class SearchStandAloneServer extends KoaServer {
|
|||||||
const ar = new AsyncResource('HTTP2ServerRequest');
|
const ar = new AsyncResource('HTTP2ServerRequest');
|
||||||
ar.runInAsyncScope(fn, this.koaApp, req, res);
|
ar.runInAsyncScope(fn, this.koaApp, req, res);
|
||||||
});
|
});
|
||||||
|
// HTTP2 p2p may break the load balancing
|
||||||
|
this.httpServer.updateSettings({
|
||||||
|
maxConcurrentStreams: 8,
|
||||||
|
});
|
||||||
// useResourceBasedDefaultTracker();
|
// useResourceBasedDefaultTracker();
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -45,6 +45,10 @@ export class SERPStandAloneServer extends KoaServer {
|
|||||||
const ar = new AsyncResource('HTTP2ServerRequest');
|
const ar = new AsyncResource('HTTP2ServerRequest');
|
||||||
ar.runInAsyncScope(fn, this.koaApp, req, res);
|
ar.runInAsyncScope(fn, this.koaApp, req, res);
|
||||||
});
|
});
|
||||||
|
// HTTP2 p2p may break the load balancing
|
||||||
|
this.httpServer.updateSettings({
|
||||||
|
maxConcurrentStreams: 50,
|
||||||
|
});
|
||||||
// useResourceBasedDefaultTracker();
|
// useResourceBasedDefaultTracker();
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user