简体   繁体   English

Couchbase Java SDK中有没有一种方法可以不列出要连接的节点?

[英]Is there a way in the Couchbase Java SDK to not list the nodes to connect to?

Today I see people in example code do a list of FQDNs or IPs for nodes in the cluster to bootstrap connection string for the application code. 今天,我看到示例代码中的人为群集中的节点列出了FQDN或IP,以引导应用程序代码的连接字符串。 Is there a different/better way of doing this? 有其他/更好的方法吗? Something that does not require maintaining the list in a file, code or somewhere? 是否不需要在文件,代码或其他位置维护列表?

OK, found it. 好,找到了。 You can use a DNS SRV record. 您可以使用DNS SRV记录。 It is buried at the bottom of the managing connections page of the newer documentation under "Bootstrapping through DNS SRV". 它埋在较新文档的“管理连接通过DNS SRV”下的“管理连接”页面的底部。 http://docs.couchbase.com/developer/java-2.1/managing-connections.html http://docs.couchbase.com/developer/java-2.1/managing-connections.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM