当前位置:网站首页>Getting started with gateway
Getting started with gateway
2022-07-28 18:50:00 【Minor Wang Zhi】
Catalog
1.Gateway
SpringCloud The launch is based on WebFlux+Netty Of Reactor Responsive programming gateway components , Performance equivalent to Zuul More than double . Gateway can do many things in distributed microservice architecture : Flow control 、 Log monitoring 、 Unified authentication authority verification, etc .
Gateway There is 3 An important concept :
- Route route : Routing information includes ID、URI、 The factory 、 A group of Filter.
- Predicates Assertion : Check various conditions and parameters of the request , If it meets the conditions, it will be released .
- Filter filter : Filtering chain processing of requests and responses .Gateway Of Filter Support Pre and Post Two modes .
2. Assertion
Gateway There are many built-in assertion types available :
- After: Assertion Verification Based on time , Release only after the specified date .
- Before: and After contrary .
- Between: Release within a certain time .
- Cookie: Verify the specified Cookie, Qualified release .
- Header: Check request header .
- Host: Verify whether the matching current request comes from the set host address .
- Method: matching HTTP Request method , for example Post、Get etc. .
- Path: Match path .
- Query: Parameter matching verification .
3.Filter filter
Gateway Filter support for Pre Preprocessing and Post Post processing has two modes , We can also achieve Filter Interface comes from definition Gateway Filter , adopt Order Interface can realize filter sorting .
Gateway There are dozens of official built-in Filter,Filter Divided into two :GatewayFilter、GlobalFilter. The difference is that the scope of the former is specific Route route , The latter belongs to global filtering . Generally speaking, we are used to GlobalFilter, It's covered with filter Method to implement the requested custom operation , Log for example 、 Certificate authority 、 add to Header Wait for the operation .
边栏推荐
- Meta Q2财报:营收首次下滑,Metaverse将与苹果竞争
- MYSQL入门与进阶(五)
- Golang concurrent lock
- 冒泡排序和相关视频
- Record your interview experience in Xiamen for two years -- Conclusion
- 2022-07-27 第四小组 修身课 学习笔记(every day)
- LeetCode_63_不同路径Ⅱ
- What skills do you need to master when learning software testing zero foundation?
- @The difference between Autowired and @resource
- MYSQL入门与进阶(八)
猜你喜欢

Redis缓存雪崩、穿透、击穿,布隆过滤器,分布式锁详解

Docker builds MySQL master-slave replication

什么样的知识付费系统功能,更有利于平台与讲师发展?

Interviewer: what are the usage scenarios of ThreadLocal? How to avoid memory leakage?

【实战】用OpenCV实现页面扭曲矫正

GC garbage collector details

Chinese enterprise service industry market in 2022

1.2 queue

高德地图实现自定义小蓝点 自定义点标记 绘制多边形/圆形区域 根据地图的移动显示或者隐藏自定义点标记的相关实现

当Golang遇到高并发秒杀
随机推荐
Introduction and advanced MySQL (4)
UE5 GAS 学习笔记 1.6 技能Gameplay Ability
MYSQL入门与进阶(三)
Docker搭建Mysql主从复制
Golang 打包发布到各个平台
Kotlin:Sealed class密封类详解
UE5 GAS 学习笔记 1.3属性Attribute
Look at Devops construction from SRE
Introduction and advanced level of MySQL (9)
NPM cannot recognize the "NPM" item as the name of a cmdlet, function, script file, or runnable program. Please check the spelling of the name. If the path is included, make sure the path is correct,
MYSQL入门与进阶(六)
What are the conditions for zero foundation learning software testing?
Bubble sorting and Related videos
[GXYCTF2019]StrongestMind
UE5 GAS 学习笔记 1.10 预测(Prediction)
JVM four reference types
UE5 GAS 学习笔记 1.8 游戏特效(GameplayCue)
mysql 索引使用与优化
Golang 并发之锁
MYSQL入门与进阶(一)