I am using Marathon and Mesos. My applications are based on Scala and I am using SBT docker plugin to dockerize the application and to deploy to Marathon. The applications are asynchronous (Queue Based) and not invoked via HTTP. How do I perform healthcheck for Asynchronous applications and is it possible to leverage SBT Scalatest here. The application is dockerized, so how do we invoke Scalatest inside a dockerized app. Any thoughts ?
You can use Command HealthCheck and execute your custom command.
Think if you really need a health-check and what it will tell you. Avoid health checks that eat resources better expose an endpoint that will monitor thread pools, timeouts e.t.c. and returns unhealthy when something is really wrong. In other cases, you should configure your metrics to notify you that something bad happens.