Skip to content

perf(erpc:PLA-687): cap generic batch concurrency with worker pool#30

Merged
0x666c6f merged 2 commits intomorpho-mainfrom
feature/pla-687-erpc-add-bounded-worker-pool-for-generic-http-batch
Mar 4, 2026
Merged

perf(erpc:PLA-687): cap generic batch concurrency with worker pool#30
0x666c6f merged 2 commits intomorpho-mainfrom
feature/pla-687-erpc-add-bounded-worker-pool-for-generic-http-batch

Conversation

@0x666c6f
Copy link
Copy Markdown
Collaborator

@0x666c6f 0x666c6f commented Mar 3, 2026

Summary

  • replace unbounded per-request goroutine fanout for generic HTTP JSON-RPC batches with a bounded worker pool
  • add server config knob server.maxBatchConcurrency (default 32)
  • preserve response ordering semantics while reducing goroutine pressure on large batches

Changes

  • erpc/http_server.go
  • add batchWorkerConcurrency helper
  • process batch requests via worker-pool + indexed jobs channel
  • common/config.go
  • add server.maxBatchConcurrency
  • common/defaults.go
  • default server.maxBatchConcurrency to 32
  • common/validation.go
  • validate server.maxBatchConcurrency > 0
  • tests:
    • common/config_test.go: default + validation test
    • erpc/http_server_test.go: batch worker concurrency behavior test

Linear

@0x666c6f 0x666c6f self-assigned this Mar 3, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ff486cf0fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread erpc/http_server.go
@0x666c6f 0x666c6f changed the base branch from feature/pla-686-erpc-bound-async-cache-set-concurrency-in-network-path to morpho-main March 4, 2026 16:29
@0x666c6f 0x666c6f merged commit c14315c into morpho-main Mar 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant