[racket-users] Re: Multiple places listening to a TCP port [was: Racket application servers]

2018-11-25 Thread George Neuner
On 11/24/2018 7:39 PM, Philip McGrath wrote: On Fri, Nov 23, 2018 at 5:44 PM George Neuner > wrote: Multiple (identical) server instances running on the same machine can listen for connections on the same network port - an incoming client call will be co

[racket-users] Re: Multiple places listening to a TCP port [was: Racket application servers]

2018-11-25 Thread George Neuner
Paulo Matos recently announced a library called "Loci" that allows for using mulitple processes with much the same API as places. https://pkgs.racket-lang.org/package/loci I haven't tried it, but it looks interesting. George -- You received this message because you are subscribed to the Goo

Re: [racket-users] Re: Multiple places listening to a TCP port [was: Racket application servers]

2018-11-25 Thread Bogdan Popa
One way you might also solve this on UNIX systems is you could fork after listening on the socket. The file descriptor for the socket from the parent would then be shared with the children and so their accept calls would be "load balanced" by way of them all accepting connections from the same q

Re: [racket-users] Re: Multiple places listening to a TCP port [was: Racket application servers]

2018-11-25 Thread George Neuner
On 11/25/2018 4:11 AM, Bogdan Popa wrote: One way you might also solve this on UNIX systems is you could fork after listening on the socket. The file descriptor for the socket from the parent would then be shared with the children and so their accept calls would be "load balanced" by way of th

Re: [racket-users] Racket application servers

2018-11-25 Thread Greg Hendershott
I just want to point out the possibility that your Racket web app might not be CPU-bound. Some "generic" web sites are IO-bound. Blocked on IO for the HTTP requests and responses. Blocked on IO talking to a database server like Postgres. In cases like that, you might not need more than one process

Re: [racket-users] Multiple places listening to a TCP port [was: Racket application servers]

2018-11-25 Thread Matthew Flatt
At Sat, 24 Nov 2018 19:39:19 -0500, Philip McGrath wrote: > On Fri, Nov 23, 2018 at 5:44 PM George Neuner wrote: > > > Multiple (identical) server instances running on the same machine can > > listen for connections on the same network port - an incoming client call > > will be connected to only

Re: [racket-users] Multiple places listening to a TCP port [was: Racket application servers]

2018-11-25 Thread George Neuner
On 11/25/2018 6:13 PM, Matthew Flatt wrote: An alternative to exposing `SO_REUSEPORT` would be to allow TCP listeners to be sent across place channels, so multiple places in same Racket process could accept connections from the same listener. That would only work for place-based parallelism, bu