Use a sidecar connection per PHP thread#3770
Merged
Merged
Conversation
bwoebi
force-pushed
the
bob/thread-sidecar
branch
from
April 2, 2026 12:50
1efe005 to
e673db0
Compare
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 472579b | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
bwoebi
force-pushed
the
bob/thread-sidecar
branch
from
April 2, 2026 13:24
e673db0 to
1b4b37f
Compare
Leiyks
reviewed
Apr 2, 2026
bwoebi
force-pushed
the
bob/batch-endpoint
branch
from
April 2, 2026 18:36
8ecdabc to
3503499
Compare
bwoebi
force-pushed
the
bob/batch-endpoint
branch
2 times, most recently
from
April 2, 2026 20:56
0db877a to
83d3af1
Compare
bwoebi
force-pushed
the
bob/thread-sidecar
branch
from
April 2, 2026 20:59
d58b820 to
7b5db07
Compare
bwoebi
force-pushed
the
bob/batch-endpoint
branch
2 times, most recently
from
April 3, 2026 16:22
9b92ee4 to
5cf8ebb
Compare
While the sidecar has been a process global for the longest time, it's also unfair with respect to limits and not compatible with the newly introduced outbox. Having a connection per thread ensures that every thread can have up to 100 queued items. It also reduces contention on the SidecarTransport, which was indeed adding quite a bit of latency due to threads accumulating in futex_wait for very short requests under moderate load. Moving the background sender stats to its own thread in preparation of dropping the Mutex on the SidecarTransport fully. Signed-off-by: Bob Weinand <[email protected]>
bwoebi
force-pushed
the
bob/thread-sidecar
branch
2 times, most recently
from
April 17, 2026 12:23
7a5104a to
fd34daf
Compare
Benchmarks [ tracer ]Benchmark execution time: 2026-04-17 13:42:19 Comparing candidate commit fd34daf in PR branch Found 1 performance improvements and 1 performance regressions! Performance is the same for 191 metrics, 1 unstable metrics. scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache
scenario:PHPRedisBench/benchRedisOverhead
|
Signed-off-by: Bob Weinand <[email protected]>
bwoebi
force-pushed
the
bob/thread-sidecar
branch
from
April 17, 2026 14:20
fd34daf to
472579b
Compare
Leiyks
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While the sidecar has been a process global for the longest time, it's also unfair with respect to limits and not compatible with the newly introduced outbox.
Having a connection per thread ensures that every thread can have up to 100 queued items. It also reduces contention on the SidecarTransport, which was indeed adding quite a bit of latency due to threads accumulating in futex_wait for very short requests under moderate load.
Moving the background sender stats to its own thread in preparation of dropping the Mutex on the SidecarTransport fully.