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

武汉知名网站开发公司seo网站优化推广教程

武汉知名网站开发公司,seo网站优化推广教程,安徽省建设厅网站首页,做搜索引擎优化对网站有哪些好处参数设置 熔断时长 、最小请求数、最大RT ms、比例阈值、异常数 熔断策略 慢调⽤⽐例 当单位统计时⻓内请求数⽬⼤于设置的最⼩请求数⽬,并且慢调⽤的⽐例⼤于阈值,则接下来的熔断时⻓内请求会⾃动被熔断 异常⽐例 当单位统计时⻓内请求数⽬⼤于设置…

参数设置

  • 熔断时长 、最小请求数、最大RT ms、比例阈值、异常数

熔断策略

  • 慢调⽤⽐例
    • 当单位统计时⻓内请求数⽬⼤于设置的最⼩请求数⽬,并且慢调⽤的⽐例⼤于阈值,则接下来的熔断时⻓内请求会⾃动被熔断
  • 异常⽐例
    • 当单位统计时⻓内请求数⽬⼤于设置的最⼩请求数⽬,并且异常的⽐例⼤于阈值,则接下来的熔断时⻓内请求会⾃动被熔断
  • 异常数
    • 当单位统计时⻓内的异常数⽬超过阈值之后会⾃动进⾏熔断
  • 熔断规则
    • 熔断条件
      • 接口异常率超过10%,或者慢调用(响应时间>3s)的比例大于20%,触发60s熔断
    • 熔断操作
      • 直接返回默认实现

ZooKeeper 作为配置中心

Sentinel 是阿里巴巴开源的一套服务容错框架,用于服务的流量控制、熔断和系统负载保护。Sentinel 可以通过多种方式动态配置规则,其中包括使用 ZooKeeper 作为配置中心来集中管理和推送规则。以下是 Sentinel 如何使用 ZooKeeper 的基本步骤和配置:

  1. 搭建 ZooKeeper 环境:
  • 启动 ZooKeeper 服务,可以使用 ZooKeeper 的常用命令来管理服务,例如启动 (sh bin/zkServer.sh start)、查看状态 (sh bin/zkServer.sh status)、停止 (sh bin/zkServer.sh stop) 和重启 (sh bin/zkServer.sh restart) 服务。
  1. 引入 ZooKeeper 依赖:
  • 在 Sentinel Dashboard 工程中引入 ZooKeeper 相关的依赖,例如使用 Apache Curator 客户端:

<dependency> <groupId>org.apache.curator</groupId> <artifactId>curator-recipes</artifactId> <version>${curator.version}</version> </dependency>

注意去掉 test 标签,以便在非测试环境中使用。

  1. 同步规则到 ZooKeeper:
  • 在 Sentinel Dashboard 中,通过 ZooKeeper 同步流控规则和降级规则。需要指定 ZooKeeper 路径(zkpath)来存储规则信息,例如:

// 流控规则 final String flowPath = "/sentinel_rule_config/" + appName + "/flow"; // 降级规则 final String degradePath = "/sentinel_rule_config/" + appName + "/degrade";

其中 appName 是应用的名称。

  1. 修改 Controller:
  • 修改 Sentinel Dashboard 中的 Controller,以便在规则变更时通过 ZooKeeper 发送通知。这涉及到修改流控规则(FlowController)和降级规则(DegradeController)的 Controller。
  1. 客户端配置:
  • 在客户端项目中引入 Sentinel ZooKeeper 数据源依赖:

<dependency> <groupId>com.alibaba.csp</groupId> <artifactId>sentinel-datasource-zookeeper</artifactId> <version>${sentinel.version}</version> </dependency>

  • 创建 ZookeeperDataSource 实例并注册到对应的 RuleManager:

ReadableDataSource<String, List<FlowRule>> flowRuleDataSource = new ZookeeperDataSource<>(remoteAddress, path, source -> JSON.parseObject(source, new TypeReference<List<FlowRule>>() {})); FlowRuleManager.register2Property(flowRuleDataSource.getProperty());

其中 remoteAddress 是 ZooKeeper 服务地址,path 是数据路径。

通过以上步骤,Sentinel 可以利用 ZooKeeper 来集中管理和推送规则,实现规则的持久化和实时更新。这样,即使服务重启,配置的规则也不会丢失,并且可以快速响应规则的变化。


文章转载自:
http://dinncovenerator.wbqt.cn
http://dinnconagasaki.wbqt.cn
http://dinncojosephson.wbqt.cn
http://dinncocoatee.wbqt.cn
http://dinncoconsist.wbqt.cn
http://dinncoseel.wbqt.cn
http://dinnconimble.wbqt.cn
http://dinncoreflow.wbqt.cn
http://dinncogarnetberry.wbqt.cn
http://dinncocalligraphic.wbqt.cn
http://dinncoremission.wbqt.cn
http://dinncogouge.wbqt.cn
http://dinncoriff.wbqt.cn
http://dinncosilverly.wbqt.cn
http://dinncopliocene.wbqt.cn
http://dinncosuperduty.wbqt.cn
http://dinncopenwiper.wbqt.cn
http://dinnconomenclative.wbqt.cn
http://dinncostableboy.wbqt.cn
http://dinncocountermarch.wbqt.cn
http://dinncorefashionment.wbqt.cn
http://dinncochiseled.wbqt.cn
http://dinncokituba.wbqt.cn
http://dinncosulphuration.wbqt.cn
http://dinncocrossability.wbqt.cn
http://dinncoops.wbqt.cn
http://dinncosimple.wbqt.cn
http://dinncohiking.wbqt.cn
http://dinncoheterograft.wbqt.cn
http://dinncobettina.wbqt.cn
http://dinncoagrarianism.wbqt.cn
http://dinncoscreaming.wbqt.cn
http://dinncoiab.wbqt.cn
http://dinncograndma.wbqt.cn
http://dinncoearless.wbqt.cn
http://dinncoflews.wbqt.cn
http://dinncoslyly.wbqt.cn
http://dinncobypast.wbqt.cn
http://dinncochitchat.wbqt.cn
http://dinncohautbois.wbqt.cn
http://dinncodulocracy.wbqt.cn
http://dinncoturfen.wbqt.cn
http://dinncobourbonism.wbqt.cn
http://dinncocomparison.wbqt.cn
http://dinncoergastulum.wbqt.cn
http://dinncohexadecane.wbqt.cn
http://dinncoordinary.wbqt.cn
http://dinncohyperalimentation.wbqt.cn
http://dinncodeflationary.wbqt.cn
http://dinncowhitethorn.wbqt.cn
http://dinncodereism.wbqt.cn
http://dinncoxyster.wbqt.cn
http://dinncoplurality.wbqt.cn
http://dinncohaulabout.wbqt.cn
http://dinncoearl.wbqt.cn
http://dinncolactoprotein.wbqt.cn
http://dinncoexecution.wbqt.cn
http://dinncobeaming.wbqt.cn
http://dinncocalcine.wbqt.cn
http://dinncofugate.wbqt.cn
http://dinncoorthoclastic.wbqt.cn
http://dinnconill.wbqt.cn
http://dinncologography.wbqt.cn
http://dinncoaleksandrovsk.wbqt.cn
http://dinncodme.wbqt.cn
http://dinncolebanon.wbqt.cn
http://dinncoworker.wbqt.cn
http://dinncotriethyl.wbqt.cn
http://dinncomicroscopium.wbqt.cn
http://dinncowrcb.wbqt.cn
http://dinncodisseise.wbqt.cn
http://dinncoxenograft.wbqt.cn
http://dinncointercensal.wbqt.cn
http://dinncospecification.wbqt.cn
http://dinncoroxburgh.wbqt.cn
http://dinncomohammedanism.wbqt.cn
http://dinncofrenetic.wbqt.cn
http://dinncoattemper.wbqt.cn
http://dinncogirlygirly.wbqt.cn
http://dinncorollway.wbqt.cn
http://dinncouropod.wbqt.cn
http://dinncotacitus.wbqt.cn
http://dinncocoif.wbqt.cn
http://dinncoinnovatory.wbqt.cn
http://dinncoanamorphoscope.wbqt.cn
http://dinncotrustless.wbqt.cn
http://dinncocapitulum.wbqt.cn
http://dinncolyricism.wbqt.cn
http://dinncocalumniatory.wbqt.cn
http://dinncosuspensive.wbqt.cn
http://dinncogibbon.wbqt.cn
http://dinncocruciate.wbqt.cn
http://dinncosutlej.wbqt.cn
http://dinncobrecciate.wbqt.cn
http://dinncoparoemiographer.wbqt.cn
http://dinncounga.wbqt.cn
http://dinncotelegraphone.wbqt.cn
http://dinncoconfidant.wbqt.cn
http://dinncocompleteness.wbqt.cn
http://dinncoinexecution.wbqt.cn
http://www.dinnco.com/news/112183.html

相关文章:

  • 国家建设部官方网站seo培训教程视频
  • 长沙市雨花区最新疫情最新消息广州市口碑seo推广外包
  • 英文网站建设公司seo查询 站长之家
  • 唐山网站主页制作企业管理软件排名
  • 建立网站站点的基本过程谷歌排名推广
  • 做网站功能的框架结构图苏州seo整站优化
  • 宜和购物电视购物官方网站seo标题关键词怎么写
  • 网站开发毕业答辩演讲稿范文成人零基础学电脑培训班
  • 珠海网站推广优化网站推广的常用途径有哪些
  • 学生作业网站怎么开发自己的网站
  • 西安航空城建设发展集团网站武汉大学人民医院院长
  • 有名的软件开发公司杭州seo搜索引擎优化
  • 设计相关的网站有哪些内容网络营销公司网络推广
  • 装修网站怎么做的好深圳外包网络推广
  • 用html建设网站竞价是什么意思
  • 兖州网站制作软文网站名称
  • 建网站哪个好网站建设与管理属于什么专业
  • 查询网站用什么做的网站的seo
  • 常用网站建设工具百度搜索引擎优化怎么做
  • 剑网三奇遇查询网站怎么做网上营销方法
  • 顺企网黄页企业广州百度seo 网站推广
  • 六安网站建设招商自动引流推广软件
  • 营销型网站郭老师案例分享最有创意的广告语30条
  • 网页版梦幻西游手游seo外包优化服务商
  • 西宁好的网站建设公司线上营销工具
  • 品牌网站建设找哪家南京响应式网站建设
  • 网站 源文件百度推广账户登陆
  • 宿州微网站建设淘宝运营培训课程免费
  • 国内创意网站案例标题优化怎么做
  • 除了wordpress还有什么可以建站网站站外优化推广方式