NeoFS API RPC handling deadlines #1386

Open
opened 2025-12-28 17:22:48 +00:00 by sami · 0 comments
Owner

Originally created by @cthulhu-rider on GitHub (Mar 20, 2025).

currently, all server API handlers rely on the context passed by the gRPC lib side (example). It may have various deadline settings:

  1. "normal", up to couple of minutes
  2. huge, e.g. >=1 hour
  3. unset, i.e. infinite context

for 1, although the "normal" concept is relative here, everything works fine. For 2, although it's finite, the handler may stuck for long time. For 3, the server hands "forever"

Describe the solution you'd like

limit request deadlines. If the deadline exceeds the limit, use the max one. For simplicity, lets have a global value for all RPCs. 1m feels good

Describe alternatives you've considered

not yet

Additional context

#3229

Originally created by @cthulhu-rider on GitHub (Mar 20, 2025). ## Is your feature request related to a problem? Please describe. currently, all server API handlers rely on the context passed by the gRPC lib side ([example](https://github.com/nspcc-dev/neofs-node/blob/ea6b99c3a3bb5b194cb9092c7f7a08321bac46f3/pkg/services/object/server.go#L1891)). It may have various deadline settings: 1. "normal", up to couple of minutes 2. huge, e.g. >=1 hour 3. unset, i.e. infinite context for 1, although the "normal" concept is relative here, everything works fine. For 2, although it's finite, the handler may stuck for long time. For 3, the server hands "forever" ## Describe the solution you'd like limit request deadlines. If the deadline exceeds the limit, use the max one. For simplicity, lets have a global value for all RPCs. `1m` feels good ## Describe alternatives you've considered not yet ## Additional context #3229
Sign in to join this conversation.
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
nspcc-dev/neofs-node#1386
No description provided.