arturobernalg opened a new pull request, #666: URL: https://github.com/apache/httpcomponents-core/pull/666
Implement an HTTP/2 stream-capacity-aware connection pool with per-route and global connection limits, reservation-aware leasing, GOAWAY draining, disconnect handling, and route-level wakeup logic. Optimize uncontended lease paths and add coverage for the main pooling and lifecycle edge cases. ## Performance Benchmark: `H2PoolPolicyJmh.request` Mode: throughput (`ops/s`) Payload: `128 bytes` | maxConcurrentStreams | routes | BASIC ops/s | MULTIPLEXING ops/s | Result | |---:|---:|---:|---:|---| | 10 | 1 | 40,937 | 76,508 | MULTIPLEXING +86.9% | | 10 | 4 | 80,072 | 77,919 | BASIC +2.7% | | 10 | 10 | 84,421 | 71,621 | BASIC +15.2% | | 20 | 1 | 40,412 | 77,503 | MULTIPLEXING +91.8% | | 20 | 4 | 75,011 | 78,735 | MULTIPLEXING +5.0% | | 20 | 10 | 77,851 | 72,444 | BASIC +6.9% | | 50 | 1 | 41,086 | 63,775 | MULTIPLEXING +55.2% | | 50 | 4 | 75,775 | 76,414 | MULTIPLEXING +0.8% | | 50 | 10 | 77,908 | 76,405 | BASIC +1.9% | | 100 | 1 | 40,418 | 40,807 | MULTIPLEXING +1.0% | | 100 | 4 | 74,411 | 76,005 | MULTIPLEXING +2.1% | | 100 | 10 | 75,293 | 76,036 | MULTIPLEXING +1.0% | ## Summary `MULTIPLEXING` performs best on workloads concentrated on a small number of hot routes, where connection-level stream capacity becomes a limiting factor. For broader route fan-out, the advantage is smaller. In the 10-route benchmark shape, `MULTIPLEXING` is still slower at lower stream limits, but approaches parity as the peer stream limit increases. The new pool should therefore be viewed as a workload-specific policy rather than a universal replacement for `BASIC`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
