Hello ,
I am trying to implement auto scaling in vertx. To achieve that I want to add verticles when I see the number of worker instances being used for web requests have reached a certain threshold. I can track the number of verticles [worker threads] being used by using DropWizardMetrics. After the threshold for the number of verticles used is met. I add a new verticles using following code:
DeploymentOptions depOptions = new DeploymentOptions(); depOptions.setWorker(true).setInstances(10); vertx.deployVerticle(VertxVerticleIssuer::new, depOptions, res -> {
if (res.succeeded()) { System.out.println("deployment successful"); }
else { System.err.println("Deployment failed"); }
});
DropWizardMetrics acknowledges that the number of verticles registered to vertx have increased but the number of worker threads in use do not increase. I also confirmed that DropWizardMetrics is not giving wrong output. Any suggestions?
Cheers!!!