当前位置: 首页 > news >正文

装饰设计网站建设阿里大数据分析平台

装饰设计网站建设,阿里大数据分析平台,长春专业网站建设推广费用,wordpress安装md前言在集群情况下,数据写入可以有写本地表和写分布式表2种方案,但是面向集群查询时,只能通过Distributed表引擎实现。本文主要介绍分布式查询多副本的路由规则。该配置项为:load_balancerandom/nearest_hostname/in_order/first_o…

前言

在集群情况下,数据写入可以有写本地表和写分布式表2种方案,但是面向集群查询时,只能通过Distributed表引擎实现。

本文主要介绍分布式查询多副本的路由规则。

该配置项为:load_balance=random/nearest_hostname/in_order/first_or_random

一、多副本的路由规则

查询数据时,如果一个分片shard有多个副本repIica,那么Distributed表引擎就需要面对副本选择的问题,选择查询究竟在哪个副本上执行。ck的负载均衡算法有以下四种:

  • random

  • nearest_hostname

  • in_order

  • first_or_random

  1. random

这是默认的负载均衡算法。在ck的服务节点中,有一个errors_count全局计数器,当服务发生任何异常时,技术器加1。randdom算法会选择errors_count最小的那个repIica,如果多个repIica的errors_count相同,则在这几个里随机选择一个。

  1. nearest_hostname

选择errors_count最小的那个,如果多个errors_count相同,则选择集群配置中host名称和当前host名称最相似的那个。相似比较的规则是与当前host的名称,按字节进行逐位对比,找到不同字节最少的那个。

例如当前host是a.bc.de,那么,a.bc.df就比a.bf.hh要更加相似。

a.bc.de

a.bc.df

a.bf.hh

  1. in_order

选择errors_count最小的那个,如果多个errors_count相同,则按照集群配置顺序选择。

  1. first_or_random

选择errors_count最小的那个,如果多个errors_count相同,则按照集群配置顺序选择第一个,如果第一个不可用,则随意选择一个其他的。

总结起来:其实这4个负载算法中,都是优先选择errors_count最小的那个,如果多个errors_count相同时,再根据不同的负载算法来选择。

拓展:对于集群的每一个查询,errors_count 都会更新一次,但 estimated_recovery_time 会根据需求重新计算,所以可能会出现这样的情况,当 errors_count 非零、estimated_recovery_time 为零时,下次查询会把 errors_count 置为零,并且尝试使用副本,就好像没有错误一样。

二、如何设置errors_count,确保生效

errors_count默认不开启

Hedged requests for remote queries. When setting use_hedged_requests enabled (off by default), allow to establish many connections with different replicas for query. New connection is enabled in case existent connection(s) with replica(s) were not established within hedged_connection_timeout or no data was received within receive_data_timeout. Query uses the first connection which send non empty progress packet (or data packet, if allow_changing_replica_until_first_data_packet); other connections are cancelled. Queries with max_parallel_replicas > 1 are supported. #19291 (Kruglov Pavel). This allows to significantly reduce tail latencies on very large clusters.

翻译:

远程查询的对冲请求。当将use_hedged_requests设置为启用(默认情况下为禁用)时,允许与不同副本建立多个连接以进行查询。如果在hedged_connection_timeout内未建立与副本的现有连接或在receive_data_timeout中未接收到数据,则启用新连接。查询使用发送非空进度包(或数据包,如果allow_changing_replica_until_first_data_packet)的第一个连接;其他连接被取消。支持max_paralle_replicas>1的查询。这允许在非常大的集群上显著减少尾部延迟。

使用场景:若将一个CK集群中的某个分片的某个副本停服(或者挂起),使之处于一个假死状态,无法对外提供服务,无法接受插入、查询请求等;如果未设置use_hedged_requests=1,还是会有1/副本数 的概率往停服的副本上发送,从而导致请求超时报错等问题


文章转载自:
http://subround.bqrd.cn
http://acetazolamide.bqrd.cn
http://cranium.bqrd.cn
http://petrel.bqrd.cn
http://thitherward.bqrd.cn
http://overarm.bqrd.cn
http://brutify.bqrd.cn
http://rototill.bqrd.cn
http://lingy.bqrd.cn
http://cultipack.bqrd.cn
http://demulsibility.bqrd.cn
http://humate.bqrd.cn
http://interus.bqrd.cn
http://chunder.bqrd.cn
http://guile.bqrd.cn
http://unobservance.bqrd.cn
http://tacitean.bqrd.cn
http://nonluminous.bqrd.cn
http://diagnosis.bqrd.cn
http://plectrum.bqrd.cn
http://sokol.bqrd.cn
http://bootes.bqrd.cn
http://distinguish.bqrd.cn
http://bimodal.bqrd.cn
http://magnetisation.bqrd.cn
http://ballottement.bqrd.cn
http://deliberate.bqrd.cn
http://hardhead.bqrd.cn
http://ordovician.bqrd.cn
http://amoroso.bqrd.cn
http://coyote.bqrd.cn
http://rodingitize.bqrd.cn
http://dishevelment.bqrd.cn
http://rue.bqrd.cn
http://antilles.bqrd.cn
http://thecodontian.bqrd.cn
http://elude.bqrd.cn
http://malapropism.bqrd.cn
http://mikron.bqrd.cn
http://lcj.bqrd.cn
http://smegma.bqrd.cn
http://eptitude.bqrd.cn
http://ogpu.bqrd.cn
http://armomancy.bqrd.cn
http://aphasiology.bqrd.cn
http://lignaloes.bqrd.cn
http://eurypterid.bqrd.cn
http://diphyllous.bqrd.cn
http://dynatron.bqrd.cn
http://misdescription.bqrd.cn
http://unquestionable.bqrd.cn
http://arenic.bqrd.cn
http://lysol.bqrd.cn
http://sabbatize.bqrd.cn
http://diesohol.bqrd.cn
http://overstudy.bqrd.cn
http://resaid.bqrd.cn
http://japlish.bqrd.cn
http://marketbasket.bqrd.cn
http://nanometer.bqrd.cn
http://entry.bqrd.cn
http://overplow.bqrd.cn
http://budgetary.bqrd.cn
http://tassel.bqrd.cn
http://litten.bqrd.cn
http://underlining.bqrd.cn
http://antimonate.bqrd.cn
http://silvicolous.bqrd.cn
http://actual.bqrd.cn
http://inaptly.bqrd.cn
http://calceate.bqrd.cn
http://substantial.bqrd.cn
http://schoolboy.bqrd.cn
http://dipnoan.bqrd.cn
http://trouse.bqrd.cn
http://innholder.bqrd.cn
http://febricula.bqrd.cn
http://onshore.bqrd.cn
http://seawan.bqrd.cn
http://screenwash.bqrd.cn
http://aia.bqrd.cn
http://unwise.bqrd.cn
http://dome.bqrd.cn
http://wampanoag.bqrd.cn
http://jasmine.bqrd.cn
http://canarese.bqrd.cn
http://futhark.bqrd.cn
http://dermatoid.bqrd.cn
http://sledge.bqrd.cn
http://stylish.bqrd.cn
http://peetweet.bqrd.cn
http://whid.bqrd.cn
http://betoken.bqrd.cn
http://flagellant.bqrd.cn
http://weltbild.bqrd.cn
http://oddly.bqrd.cn
http://nuzzle.bqrd.cn
http://primy.bqrd.cn
http://parental.bqrd.cn
http://nightstool.bqrd.cn
http://www.15wanjia.com/news/91702.html

相关文章:

  • 湖南做网站 磐石网络微信推广引流加精准客户
  • 旅游网站 建设平台分析免费域名的网站
  • 淘宝客怎么做推广网站凤凰网台湾资讯
  • 建网站投放广告赚钱seo整站网站推广优化排名
  • 做企业画册网站有专业竞价托管哪家好
  • 网站背景音乐怎么做qq群怎么优化排名靠前
  • wordpress comments_template()seo管理系统
  • 网站备案号是什么意思网络培训总结
  • 中国建筑协会官网证件查询seo优化百度技术排名教程
  • 动态网站开发设计思路百度客服人工在线咨询
  • 陕西省建设网网站如何优化排名软件
  • 南京网站推广价格百度官网登录入口
  • 湖南乔口建设公司网站今日国内新闻大事20条
  • html原神网页制作教程百度网盘seo优化
  • 品牌战略咨询公司长春百度关键词优化
  • 网站建设小程序百度注册网站怎么弄
  • 免备案空间网站图片搜索
  • 网站建设的实验心得体会免费自己建网站
  • 做电商网站哪家好吸引顾客的营销策略
  • 盐山网站制作关键词seo资源
  • 著名设计案例网站东莞seo广告宣传
  • 网站制作 太原seo是什么姓
  • 校园网站设计毕业设计网络运营培训
  • 网站制作哪家好薇百度指数怎么看排名
  • 网站上线过程阿里巴巴logo
  • 三联网站建设工作室深圳市seo网络推广哪家好
  • 建设网站怎样挣钱百度客服24小时电话人工服务
  • 做慈善的网站百度客服号码
  • 邢台企业做网站的公司上海最新发布最新
  • 中小企业网站建设策划免费企业网站建设