How to set the downgrading policy in Cassandra using nodejs

早过忘川 提交于 2019-12-02 06:16:42

There is no downgrading consistency retry policy in nodejs. This is a good thing imho, it doesn't make much sense in context of C* consistency guarantees. People can always write own retry policy to do it if really need it, but to be there by default encourages a dangerous setup that can violate consistency expectations at unexpected/random times.

However, if you are thinking about a using downgrading retry policy, just use CL.ONE and a normal policy. You would have to assume that all queries will execute at that anyway or your application would not be safe. So might as well get the performance improvements of the reduced consistency level.

Unless theres a strong reason for it, you will be best served just sticking with the default TokenAwarePolicy wrapping DCAwareRoundRobinPolicy. Just DCAwareRoundRobinPolicy probably best for stability.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!