Both apps are in AWS VMs. Client calls server machine by its public ip (not load balancer). Server is launched in docker.
Initially I tried to make no limit calls, so potentially there were 14k concurrent calls to server.
Next I limited requests to max 3k batches (next batch is started after previous one completes).
Still was seeing: {"code":"ECONNRESET","errno":"ECONNRESET","syscall":"read"} in NodeJS.
Next I added 'keepAlive: true, and maxSockets: 200' to node's http agent. That improved total processing time and reduced/eliminated ECONNRESET error. However setting maxSockets size to big numer like 1000 does not improve total time but increases number of ECONNRESET which I can't explain/understand.
I'm not sure if the error occurs in OS/network layer or if it is related to vertx/java or nodejs. ECONNRESET means that server endpoint did reset connection. Is vertx closing connections? Is there any vertx limit for number of opened incoming connections in httpserver (for those lost connections I'm pretty sure that my http server handler was not invoked at all so maybe this is OS limit?)