com.sun.net.httpserver update
Alan Bateman
Alan.Bateman at oracle.com
Sun Sep 20 17:14:11 UTC 2020
On 20/09/2020 12:46, Kasper Nielsen wrote:
> Hi Alan,
>
> I did some local runs using vegeta as a simple loading testing tool.
> Using Executors.newVirtualThreadExecutor() as the dispatching
> mechanism. Which worked beautifully. I was easily spawning a couple
> of hundred thousand virtual threads a second on an old laptop.
>
> But only because I spun of 1000 extra threads per request. Otherwise
> I had all kinds of issues with networking subsystem/jdk.httpserver.
>
> I think my conclusion is, that if you want to try and stress Loom with a
> thread-per-request web-server. You will need a pretty well-tuned
> test setup.
>
Thanks for confirming that it works although I'm not quite sure what you
mean by "1000 extra threads per request". It doesn't surprise me if you
run into scalability issues with this HTTP server. The original
motivation for this little server was to support web services callbacks
to a client-provided endpoint. It has been useful for small scale
embedded usages and tests but that's about it.
You are right that HTTP load test will require at least some tuning of
TCP parameters, esp. with short lived TCP connections. It can be useful
to use several IP addresses with the load balanced across the addresses.
-Alan
More information about the loom-dev
mailing list