nginx ngx_http_mirror_module模块
生活随笔
收集整理的這篇文章主要介紹了
nginx ngx_http_mirror_module模块
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Nginx 1.13.4版本新增了ngx_http_mirror_module模塊。
ngx_http_mirror_module模塊適用于這樣一種場景,可以把真實請求引流到測試環境。
配置示例?
location / {
? ? mirror /mirror;
? ? proxy_pass http://backend;
}
location /mirror {
? ? internal;
? ? proxy_pass http://test_backend$request_uri;
}
配置兩組后臺服務器,http://backend指向生產服務器, http://test_backend指向測試服務器。
用戶訪問生產服務器的同時,請求會被nginx復制發送給測試服務器,需要注意的一點是mirror不會輸出http返回內容。
總結
以上是生活随笔為你收集整理的nginx ngx_http_mirror_module模块的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: NodeJS使用ES6
- 下一篇: 挑战微信小程序?支付宝小程序可以申请公测