增大默认的源站的并发连接数(32 * CPU)和空闲连接数(8 * CPU)

This commit is contained in:
GoEdgeLab
2021-10-15 10:30:07 +08:00
parent 4a053ba360
commit 775eb5476b

View File

@@ -75,11 +75,11 @@ func (this *HTTPClientPool) Client(req *HTTPRequest, origin *serverconfigs.Origi
numberCPU = 8 numberCPU = 8
} }
if maxConnections <= 0 { if maxConnections <= 0 {
maxConnections = numberCPU * 8 maxConnections = numberCPU * 32
} }
if idleConns <= 0 { if idleConns <= 0 {
idleConns = numberCPU * 4 idleConns = numberCPU * 8
} }
//logs.Println("[ORIGIN]max connections:", maxConnections) //logs.Println("[ORIGIN]max connections:", maxConnections)