ambassador 学习八 流量拷贝说明
这个功能nginx 的mirror 插件也支持,基本原理就是数据发送后端,但是不进行响应
参考图
实现方式
- 原始请求
getambassador.io/config: |
---
apiVersion: ambassador/v0
kind: Mapping
name: myservice-mapping
prefix: /myservice/
service: myservice.default
- 流量拷贝处理(创建新的mapping)
getambassador.io/config: |
---
apiVersion: ambassador/v0
kind: Mapping
name: myservice-shadow-mapping
prefix: /myservice/
service: myservice-shadow.default
shadow: true
参考资料
https://www.getambassador.io/reference/shadowing
https://nginx.org/en/docs/http/ngx_http_mirror_module.html