<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On 20 May 2024, at 16:48, Otto Behrens <otto@finworks.biz> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div dir="ltr">Thanks, Johan.</div><div dir="ltr"><br></div><div>We basically hacked a responder to do something like:</div><div><br></div><div>requestContext<br>respond: [ :response |<span class="Apple-converted-space"> </span><br>response<br>status: 200;<br>contentType: 'application/json'.<br>response stream nextPutAll: fileContents ]<br></div></div></div></blockquote><div><br></div>Okay, I’ll give that a try and see what I can get when using the Zinc adaptor in GemStone…</div><div><br></div><div>Btw, if you have the file on disk, consider using X-Sendfile protocol to nginx. </div><div>Something like this, where ‘document url’ is the url where it is reachable through nginx:</div><div><br></div><div><div>self requestContext</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>respond: [ :response | </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>response headerAt: 'X-Accel-Redirect' put: document url ]</div></div><div><br><blockquote type="cite"><div><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div><div>I’m using FastCGI in production, and serving large json files as well. Did not see this performance issue pop up though.</div></div></blockquote><div><br></div><div>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.</div></div></div></div></blockquote><div><br></div>I would not recommend it anymore in the sense that the protocol itself is outdated and prohibits things like websockets.</div><div>But I mentioned it to say that the performance issue might very well be in the Zinc Adaptor for GemStone.</div></body></html>