mirror of
https://github.com/nspcc-dev/neofs-s3-gw.git
synced 2026-03-01 04:29:15 +00:00
Consider options to improve listing #250
Labels
No labels
I2
I2
I3
I4
S2
S3
S4
S4
U0
U1
U2
U2
U3
U4
U4
auth-mate
blocked
bug
config
dependencies
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
performance
question
security
test
tree-service
tree-service
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-s3-gw#250
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alexvanin on GitHub (Jun 10, 2022).
Originally assigned to: @KirillovDenis on GitHub.
Listing operation might be quite slow on a buckets with thousands of objects. It will be better after #524, but we have options for bigger speed improvements.
Parallelize object.Head requests
One listing request starts a chain of
object.Headrequests into NeoFS. Run these requests in a pool of asynchronous workers.🟢 Best effort/effect ratio
🔴 It exponentially increase number of
object.Headrequests produced by the gate. It will lead for more complex worker management and load distribution (maybe even across NeoFS endpoints).Stream XML response
If client side software supports streaming XML response, we can do that. After every
object.Headrequest, S3 Gateway will do a bit of post-processing (filling prefixes for dirs, update counters) and then send*data.ObjectInfointo channel / io.Writer.On the other side, request handler will read from channel / io.Reader and submit XML elements into HTTP response. Implement custom
xml.Marshalerinterface and useEncodeElementfunction to manually write object info.🟢 True streaming
🔴 Not sure if relevant at all. Is there any software that supports XML streaming of S3 responses? aws-sdk-go library does not support that. I doubt other libraries do.
Remove object.Head requests
Store all required data about the object in tree node, including size and owner.
🟢 No head requests
🔴 A bit more complex object uploading routine and more tree service payload
@alexvanin commented on GitHub (Jun 10, 2022):
/cc @KirillovDenis @masterSplinter01 @realloc
@alexvanin commented on GitHub (Jun 10, 2022):
If first byte response time is matter, then we can send first XML Token immediately and then keep processing as usual.
@KirillovDenis commented on GitHub (Jun 22, 2022):
Done in #538