Range 0:0 for the whole payload #313
Labels
enhancement
Improving existing functionality
I3
Minimal impact
S3
Minimally significant
U4
Nothing urgent
Milestone
Is your feature request related to a problem? Please describe.
I'm always frustrated when I think of how S3 gateway processes GET requests. Most of the time it goes https://github.com/nspcc-dev/neofs-s3-gw/blob/bf5a07fa5c4d6b4bc21a489b600b7548c78db6ab/internal/neofs/neofs.go#L547-L560 route, fetching the whole object from storage (regular GET operation). While in fact the gateway doesn't need and doesn't use the header in any way (see https://github.com/nspcc-dev/neofs-s3-gw/blob/bf5a07fa5c4d6b4bc21a489b600b7548c78db6ab/api/layer/object.go#L107-L123 also).
Describe the solution you'd like
We're missing easy ways to get payload of the object only. Take HTTP range requests for example (https://www.rfc-editor.org/rfc/rfc7233#section-2), much more rich semantics is provided there. We can't do all of it immediately, our range parameters are unsigned, but we can give an additional meaning to otherwise useless
0:0
and return whole payload in this case. S3 will get the data it needs to, no more and no less, we'll send less messages and will be able to benefit from other node-side optimizations like nspcc-dev/neofs-node#2925 (omitting header processing at all).Describe alternatives you've considered
Keep things as is or extend range requests with additional parameters.
The text was updated successfully, but these errors were encountered: