简体   繁体   English

如何从集群外部连接到Cassandra

[英]How to connect to cassandra from outside the cluster

I am currently learning Cassandra using datastax tutorials and other online resources. 我目前正在使用datastax教程和其他在线资源来学习Cassandra。 I got the main concepts and feature of it, but I miss one crucial thing of the whole picture, which is how to connect to Cassandra from outside the cluster. 我了解了它的主要概念和功能,但是我错过了整个过程的关键一件事,那就是如何从集群外部连接到Cassandra。

More in detail, the information I cannot find is whether Cassandra needs a node of the cluster to act as a sever for incoming requests and to dispatch them to the other ones, or if it comes with an embedded mechanism to balance them in the cluster. 更详细地讲,我找不到的信息是Cassandra是否需要集群的节点来充当传入请求的服务器并将其分派给其他请求,或者它是否带有嵌入式机制来平衡集群中的请求。 Any kind of information (from low-level to advanced) is welcome. 欢迎提供任何信息(从低级到高级)。

Thank you all in advance! 谢谢大家!

Typically one would connect using one of the native protocol client drivers . 通常,将使用本机协议客户端驱动程序之一进行连接。 The drivers take as configuration one or more server nodes as "contact points". 驱动程序将一个或多个服务器节点作为“联系点”作为配置。 They connect to one of these nodes and read server metadata to "discover" the rest of the cluster. 它们连接到这些节点之一,并读取服务器元数据以“发现”集群的其余部分。

While any node in the cluster can act as a request coordinator, drivers also use some type of load balancing to spread traffic over the cluster, and routing to send requests to nodes that actually have replicas (avoiding unnecessary hops). 尽管群集中的任何节点都可以充当请求协调器,但驱动程序还使用某种类型的负载平衡来在群集中分布流量,并通过路由将请求发送到实际具有副本的节点(避免不必要的跃点)。

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

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