通过SBT进行Dockerized Scala应用程序的Marathon健康检查

问题描述 投票:-2回答:1

我正在使用Marathon和Mesos。我的应用程序基于Scala,我正在使用SBT docker插件将应用程序停靠并部署到Marathon。应用程序是异步的(基于队列),不通过HTTP调用。如何为异步应用程序执行运行状况检查,是否可以在此处利用SBT Scalatest。该应用程序是dockerized,因此我们如何在dockerized应用程序中调用Scalatest。有什么想法吗 ?

scala docker sbt mesos marathon
1个回答
0
投票

您可以使用Command HealthCheck并执行自定义命令。

想想你是否真的需要健康检查以及它会告诉你什么。避免使用资源的健康检查更好地暴露将监视线程池的端点,超时e.t.c.在出现问题时,回报不健康。在其他情况下,您应该配置指标以通知您发生了不好的事情。

Process health checking (“is this binary responding at all?”) and service health checking (“is this binary able to respond to this class of requests right now?”) are two conceptually distinct operations. Process health checking is relevant to the cluster scheduler, whereas service health checking is relevant to the load balancer. Clearly distinguishing between the two types of health checks can help avoid this scenario.

© www.soinside.com 2019 - 2024. All rights reserved.