Bogdan Popa writes:

> Only dispatchers get direct access to the output port for the socket.
> If you use `dispatch/servlet', then it takes care of taking your
> `response' value and calling `output-response' on it.  Unless the server
> knows the connection should be closed and unless the request was a HEAD
> request, then it outputs the response by chunking it:

I was wrong about this.  The web-server does the right thing if the
`Content-Length' header is present in the response value:

When I change the benchmark to take advantage of that, throughput doubles:

I'll make a PR against the main repo to make sure all of the responses
have content lengths.

Out of curiosity, I made the app fork through FFI calls[1]:

This worked although multiple processes wake up when a connection can be
accepted and the IO layer doesn't seem to handle `EAGAIN':

racket: Connection error: tcp-accept: accept from listener failed
racket:   system error: Resource temporarily unavailable; errno=11
racket:   context...:
racket:    .../more-scheme.rkt:261:28
racket:    /root/.racket/7.7/pkgs/compatibility-lib/mzlib/thread.rkt:75:14: loop


You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To view this discussion on the web visit

Reply via email to