[Glass] rest api returning large result
Johan Brichau
johan at yesplan.be
Mon May 20 08:00:21 PDT 2024
> On 20 May 2024, at 16:48, Otto Behrens <otto at finworks.biz> wrote:
>
> Thanks, Johan.
>
> We basically hacked a responder to do something like:
>
> requestContext
> respond: [ :response |
> response
> status: 200;
> contentType: 'application/json'.
> response stream nextPutAll: fileContents ]
Okay, I’ll give that a try and see what I can get when using the Zinc adaptor in GemStone…
Btw, if you have the file on disk, consider using X-Sendfile protocol to nginx.
Something like this, where ‘document url’ is the url where it is reachable through nginx:
self requestContext
respond: [ :response |
response headerAt: 'X-Accel-Redirect' put: document url ]
>> I’m using FastCGI in production, and serving large json files as well. Did not see this performance issue pop up though.
>
> O dear, we did use FastCGI many moons ago and ended up reverting to an HTTP proxy. It was a bit easier to work with as HTTP is more readable, but I just remember it was a bit of a battle.
I would not recommend it anymore in the sense that the protocol itself is outdated and prohibits things like websockets.
But I mentioned it to say that the performance issue might very well be in the Zinc Adaptor for GemStone.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/archives/glass/attachments/20240520/6532095b/attachment-0001.htm>
More information about the Glass
mailing list