workerman/http-client
An asynchronous, non-blocking HTTP client for Workerman. It supports GET/POST requests, file uploads and downloads, redirects, cookies, proxies, timeouts, keep-alive, and concurrent callback-based requests for high-performance PHP applications.
p95 = N × upstream_latency and one that takes roughly max(upstream_latency).CurlMultiHandler (best ecosystem, works in FPM), Symfony HttpClient (mature, PSR-18, good retry/streaming), Swoole/OpenSwoole clients (faster, heavier ops burden).HttpClient interface plus an adapter, so the product bet is "we can make concurrent outbound calls" rather than "we bet the roadmap on workerman/http-client."Adopt when most of these hold:
Worker daemons) and has a live event loop to hook into.ext-swoole / ext-openswoole — pure PHP is acceptable and often preferable for container portability and shared hosting parity.Look elsewhere when:
Mitigation if you do adopt: wrap it behind a narrow internal interface on day one; pin versions; add contract tests with a stub server; budget a small amount of engineering time to track upstream releases rather than assuming passive maintenance.
To executives (one paragraph): This is a small, focused library that lets our PHP services make many outbound HTTP calls at the same time instead of one after another. For any customer-facing feature that aggregates data from several internal or partner APIs, it directly compresses response time and reduces the number of servers we need to run — a latency and infrastructure-cost play, not a new platform. The strategic caution is maturity: the project is early-stage and thinly adopted, so we will isolate it behind our own interface, which keeps the switch-out cost low and the product bet on "faster fan-out," not on this specific library. Recommend a scoped pilot on one non-critical fan-out endpoint before any broader commitment.
To engineering:
ext-swoole; integrates natively with Workerman's event loop, connection pooling and keep-alive included.HttpClient port with a Guzzle-backed adapter for FPM contexts and tests.To product/roadmap: Green-light scope: fan-out and enrichment endpoints in event-loop services. Red-light scope: anything in the critical checkout path until the pilot clears, and anything requiring an event-loop runtime we don't already operate.
How can I help you explore Laravel packages today?