Repository navigation
Conversation
teta2k
marked this pull request as ready for review
October 19, 2026 14:32
teta2k
force-pushed
the
refactor/ipc-request-reply-threadless
branch
from
October 19, 2026 23:09
5917ecc to
c748f14
Compare
teta2k
force-pushed
the
refactor/ipc-request-reply-threadless
branch
from
October 19, 2026 23:17
c748f14 to
2aa0cbc
Compare
teta2k
force-pushed
the
refactor/ipc-request-reply-threadless
branch
from
October 20, 2026 11:03
769b1f1 to
741671e
Compare
This branch has not been deployed
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.
Previously, every IPC call created a thread. When communication stalled, the caller could time out while that thread continued holding its socket and request payload.
This replaces per-call threads with socket deadlines for synchronous calls and one persistent sender for events. Event reporting enqueues locally without waiting for IPC delivery. Each application process can buffer up to 1,000 pending events, with a five-second IPC timeout per delivery attempt. When the queue is full, new events are dropped. Forked workers initialize their own empty queue and sender state.
Rate-limit and firewall-list checks remain synchronous with their existing 10 ms timeouts. Configuration/statistics synchronization now uses a five-second IPC timeout for both the initial and periodic sync, allowing larger batches to finish. The first request can perform the initial sync synchronously and wait for it; periodic synchronization runs in a background thread. This synchronization exchanges local data with the background process, while cloud communication runs separately. Other query timeouts are unchanged. Connections and completed payloads are released on success and failure.
Local Unix-socket benchmarks on CPython 3.14, using six alternating paired batches against
main(e70fdfbb), measured the current PR implementation (741671ea):The table reports medians across the six batches. Measurements cover IPC transport with prepared messages. Event throughput includes draining the sender and confirming receiver counts. Application throughput depends on the workload.
Validation:
Delivery remains best effort: failed sends are not replayed, and pending events can be lost when the worker process exits. An IPC acknowledgement confirms acceptance by the background process, not cloud delivery. Socket deadlines do not interrupt serialization or deserialization.