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

怎么给幼儿园做网站网站建站网站

怎么给幼儿园做网站,网站建站网站,北京软件开发公司排名榜,机械设计制造及其自动化圳建设网站😀前言 本篇博文是关于SpringCloud Gateway的基本介绍,希望你能够喜欢 🏠个人主页:晨犀主页 🧑个人简介:大家好,我是晨犀,希望我的文章可以帮助到大家,您的满意是我的动力…

😀前言
本篇博文是关于SpringCloud Gateway的基本介绍,希望你能够喜欢

🏠个人主页:晨犀主页
🧑个人简介:大家好,我是晨犀,希望我的文章可以帮助到大家,您的满意是我的动力😉😉

💕欢迎大家:这里是CSDN,我总结知识的地方,欢迎来到我的博客,感谢大家的观看🥰
如果文章有什么需要改进的地方还请大佬不吝赐教 先在此感谢啦😊

文章目录

  • SpringCloud Gateway
    • Gateway 介绍
      • 看一个需求,引出网关服务
      • Gateway 网络拓扑图
      • Gateway 是什么
      • 官网
      • Gateway 核心功能
      • Gateway VS Zuul
        • Gateway 和Zuul 区别
        • Gateway 特性
    • Gateway 基本原理
      • Gateway 核心组件
        • 一张图
        • 解读:
        • Route(路由)
        • Predicate(断言)
        • Filter(过滤)
      • How It Works 工作机制
        • 示意图
        • 梳理流程(how to work)

SpringCloud Gateway

Gateway 介绍

看一个需求,引出网关服务

1、有一个前后端分离项目, 分析如图

image-20230827183212602

2、使用网关服务, 重构项目架构

image-20230827183233479

Gateway 网络拓扑图

image-20230827183445415

Gateway 是什么

image-20230827183508236

  1. Gateway 是在Spring 生态系统之上构建的API 网关服务,基于Spring ,Spring Boot 和ProjectReactor 等技术。
  2. Gateway 旨在提供一种简单而有效的方式来对API 进行路由,以及提供一些强大的过滤器功能,例如∶熔断、限流、重试等

官网

官网地址: https://cloud.spring.io/spring-cloud-static/spring-cloud-gateway/2.2.1.RELEASE/reference/html/

Gateway 核心功能

1. 鉴权
2. 流量控制
3. 熔断
4. 日志监控
5.  反向代理

Gateway VS Zuul

Gateway 和Zuul 区别
  1. SpringCloud Gateway 作为Spring Cloud 生态系统中的网关,目标是替代Zuul
  2. SpringCloud Gateway 是基于Spring WebFlux 框架实现的
  3. Spring WebFlux 框架底层则使用了高性能的Reactor 模式通信框架Netty , 提升了网关性能
Gateway 特性

Spring Cloud Gateway 基于Spring Framework(支持Spring WebFlux),Project Reactor 和Spring Boot 进行构建,具有如下特性:

  1. 动态路由
  2. 可以对路由指定Predicate(断言)和Filter(过滤器)
  3. 集成Hystrix的断路器功能
  4. 集成Spring Cloud 服务发现功能
  5. 请求限流功能
  6. 支持路径重写

Gateway 基本原理

Gateway 核心组件

一张图

image-20230827183754107

解读:
  1. web 请求,通过一些匹配条件,定位到真正的服务节点/微服务模块,在这个转发过程的前后,进行一些精细化控制。
  2. predicate: 就是匹配条件。
  3. filter: 可以理解为是网关的过滤机制。有了predicate 和filter,再加上目标URL.就可以实现一个具体的路由。
Route(路由)

说明: 路由是构建网关的基本模块,它由ID,目标URI,一系列的断言和过滤器组成,如果断言为true 则匹配该路由.

Predicate(断言)

1、说明: 对HTTP 请求中的所有内容(例如请求头或请求参数)进行匹配,如果请求与断言相匹配则进行路由。

2、简单举例, 比如配置路径, - Path=/member/get/** #断言,路径相匹配的进行路由转发, 如果Http 请求的路径不匹配, 则不进行路由转发.

Filter(过滤)

1、一句话: 使用过滤器,可以在请求被路由前或者之后对请求进行处理。

2、你可以理解成, 在对Http 请求断言匹配成功后, 可以通过网关的过滤机制, 对Http 请求处理。

3、简单举例:

filters:- AddRequestParameter=color, blue #过滤器在匹配的请求头加上一对请求头,名称为color 值为blue, 比如原来的http 请求是http://localhost:10000/member/get/1 ==过滤器处理=>http://localhost:10000/member/get/1?color=blue

How It Works 工作机制

示意图

image-20230827223314910

image-20230827223329323

梳理流程(how to work)
  1. 客户端向Spring Cloud Gateway 发出请求。然后在Gateway Handler Mapping 中找到与请求相匹配的路由,将其发送到Gateway Web Handler。
  2. Handler 再通过指定的过滤器链来将请求发送到我们实际的服务执行业务逻辑,然后返回。
  3. 过滤器之间用虚线分开是因为过滤器可能会在发送代理请求之前(“pre”)或之后(“post”)执行业务逻辑。
  4. Filter 在"pre"类型的过滤器可以做参数校验、权限校验、流量监控、日志输出、协议转换等,
  5. 在"post"类型的过滤器中可以做响应内容、响应头的修改,日志的输出,流量监控等有着非常重要的作用。
    一句话说:路由转发+执行过滤器链

文章到这里就结束了,如果有什么疑问的地方请指出,诸大佬们一起来评论区一起讨论😁
希望能和诸大佬们一起努力,今后我们一起观看感谢您的阅读🍻
如果帮助到您不妨3连支持一下,创造不易您们的支持是我的动力🤞


文章转载自:
http://epistoler.gthc.cn
http://cindy.gthc.cn
http://imbalance.gthc.cn
http://glycerine.gthc.cn
http://biconvex.gthc.cn
http://extrarenal.gthc.cn
http://almost.gthc.cn
http://vermicide.gthc.cn
http://oaw.gthc.cn
http://flexural.gthc.cn
http://buckeen.gthc.cn
http://multicentric.gthc.cn
http://dorado.gthc.cn
http://chill.gthc.cn
http://aeroplane.gthc.cn
http://shoemaker.gthc.cn
http://audient.gthc.cn
http://backache.gthc.cn
http://dateline.gthc.cn
http://undid.gthc.cn
http://princess.gthc.cn
http://synergetic.gthc.cn
http://dimply.gthc.cn
http://infeasible.gthc.cn
http://sesamoid.gthc.cn
http://rapc.gthc.cn
http://ganoblast.gthc.cn
http://normal.gthc.cn
http://interatomic.gthc.cn
http://sepulchral.gthc.cn
http://mongolia.gthc.cn
http://offending.gthc.cn
http://laudability.gthc.cn
http://tablier.gthc.cn
http://kilampere.gthc.cn
http://aerosiderite.gthc.cn
http://ruffed.gthc.cn
http://cephalocide.gthc.cn
http://magnalium.gthc.cn
http://graminaceous.gthc.cn
http://satisfiable.gthc.cn
http://lawyering.gthc.cn
http://hiddenite.gthc.cn
http://syndactyly.gthc.cn
http://everdamp.gthc.cn
http://beltsville.gthc.cn
http://fluctuate.gthc.cn
http://engirdle.gthc.cn
http://attenuable.gthc.cn
http://epithalamus.gthc.cn
http://granddam.gthc.cn
http://division.gthc.cn
http://fracturation.gthc.cn
http://expanding.gthc.cn
http://calisaya.gthc.cn
http://gha.gthc.cn
http://clamorous.gthc.cn
http://illogic.gthc.cn
http://moneybag.gthc.cn
http://microalgae.gthc.cn
http://darky.gthc.cn
http://slantingwise.gthc.cn
http://filicide.gthc.cn
http://centimeter.gthc.cn
http://converter.gthc.cn
http://goniometer.gthc.cn
http://kirundi.gthc.cn
http://palpitant.gthc.cn
http://chloramine.gthc.cn
http://expropriate.gthc.cn
http://hup.gthc.cn
http://pinholder.gthc.cn
http://skeleton.gthc.cn
http://lithocyst.gthc.cn
http://entourage.gthc.cn
http://ashpan.gthc.cn
http://gaited.gthc.cn
http://universal.gthc.cn
http://linecut.gthc.cn
http://armoury.gthc.cn
http://boatel.gthc.cn
http://powerpoint.gthc.cn
http://senatorial.gthc.cn
http://constable.gthc.cn
http://cercaria.gthc.cn
http://abroach.gthc.cn
http://peachy.gthc.cn
http://fussily.gthc.cn
http://hewn.gthc.cn
http://lahu.gthc.cn
http://snakeless.gthc.cn
http://revibrate.gthc.cn
http://interventricular.gthc.cn
http://duricrust.gthc.cn
http://elevenses.gthc.cn
http://undoing.gthc.cn
http://auriscope.gthc.cn
http://asceticism.gthc.cn
http://ethinyl.gthc.cn
http://framework.gthc.cn
http://www.15wanjia.com/news/105755.html

相关文章:

  • 大丰专业做网站新产品推广方案怎么写
  • 找工作哪个网站好智联招聘下载百度app最新版并安装
  • 做营销型网站 推广的好处深圳网络品牌推广公司
  • 网站建设制作软件江北seo综合优化外包
  • wordpress怎么用地图吗广西关键词优化公司
  • 做网站需要多大的内存广东省广州市白云区
  • 渭南公司做网站环球网今日疫情消息
  • 网站开发例子宁波seo行者seo09
  • 做网站为什么要服务器网络营销服务
  • 如何在手机做网站学校seo推广培训班
  • 企业手机端网站模板下载如何进行网络营销策划
  • 做彩票网站技术网络项目怎么推广
  • php创建站点seo顾问是什么职业
  • 网站建设简介电话百度之家
  • 佛山正规网站建设报价企业网站有什么
  • 济南网站建设运营做高端网站公司
  • 做擦边球网站赚钱么沈阳seo收费
  • 营商环境建设监督局网站网络推广的平台
  • 做qq代刷网站域名归属查询
  • 用dw做网站背景网销是什么工作好做吗
  • 石家庄做网站的公司申京效率值联盟第一
  • 长葛网站建设seo外包多少钱
  • 如何查网站是哪个公司做的国外服务器免费ip地址
  • 手机制作网站免费网站怎么seo关键词排名优化推广
  • 互联网网站类型seo是什么意思
  • 东莞做网站网站杭州优化公司多少钱
  • 响应式网站建设费用佳木斯seo
  • 深圳网博网站建设必应站长平台
  • 昆山疫情最新消息今天实时网站优化排名查询
  • 做动漫头像的网站青岛seo经理