question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not all service instances are "healthchecked"

See original GitHub issue

To me it looks like that only the first instance of a service is being monitored:

Looking at org.eclipse.hono.service.AbstractApplication.deployServiceVerticles():

for (final ObjectFactory<? extends AbstractServiceBase<?>> serviceFactory : serviceFactories) {

    AbstractServiceBase<?> serviceInstance = serviceFactory.getObject();

    // registered
    healthCheckServer.registerHealthCheckResources(serviceInstance);

    final Future<String> deployTracker = Future.future();
    vertx.deployVerticle(serviceInstance, deployTracker.completer());
    deploymentTracker.add(deployTracker);

    for (int i = 1; i < maxInstances; i++) { // first instance has already been deployed
        serviceInstance = serviceFactory.getObject();

        // NOT registered

        log.debug("created new instance of service: {}", serviceInstance);
        final Future<String> tracker = Future.future();
        vertx.deployVerticle(serviceInstance, tracker.completer());
        deploymentTracker.add(tracker);
    }
}

Wouldn’t it make sense to use the “instances” option from the DeploymentOptions and let vertx handle the number of instances. And then invert the way the services find the health check server by using Spring functionality (injection).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sophokles73commented, Aug 3, 2018

@ctron We are talking about Verticle instances running inside the same vert.x instance, right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Monitor App Service instances using Health check
This article uses Health check in the Azure portal to monitor App Service instances. Health check increases your application's availability ...
Read more >
Troubleshoot a Classic Load Balancer: Health checks
Your load balancer checks the health of its registered instances using either the default health check configuration provided by Elastic Load Balancing or...
Read more >
Lessons learnt setting up Health Check for Azure App Service
When a Health check path is provided, App service will ping the path on all instances. If an instance fails to respond within...
Read more >
Azure App Service - Enable the Health Check - dotnetthoughts
This article shows you what is App Service Health Check feature and how to enable it. This feature will help you to improve...
Read more >
Setting up health checking and autohealing - Google Cloud
If a managed instance stops running, but the change of state was not initiated by ... If you configure an application-based health check...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found