specklesystems / speckle-server

The Speckle Server, Frontend, 3D Viewer, & other JS utilities.
https://speckle.systems
Other
673 stars 174 forks source link

`objectsender` able to send larger payloads #2520

Open vwnd opened 3 months ago

vwnd commented 3 months ago

It seems like the way that ServerTransport is batching the objects and sending to POST /objects/:streamId is not able to handle a large amount of objects, because it yields enough POST requests to that endpoint, that it restarts returning 500 errors.

@iainsproat mention it can be a firewall or other mechanism.

Problem

I have described the problem here.
Also, I have produced a codesandbox to reproduce the issue here.

Solution

The solution would be for the code on the sandbox mentioned above to work.

Technically, I would suggest enhancing the ServerTransport to compress the batch using application/zip instead of application/json, so that it can send more objects per request, meaning less total requests.

Additional context

Please have a look at the following discussion: https://speckle.community/t/is-there-a-rate-limit-on-post-objects-projectid/12310

linear[bot] commented 3 months ago

WEB-1392 `objectsender` able to send larger payloads