Skip to content

Reactor pool: extend the reactor/worker split to HTTP/1 + HTTP/2 (TCP) listeners #106

Description

@EdmondDantes

The reactor pool currently engages only for HTTP/3 listeners: the worker inbox is gated on http_server_config_has_h3 (http_server_worker_inbox_up, src/http_server_class.c), and only the H3 dispatch routes requests to workers (http3_stream_dispatch_to_worker).

With PR #104 the transport-agnostic pieces already exist:

  • request → worker hand-off: worker_inbox / worker_registry / worker_dispatch (already protocol-neutral, picks gRPC/H1/H2 handlers via the shared seam),
  • worker → reactor reverse path: response_wire FULL/STREAM_HEADERS/STREAM_CHUNK/STREAM_END/STREAM_ABORT + per-stream credit backpressure (include/core/stream_credit.h).

What's missing per TCP transport:

  • reactor-owned H1/H2 listeners (accept + parse on reactor threads, no PHP),
  • an apply function per transport mirroring http3_reactor_apply_response (submit wire responses / feed the H2 stream ring / grant credit from write-ACK equivalents),
  • inbound body streaming stays buffered across the split (same as H3) unless a cross-thread queue is designed.

Also: worker_dispatch currently stamps responses with protocol version "3.0" unconditionally — needs to reflect the originating transport once TCP joins.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions