This commit is contained in:
Yanlong Wang 2025-05-07 21:58:03 +08:00
parent a3412ef180
commit da1098f38d
No known key found for this signature in database
GPG Key ID: C0A623C0BADF9F37
4 changed files with 1 additions and 12 deletions

View File

@ -340,6 +340,7 @@ export class CrawlerHost extends RPCHost {
}
}
const crawlOpts = await this.configure(crawlerOptions);
this.logger.info(`Accepting request from ${uid || ctx.ip}`, { opts: crawlerOptions });
if (crawlerOptions.robotsTxt) {
await this.robotsTxtService.assertAccessAllowed(targetUrl, crawlerOptions.robotsTxt);
}

View File

@ -44,10 +44,6 @@ export class CrawlStandAloneServer extends KoaServer {
const ar = new AsyncResource('HTTP2ServerRequest');
ar.runInAsyncScope(fn, this.koaApp, req, res);
});
// HTTP2 p2p may break the load balancing
this.httpServer.updateSettings({
maxConcurrentStreams: 8,
});
// useResourceBasedDefaultTracker();
return this;

View File

@ -44,10 +44,6 @@ export class SearchStandAloneServer extends KoaServer {
const ar = new AsyncResource('HTTP2ServerRequest');
ar.runInAsyncScope(fn, this.koaApp, req, res);
});
// HTTP2 p2p may break the load balancing
this.httpServer.updateSettings({
maxConcurrentStreams: 8,
});
// useResourceBasedDefaultTracker();
return this;

View File

@ -45,10 +45,6 @@ export class SERPStandAloneServer extends KoaServer {
const ar = new AsyncResource('HTTP2ServerRequest');
ar.runInAsyncScope(fn, this.koaApp, req, res);
});
// HTTP2 p2p may break the load balancing
this.httpServer.updateSettings({
maxConcurrentStreams: 50,
});
// useResourceBasedDefaultTracker();
return this;