perf(cmpp): isolate inbound transport capacity

This commit is contained in:
hectorzhao
2026-08-20 18:09:29 +08:00
parent 53073461e9
commit 6708f1f7c5
11 changed files with 95 additions and 8 deletions
+3 -1
View File
@@ -50,13 +50,15 @@ func main() {
go func() {
log.Printf("cmpp gateway inbound server listening on %s", cmppAddr)
inboundConcurrency := positiveEnvInt("GATEWAY_CMPP_INBOUND_MAX_CONCURRENCY", 64)
if err := (inbound.Server{
Addr: cmppAddr,
APIBaseURL: apiBaseURL,
HTTPClient: inbound.NewAPIHTTPClient(inboundConcurrency),
PresenceStore: presenceStore,
RecoveryStore: recoveryStore,
GatewayInstanceID: getenv("GATEWAY_INSTANCE_ID", hostname()),
MaxSubmitConcurrency: positiveEnvInt("GATEWAY_CMPP_INBOUND_MAX_CONCURRENCY", 64),
MaxSubmitConcurrency: inboundConcurrency,
SecurityEventToken: os.Getenv("SECURITY_EVENT_TOKEN"),
}).ListenAndServe(); err != nil {
log.Fatalf("gateway inbound server stopped: %v", err)