你好,田晖同学,感谢你的建议;
我理解你是想通过限制运行中的sql最大数量来对doris集群保护,qps确实算是集群保护的一个方面,也值得去做。
不过我还有几个问题想了解下:
1 我不是很理解当前查询数量要被持久化的原因,我理解只需要把最大运行中的sql数量保存下就可以了
2 其次,这个最大qps的限制放到fe也是可以的,可以参考doris最大连接数的实现

最后,期望能够补充一个比较完整的设计文档,具体包含问题背景,方案设计以及用户手册

王博 Wang Bo
------------------------------------------------------------------------------------------------------------------
Hello, Tian Hui, thank you for your suggestion;
I understand that you want to protect the Doris cluster by limiting the
maximum number of running SQLs. QPS is indeed an aspect of cluster
protection, and it is worth doing.
However, I still have a few questions to ask:
1 I don't quite understand the reason why the current number of queries
should be persisted. I think that I only need to save the maximum number of
running sqls.
2 Secondly, this maximum qps limit can also be placed in fe, you can refer
to the implementation of the maximum number of connections in doris.
Finally, it is expected to be able to supplement a relatively complete
design document, including the problem background, scheme design and user
manual.

王博  Wang Bo

晖 <827677...@qq.com.invalid> 于2022年2月18日周五 12:07写道:

> 大家好,我是小米的田晖,由于 Doris 在小米公司内部得到了广泛的使用,对于集群稳定性有了更高的要求。通过对 Doris
> 服务相关指标的监控,我们认为有必要通过限制并发查询量来保护 Doris
> 集群。为了做到系统级别的限制,我认为通过同步各FE节点查询量来限制并发是当前最合适的方案,并基于bdbje同步查询数量信息实现了一版代码,PR地址:
> https://github.com/apache/incubator-doris/pull/7474
>
>
> 关于此PR目前有两点不同看法:
> 1. 是否应该基于bdbje同步查询数量
> &nbsp; &nbsp; &nbsp;
> 有观点认为各FE当前执行的查询数量是一个无状态信息,不应该被bdbje保存。但是其实当前查询数量也可以看作是一个变化比较频繁的状态信息,同时Doris目前也没有其他信息同步机制,所以我认为使用dbdje保存并同步也无不可。
> 2. 是否应该将此限制做到数据库系统内部
> &nbsp; &nbsp; &nbsp;
> 该观点认为有类似负载均衡器之类的外部模块可以做到相同的QPS限制。但是由于MySQL通信协议是基于传输层网络协议的,所以主流的Nginx和LVS
> 都没有相关的QPS限制功能,并且外部模块也不具备识别SQL类型的功能,我们这里只希望限制查询SQL,所以我认为将此限制做到数据库系统内部是合适的。
>
>
> 大家对于这个Feature是什么看法呢?请多多指教~

Reply via email to