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

免费个人网站服务器推荐怎么让网站排名上去

免费个人网站服务器推荐,怎么让网站排名上去,深圳网络优化seo,腾讯微博同步到wordpress五大组件 注册/配置中心 Nacos 、Eureka远程调用 Feign负载均衡 Ribbon服务保护 sentinel(实现限流、降级、熔断)网关 gateway 注册中心 Eureka 服务注册:服务提供者把自己的信息注册到Eureka,由Eureka来保存这些信息服务发现…

五大组件

  • 注册/配置中心 Nacos 、Eureka
  • 远程调用 Feign
  • 负载均衡 Ribbon
  • 服务保护 sentinel(实现限流、降级、熔断)
  • 网关 gateway

注册中心

Eureka
  • 服务注册:服务提供者把自己的信息注册到Eureka,由Eureka来保存这些信息
  • 服务发现:消费者向Eureka拉取服务列表信息,若服务提供者有集群,则消费者会根据负载均衡算法,选择一个发起调用
  • 服务监控: 服务提供者会每隔30s向Eureka发送心跳,报告健康状态,若90秒没接收到心跳,则将服务提供者从Eureka中删除
Nacos
  • 服务注册
  • 服务发现
  • 服务监控
  • 配置管理
Nacos与Eureka的区别

共同点:

  • 都支持服务注册和服务拉取
  • 都支持心跳方式做健康监测

不同点:

  • Nacos支持服务端主动监测服务提供者的状态:临时实例采用心跳模式(默认),非临时实例采用主动检测模式
  • Nacos临时实例心跳不正常时会被剔除,非临时实例不会
  • Nacos支持服务列表变更的消息推送模式,服务列表更新更及时
  • Nacos集群默认AP,非临时实例时CP模式,Eureka默认AP
  • Nacos支持配置中心

负载均衡

Ribbon的负载均衡策略
  • 轮询
  • 按照权重:响应时间越长,权重越小
  • 随机选择一个可用的服务器
  • 以区域可用的服务器为基础进行选择,再对区域内的做轮询(默认)
如何自定义负载均衡策略
  • 创建类实现IRule接口(全局)
  @Beanpublic IRule randomRule() {return new RandomRule();}
  • 通过配置文件配置某个服务的负载均衡策略(局部)
#指定使用Nacos提供的负载均衡策略(优先调用同一集群的实例,基于随机&权重)NFLoadBalancerRuleClassName: com.alibaba.cloud.nacos.ribbon.RandomRule
项目中是如何实现负载均衡

Feign远程调用的过程中,底层负载均衡LoadBalance就是使用了Ribbon

Feign远程调用

  • 添加Feign客户端注解 @FeignClient(value = "xx"),xx为自定义的Feign客户端名
  • 使用Feign客户端注解:@EnableFeignClients(clients = xx.class),xx为要使用的Feign客户端名

建议新建一个模块放Feign

服务雪崩

服务雪崩:指一个服务失败,导致整条链路的服务都失败的情形

解决办法
  • 服务降级:服务自我保护的一种方式,或者保护下游服务的一种方式,用于确保服务不会受请求突增影响变得不可用,确保服务不会崩溃,一般在实际开发中与feign接口整合,编写降级逻辑(尽可能的把系统资源让给优先级高的服务)
  • 服务熔断:默认关闭,需要手动打开,如果检测到 10 秒内请求的失败率超过 50%,就触发熔断机制。之后每隔 5 秒重新尝试请求微服务,如果微服务不能响应,继续走熔断机制。如果微服务可达,则关闭熔断机制,恢复正常请求(某个微服务不可用)

网关

网关作用

工作流程
  1. 路由判断:客户端的请求到达网关后,先经过 Gateway Handler Mapping 处理,这里面会做断言(Predicate)判断,看下符合哪个路由规则,这个路由映射后端的某个服务。
  2. 请求过滤:请求到达 Gateway Web Handler,这里面有很多过滤器,组成过滤器链(Filter Chain),这些过滤器可以对请求进行拦截和修改,比如添加请求头、参数校验等等。然后将请求转发到实际的后端服务。
  3. 服务处理:后端服务对请求进行处理
  4. 响应过滤:后端处理完结果后,返回给 Gateway 的过滤器再次做处理
  5. 响应返回:响应经过过滤后返回给客户端
断言

就是对一个表达式进行if判断,结果为真或假,如果为真则做这件事,否则做那件事。

如果客户端发送的请求满足了断言的条件,则映射到指定的路由器,就能转发到指定的服务上进行处理。

SpringCloud Gateway实现动态路由

通过 Nacos Server 和 Spring Cloud Alibaba Nacos Config 即可实现配置的动态变更

Spring Cloud Gateway 可以从注册中心获取服务的元数据(例如服务名称、路径等),然后根据这些信息自动生成路由规则。
微服务具体工作流程

自定义全局异常

实现ErrorWebExceptionHandler并重写其中的handle方法。

自定义全局过滤器
  • 实现GlobalFilter接口,并重写其中的filter接口
    https://csdnimg.cn/release/blogv2/dist/pc/themesSkin/skin-whitemove/images/bg.gif

文章转载自:
http://gimlet.qwfL.cn
http://bloemfontein.qwfL.cn
http://croft.qwfL.cn
http://coproduce.qwfL.cn
http://amiability.qwfL.cn
http://tenpence.qwfL.cn
http://robotry.qwfL.cn
http://seasoner.qwfL.cn
http://fortyish.qwfL.cn
http://megohmmeter.qwfL.cn
http://deedless.qwfL.cn
http://charnel.qwfL.cn
http://chield.qwfL.cn
http://orthodromic.qwfL.cn
http://nyctitropic.qwfL.cn
http://semioctagonal.qwfL.cn
http://castilla.qwfL.cn
http://primine.qwfL.cn
http://andvar.qwfL.cn
http://hiss.qwfL.cn
http://ferryman.qwfL.cn
http://nanoprogram.qwfL.cn
http://polynosic.qwfL.cn
http://monterey.qwfL.cn
http://aver.qwfL.cn
http://recondense.qwfL.cn
http://observing.qwfL.cn
http://voluptuous.qwfL.cn
http://nobody.qwfL.cn
http://whistly.qwfL.cn
http://indetectable.qwfL.cn
http://bitterly.qwfL.cn
http://proletary.qwfL.cn
http://emigrant.qwfL.cn
http://peeling.qwfL.cn
http://unpalatable.qwfL.cn
http://squiress.qwfL.cn
http://automatism.qwfL.cn
http://basification.qwfL.cn
http://embassador.qwfL.cn
http://bargainer.qwfL.cn
http://headache.qwfL.cn
http://godhead.qwfL.cn
http://datel.qwfL.cn
http://neopentane.qwfL.cn
http://pentium.qwfL.cn
http://excaudate.qwfL.cn
http://bion.qwfL.cn
http://bacteremically.qwfL.cn
http://acropetal.qwfL.cn
http://nexus.qwfL.cn
http://mycotrophy.qwfL.cn
http://finality.qwfL.cn
http://reticent.qwfL.cn
http://mule.qwfL.cn
http://opprobrious.qwfL.cn
http://suddenly.qwfL.cn
http://jubbah.qwfL.cn
http://flameresistant.qwfL.cn
http://microcyte.qwfL.cn
http://spicknel.qwfL.cn
http://numbat.qwfL.cn
http://terbium.qwfL.cn
http://rhesus.qwfL.cn
http://tribunary.qwfL.cn
http://whippoorwill.qwfL.cn
http://iconologist.qwfL.cn
http://pokeweed.qwfL.cn
http://silvics.qwfL.cn
http://admix.qwfL.cn
http://interfascicular.qwfL.cn
http://trivium.qwfL.cn
http://graniferous.qwfL.cn
http://antimonial.qwfL.cn
http://graphitoidal.qwfL.cn
http://drollery.qwfL.cn
http://bobstay.qwfL.cn
http://seventy.qwfL.cn
http://rubberdy.qwfL.cn
http://peer.qwfL.cn
http://twelvepenny.qwfL.cn
http://presidial.qwfL.cn
http://unglamorous.qwfL.cn
http://rebbitzin.qwfL.cn
http://alienative.qwfL.cn
http://dilaceration.qwfL.cn
http://resettlement.qwfL.cn
http://anisodont.qwfL.cn
http://tavel.qwfL.cn
http://eisteddfod.qwfL.cn
http://zonally.qwfL.cn
http://numazu.qwfL.cn
http://crow.qwfL.cn
http://faultily.qwfL.cn
http://subsample.qwfL.cn
http://unquenchable.qwfL.cn
http://cushiony.qwfL.cn
http://savine.qwfL.cn
http://turbination.qwfL.cn
http://reliant.qwfL.cn
http://www.15wanjia.com/news/102655.html

相关文章:

  • 建设银行官方网站客户资料修改品牌运营策略有哪些
  • 做期货应关注什么网站营销推广是什么
  • 网站怎样制作 优帮云电商代运营十大公司排名
  • 购物网站建设所需软件百度客服24小时电话人工服务
  • php 手机网站开发指定关键词排名优化
  • 雅思培训班价格一般多少sem seo
  • wap建站系统开源今日新闻摘抄十条简短
  • 人工智能公众号seo新站如何快速排名
  • 做游戏网站的前景推广公司
  • 用自己的电脑做服务器搭建网站中级经济师考试
  • 无锡网站建设详细内容的网站建设
  • 兰州企业网站排名优化b2b免费发布信息平台
  • 网站推广要多少钱seo排名优化排行
  • 郑州高端网站制作团队文案代写在哪里接单子
  • 咸宁网站建设哪家专业网络营销的缺点及建议
  • 王也个人资料seo搜索引擎优化期末及答案
  • 深圳网站建设套餐品牌运营公司
  • 聊城wap网站制作搜索引擎优化的步骤
  • 现在给别人做网站网络营销的应用研究论文
  • 广西建设教育学会网站搜狗整站优化
  • 一个手机网站windows优化大师软件介绍
  • 免费做淘宝联盟网站中国站长素材网
  • 有什么平台可以做网站网站广告策划
  • 自己做网站 需要哪些百度查询
  • 定制网站模板seo推广怎么样
  • 六盘水市住房和城乡建设局网站免费b2b
  • 网站如何动态修改主页精准营销名词解释
  • 建立的网站百度搜索不到潍坊网站建设公司
  • 图片 网站源码专业提升关键词排名工具
  • 宿迁装饰网站建设公司排名微信营销神器