简体   繁体   English

Postgres-XL 负载均衡

[英]Postgres-XL Load Balancing

Postgres-XL Documentations and also overview describes load balancing as a distinct part of the system. Postgres-XL 文档和概述将负载平衡描述为系统的一个独特部分。

Am I correct and it is up to Postgres-XL users to load balance or is there specific a way of doing load balance (using load information of coordinators etc.) operation and making it high available?我是否正确并且由 Postgres-XL 用户来进行负载平衡,或者是否有特定的方法来进行负载平衡(使用协调器的负载信息等)操作并使其高可用?

I think that the question has not been well answered since postgres-xl supports the configuration of several coordinators as explained on their page https://www.postgres-xl.org/documentation/tutorial-arch.html where says: Postgres-XL allows multiple Coordinators to accept statements from applications independently but in an integrated way.我认为这个问题没有得到很好的回答,因为 postgres-xl 支持几个协调器的配置,如其页面https://www.postgres-xl.org/documentation/tutorial-arch.html中所述:Postgres-XL允许多个协调器独立但以集成方式接受来自应用程序的语句。 Any writes from any Coordinator is available from any other Coordinators.来自任何协调器的任何写入都可以从任何其他协调器获得。 They acts as if they are single database.它们就像是单个数据库一样。 The Coordinator's role is to accept statements, find what Datanodes are involved, send query plans on to the appropriate Datanodes if needed, collect the results and write them back to applications. Coordinator 的作用是接受语句,查找涉及哪些 Datanode,如果需要,将查询计划发送到适当的 Datanode,收集结果并将它们写回应用程序。

The Coordinator does not store any user data.协调器不存储任何用户数据。 It stores only catalog data to determine how to process statements, where the target Datanodes are, among others.它只存储目录数据以确定如何处理语句、目标数据节点在哪里等。 Therefore, you don't have to worry about Coordinator failure much.因此,您不必太担心 Coordinator 失败。 When the Coordinator fails, you can just switch to the other one.当 Coordinator 出现故障时,您可以切换到另一个。 So the question is aimed at how to have a load balancer that connects the application with the coordinators of postgres-xl, in which a solution such as nginx or HAPproxy can enter, a solution is nginx with its stream modulethat can connect nginx as load balancer to postgres-xl所以问题是针对如何有一个负载均衡器将应用程序与postgres-xl的coordinators连接起来,其中nginx或HAPproxy等解决方案可以进入,一个解决方案是nginx自带流模块,可以连接nginx作为负载均衡器到 postgres-xl

If you want to use nginx as a load balancer between your application and the postgres-xd database, use the ngx_stream module the configuration is in the link http://nginx.org/en/docs/stream/ngx_stream_core_module.html如果您想使用 nginx 作为您的应用程序和 postgres-xd 数据库之间的负载均衡器,请使用 ngx_stream 模块,配置位于链接http://nginx.org/en/docs/stream/ngx_stream_core_module.html

Postgres-XL does not have HA features. Postgres-XL 没有 HA 特性。 You can put a load balancer in front of the coordinator nodes so they will have redundancy on that part.您可以在协调器节点之前放置一个负载平衡器,以便它们在该部分具有冗余。 The nodes have no fail over support though so the loss on any one node anywhere will cause the entire cluster to fail.但是节点没有故障转移支持,因此任何地方的任何一个节点的丢失都会导致整个集群失败。 You can setup mirror nodes but even with that it will require manual intervention if a node fails, and that obviously doubles the amount of hardware you need.您可以设置镜像节点,但即便如此,如果节点出现故障,也需要手动干预,这显然会使您需要的硬件数量增加一倍。

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

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