我在node.js 中使用cassandra-driver 模块。我的用例是,当 Cassandra Node 由于某种原因关闭时,我会在 UI 中发出通知“DB 处于关闭状态”。
基本上,我应该能够在 casssandra 宕机后立即使用 node.js 中的 cassandra-driver 捕获信息
感谢任何帮助。
最佳答案
您可以定期 check the client.hosts
for nodes that are down 。或者也许更好 define hooks like hostDown
, etc. ,并使用它们来决定集群是否不可用。
关于node.js - 如何使用node.js检查cassandra的状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59602399/