Skip to content

docs(daemon): evaluate epoll/kqueue connection multiplexing#3437

Merged
oferchen merged 1 commit into
masterfrom
docs/daemon-event-loop-audit
Apr 29, 2026
Merged

docs(daemon): evaluate epoll/kqueue connection multiplexing#3437
oferchen merged 1 commit into
masterfrom
docs/daemon-event-loop-audit

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

Documentation-only audit (docs/audits/daemon-event-loop-multiplexing.md)
addressing task #1675: should the oc-rsync daemon adopt epoll/kqueue
event-loop multiplexing in place of the current thread-per-connection
model?

The audit:

  • Maps the synchronous accept loop in
    crates/daemon/src/daemon/sections/server_runtime/{accept_loop,connection,listener,workers}.rs
    and the existing tokio scaffold in
    crates/daemon/src/daemon/async_session/.
  • Compares against upstream rsync 3.4.1 (socket.c:533 start_accept_loop,
    which uses select(2) over listening fds + fork(2) per connection -
    no per-connection multiplexing).
  • Evaluates three paths: (a) raw mio 1.x event loop, (b) full tokio
    accept with spawn_blocking workers, (c) status quo.
  • Records 7 findings (HIGH/MEDIUM/LOW) with file:line evidence.

Recommendation: pursue option (b) - promote the existing
async_session/ listener to the production accept loop behind the
existing async Cargo feature - but defer until a deployment with
thousands of concurrent idle connections actually needs it. Reject
option (a) (would create a third accept-loop variant alongside the
sync and async paths). 8 follow-up tasks filed (#1676-#1683).

Test plan

  • git diff review confirms the change is documentation-only.
  • All cited file:line references verified against the worktree.
  • No code changes; CI doc/lint workflows should be sufficient.

Documentation-only audit of the daemon's accept-loop and per-connection
threading model. Compares three paths (raw mio event loop, full tokio
async accept, status quo thread-per-connection) against upstream rsync
3.4.1's select+fork model and against the existing async_session
scaffold. Recommends extending the in-tree async path behind the
existing async Cargo feature rather than introducing a new mio variant
alongside the synchronous loop.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Apr 29, 2026
@oferchen oferchen merged commit bd2b4e7 into master Apr 29, 2026
12 checks passed
@oferchen oferchen deleted the docs/daemon-event-loop-audit branch April 29, 2026 10:21
oferchen added a commit that referenced this pull request May 1, 2026
…3437)

Documentation-only audit of the daemon's accept-loop and per-connection
threading model. Compares three paths (raw mio event loop, full tokio
async accept, status quo thread-per-connection) against upstream rsync
3.4.1's select+fork model and against the existing async_session
scaffold. Recommends extending the in-tree async path behind the
existing async Cargo feature rather than introducing a new mio variant
alongside the synchronous loop.
oferchen added a commit that referenced this pull request May 5, 2026
…3437)

Documentation-only audit of the daemon's accept-loop and per-connection
threading model. Compares three paths (raw mio event loop, full tokio
async accept, status quo thread-per-connection) against upstream rsync
3.4.1's select+fork model and against the existing async_session
scaffold. Recommends extending the in-tree async path behind the
existing async Cargo feature rather than introducing a new mio variant
alongside the synchronous loop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant