当前位置:网站首页>Istio FAQ: return 426 status code

Istio FAQ: return 426 status code

2022-06-24 15:46:00 imroc

This article excerpts from istio Learning notes

background

Istio Use Envoy Forward as data face HTTP request , and Envoy The default requirement is to use HTTP/1.1 or HTTP/2, When the client uses HTTP/1.0 Will return to 426 Upgrade Required.

common nginx scene

If you use nginx Conduct proxy_pass Reverse proxy , Default will use HTTP/1.0, You can display the specified proxy_http_version by 1.1:

upstream http_backend {
    server 127.0.0.1:8080;

    keepalive 16;
}

server {
    ...

    location /http/ {
        proxy_pass http://http_backend;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        ...
    }
}

Pressure test scenario

ab During pressure measurement, it will send HTTP/1.0 Request ,Envoy Fixed return 426 Upgrade Required, No forwarding at all , Therefore, the pressure measurement results will not be accurate . It can be replaced with other pressure measuring tools , Such as wrk .

Give Way istio Support HTTP/1.0

There are some SDK Or the framework may use HTTP/1.0 agreement , For example, use HTTP/1.0 Go to the resource center / Configuration center Pull configuration information , Let the service run in... Without changing the code istio On , You can also modify istiod To configure , add PILOT_HTTP10: 1 Environment variable to enable HTTP/1.0.

Reference material

原网站

版权声明
本文为[imroc]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/05/20210506121129610Y.html