Dam is High-Performance API Gateway
- Netty
- 响应式网络处理
- 路由表达式灵活匹配Http请求协议体
- 灵活路由配置,功能可插拔配置
- 基于SPI过滤器扩展,灵活扩展网关功能
EG: dam-example
- 网关优先匹配
global
的路由,确定路由分组 - 按照路由顺序匹配分组里面的子路由
- 执行路由过滤器配置
#route.yaml
routes:
- id: 196105db9a384d7a93f8102ae46684cb # 唯一Id
group: test # 路由分组
order: 100 # 路由匹配顺序
global: true # 是否全局路由
protocol: http # 路由协议
expressionStr: Path.AntMatch('/replace/**') # 路由匹配表达式
filterConfigs: # 路由过滤器配置
- name: rewrite
param:
regex: "/replace/(.*)"
replacement: "/$\\1"
- name: proxy
param:
uri: "lb://test"
instances:
- host: test
address: localhost:4843
fork from spring-cloud-gateway-bench gitee
TL;DR
Proxy | Avg Latency | Avg Req/Sec/Thread |
---|---|---|
dam | 2.04ms | 107.869k |
gateway | 4.68ms | 43.827k |
linkered | 5.23ms | 41.988k |
zuul | 11.08ms | 22.757k |
none | 3.25ms | 161.243k |