简体   繁体   English

如何在Ksql Server上分配查询

[英]How query are distributed on Ksql Server

thinking about scaling, i wonder how queries are distributed among KSQL Servers ? 考虑扩展时,我想知道如何在KSQL Server之间分配查询?

1 - Let say you have the cli or confluent control center, does the cli connect to all server or one of them ? 1-假设您有cli或融合控制中心,cli是否连接到所有服务器或其中一台? Can it send the query to multiple KSQL SERVER eg those with the same id (ie Pool id) ? 是否可以将查询发送到多个KSQL SERVER,例如具有相同ID(即池ID)的KSQL SERVER?

2 - Can we have multiple instance of the same query running on multiple KSQL SERVER ? 2-我们可以在多个KSQL SERVER上运行同一查询的多个实例吗? if yes how does that work, eg with respect to consumer group or partitions ? 如果是的话,那是如何工作的,例如关于消费者组或分区?

3 - Can we have multiple instance of the same query running on the same KSQL SERVER ? 3-我们可以在同一KSQL SERVER上运行同一查询的多个实例吗?

@Robin Moffatt please correct if i am wrong: @Robin Moffatt,如果我错了,请纠正:

1 - Let say you have the cli or confluent control center, does the cli connect to all server or one of them ? 1-假设您有cli或融合控制中心,cli是否连接到所有服务器或其中一台? Can it send the query to multiple KSQL SERVER eg those with the same id (ie Pool id) ? 是否可以将查询发送到多个KSQL SERVER,例如具有相同ID(即池ID)的KSQL SERVER?

It seems like not. 好像没有。 One connect to one KSQL SERVER, and the command will be forwarded to the Command Topic, which will be red by all KSQL SERVER. 一个连接到一个KSQL SERVER,该命令将转发到“命令主题”,所有KSQL SERVER会将其显示为红色。

2 - Can we have multiple instance of the same query running on multiple KSQL SERVER ? 2-我们可以在多个KSQL SERVER上运行同一查询的多个实例吗? if yes how does that work, eg with respect to consumer group or partitions ? 如果是的话,那是如何工作的,例如关于消费者组或分区?

Yes, the query is send to one KSQL SERVER, which forward it to the command topic, from which other KSQL SERVERs picks up and run. 是的,查询被发送到一个KSQL SERVER,该查询将其转发到命令主题,其他KSQL SERVER从该主题开始并运行。 I suspect there must be coordination, to avoid over-provisioning the query. 我怀疑必须进行协调,以避免过度配置查询。 Otherwise if each Server Automatically run the command, we may end with more topology instance than there is partition. 否则,如果每个服务器自动运行该命令,则我们可能会以比分区更多的拓扑实例结束。 Can you clarify that last part ? 您能澄清一下最后一部分吗?

3 - Can we have multiple instance of the same query running on the same KSQL SERVER ? 3-我们可以在同一KSQL SERVER上运行同一查询的多个实例吗?

No we can't. 不,我们不能。 Only one instance of a query per server, however, that query my be set to have a certain number of Thread. 每个服务器仅一个查询实例,但是该查询可以设置为具有一定数量的线程。 Each Thread is " some sort of independent instance of the application ", or a unit of parallelism in Kafka Jargon. 每个线程都是“ 某种形式的应用程序独立实例 ”,或者是Kafka Jargon中的并行单元。 In fact i would say more specifically, each Thread is an independent instantiation of the Topology. 实际上,我会更具体地讲,每个线程都是拓扑的独立实例。

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

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