Search code examples
vert.x

vert.x setup for high load server


I have server with 8 CORES In that server I have 3000 incoming requests per second What settings are best to use for best performance? new DeploymentOptions().setInstances(???); Do I need 8 instances because of my 8 cores server? By default it's 1. Is that better to use: .setWorker(true).setWorkerPoolSize(???) Or I need just keep nothing for that? And if I need to set workerPoolSize how much will it be? By default it's 20.

I can't compare it in production, I need predict for that.

Thanks a lot for answer!

And additional question: Is the following the right way to making async work in vertx pipeline? pipeline step call function that return Future and in that Future in onComplete will call ctx.next() If no, how I can do async work in the middle of pipeline?


Solution

  • You should have 16 instances for 8 cores.

    Are you using the executeBlocking functionality? If yes - you should set the worker pool size to 128

    And additional question: Is the following the right way to making async work in vertx pipeline? pipeline step call function that return Future and in that Future in onComplete will call ctx.next() If no, how I can do async work in the middle of pipeline?

    Question doesn't make sense. You should read the docs before putting a service that serves 3k rps in production