SSE fan-out delays file writes under active streams #216

Closed
opened 2026-09-27 05:36:47 +00:00 by kayg · 2 comments
Owner

A real local adversarial run found that file writes can exceed the SSE fan-out latency threshold with many change streams open.

The tests/adversarial/attack2.py probe opened 64 SSE change streams for one User, then issued 20 sequential POST /api/v1/files/mkdir requests. One run measured 8.5 seconds total against the probe's 5-second threshold. The result had no SLOW label. The probe currently discards the individual responses in this timing loop, so it did not record their status codes.

Please verify write latency and response status under 64 streams on a quieter host, then investigate fan-out scheduling if the delay reproduces. The same machine had builds and server probes running in other worktrees during this run.

A real local adversarial run found that file writes can exceed the SSE fan-out latency threshold with many change streams open. The `tests/adversarial/attack2.py` probe opened 64 SSE change streams for one User, then issued 20 sequential `POST /api/v1/files/mkdir` requests. One run measured 8.5 seconds total against the probe's 5-second threshold. The result had no SLOW label. The probe currently discards the individual responses in this timing loop, so it did not record their status codes. Please verify write latency and response status under 64 streams on a quieter host, then investigate fan-out scheduling if the delay reproduces. The same machine had builds and server probes running in other worktrees during this run.
Author
Owner

Duplicate evidence: #189 reports the same tests/adversarial/attack2.py scenario: 64 SSE streams for one User, then 20 POST /api/v1/files/mkdir writes. This issue records 8.5 seconds and #189 records 7.2 seconds; both runs had shared-host load. Recommend linking this run to #189 and combining the measurements before deciding if a product change is needed.

Duplicate evidence: #189 reports the same tests/adversarial/attack2.py scenario: 64 SSE streams for one User, then 20 POST /api/v1/files/mkdir writes. This issue records 8.5 seconds and #189 records 7.2 seconds; both runs had shared-host load. Recommend linking this run to #189 and combining the measurements before deciding if a product change is needed.
Author
Owner

Duplicate probe of #189: both report the same SSE fan-out and mkdir timing under shared-host load. Keep #189 as the active record.

Duplicate probe of #189: both report the same SSE fan-out and mkdir timing under shared-host load. Keep #189 as the active record.
kayg closed this issue 2026-10-03 11:55:46 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#216
No description provided.