Limit server calculations per client IP #324
Notifications
Due Date
No due date set.
Depends on
#320 Calculate plans on the server over a WebSocket
nessar/vac-optimizer
Reference: nessar/vac-optimizer#324
Reference in new issue
Block a user
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
CF-Connecting-IPis refused, a job from another IP is accepted, and closing one of the five frees a place.Blocked by