- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
假设我有两个带有 XDCR 设置并具有以下节点的 couchbase 集群:
n1.cluster1.com
n2.cluster1.com
n3.cluster1.com
和
n1.cluster2.com
n2.cluster2.com
n3.cluster2.com
CouchbaseClient 最好的节点配置是什么?
从 http://docs.couchbase.com/couchbase-sdk-java-1.4/#hello-couchbase 开始
The CouchbaseClient class accepts a list of URIs that point to nodes in the cluster. If your cluster has more than one node, Couchbase strongly recommends that you add at least two or three URIs to the list. The list does not have to contain all nodes in the cluster, but you do need to provide a few nodes so that during the initial connection phase your client can connect to the cluster even if one or more nodes fail.
After the initial connection, the client automatically fetches cluster configuration and keeps it up-to-date, even when the cluster topology changes. This means that you do not need to change your application configuration at all when you add nodes to your cluster or when nodes fail. Also make sure you use a URI in this format:http://[YOUR-NODE]:8091/pools
. If you provide only the IP address, your client will fail to connect. We call this initial URI the bootstrap URI.
这是否意味着我应该从每个集群中至少添加两个或三个节点?还是整个系统中的两个或三个节点?
最佳答案
每个 CouchbaseClient
对象只会连接到一个集群。节点 URI 列表应该都属于同一个集群 - 如果您列出来自不同集群的节点,您可能会得到奇怪的行为。
如果您的应用程序想要连接到两个不同的集群(无论它们之间是否有复制流),那么您想要创建两个 CouchbaseClient
对象,一个连接到每个集群。
关于多个集群的CouchbaseClient配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26797968/
我正在尝试在我的应用程序中实现 couchbase。 我很困惑 com.couchbase.client.CouchbaseClient 和 com.couchbase.client.java.Cou
我想知道使用一个客户端比另一个客户端有什么优势。是否可以使用 MemcachedClient 连接到客户端 Moxi 实例? 最佳答案 性能。从 memcache->Membase 时代开始,Moxi
我正在尝试通过 CouchbaseClient 以编程方式检索给定存储桶中所有设计文档的列表。我关注了creating-views-from-sdk文档,但它只解释了如何创建 View 。我需要的是一
我们目前正在产品(未发布)中使用 Couchbase,但我们正在考虑在测试环境中使用 Couchbase Lite。但是我们可以使用 com.couchbase.client.CouchbaseCli
我是一名优秀的程序员,十分优秀!