Limit server calculations per client IP #324

Closed
opened 2026-10-28 19:04:13 +01:00 by nessar · 0 comments
Owner

Parent

#319

What to build

One client IP cannot occupy the server. Each IP may hold five open jobs, running or waiting. The IP comes from CF-Connecting-IP, falling back to the socket's remote address. The server refuses a sixth job with a dedicated close code before sending any message, and that client calculates locally without notice. Other IPs are unaffected, and closing a job frees a place. The server also rejects incoming messages larger than about 1 MB without starting a calculation. Requests are a few kilobytes.

Acceptance criteria

  • A sixth simultaneous job from one CF-Connecting-IP is refused, a job from another IP is accepted, and closing one of the five frees a place.
  • A refused client gets a local calculation with the same planning outcome.
  • An oversized incoming message closes the socket without running a calculation.
  • The deployment documentation states that the limit holds only if the origin accepts traffic from Cloudflare alone.

Blocked by

## Parent #319 ## What to build One client IP cannot occupy the server. Each IP may hold five open jobs, running or waiting. The IP comes from `CF-Connecting-IP`, falling back to the socket's remote address. The server refuses a sixth job with a dedicated close code before sending any message, and that client calculates locally without notice. Other IPs are unaffected, and closing a job frees a place. The server also rejects incoming messages larger than about 1 MB without starting a calculation. Requests are a few kilobytes. ## Acceptance criteria - [ ] A sixth simultaneous job from one `CF-Connecting-IP` is refused, a job from another IP is accepted, and closing one of the five frees a place. - [ ] A refused client gets a local calculation with the same planning outcome. - [ ] An oversized incoming message closes the socket without running a calculation. - [ ] The deployment documentation states that the limit holds only if the origin accepts traffic from Cloudflare alone. ## Blocked by - #320
nessar added the ready-for-agent label 2026-10-28 19:04:13 +01:00
nessar added a new dependency 2026-10-28 19:04:31 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: nessar/vac-optimizer#324