HAProxy replies client with RST when client side reuses port in http mode and soft reload is issued on HAProxy
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- c
- Lĩnh vực
- backend, networking
Hướng nghiên cứu
Start by reproducing the issue with HAProxy master-worker mode, the shown HTTP backend settings, connection pooling, and the specified keep-alive timeouts. Use the described tcpdump observations to trace the client connection across a soft reload; done means reused client requests continue without HAProxy sending FIN or RST.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Detailed Description of the Problem
Setup
Clients --> Gateway -> HAProxy -> Backend Server
Client side Gateway is using ConnectionPools which means the client tries to reuse exiting connection (5 sec timeout).
Client side keep alive timer: 5 seconds
HAProxy keep alive timeout: 60 seconds
HAProxy Version haproxy-3.0.17
Issue
Whenever client reuses existing connection towards HAProxy, and HAProxy is issued soft reload (due to changes to in the ingress or backend), then the HAProxy terminating the client connection with RST.
I believe above is not an expected behaviour on the HAProxy. Either the soft reload or client side connection reuse should not lead to termination of the existing connection by the HAProxy.
Current Analysis
Analysed the tcpdumps and client connection behaviour for the above scenario.
Tcpdump traces indicate that whenever clients have started the connections:
- There is single tcp/SSL connection from client to the HAProxy for entire duration
- There are multiple http connections from HAProxy to the backend server - one for each client request
When reload is issued on HAProxy the following observation is made:
- No issue or tcp/http packets seen between HAProxy and the backend server
- If client tries to send another request using the existing tcp connection, HAProxy is replying with FIN and RST
Expected Behavior
The client requests should continue to work as it was working prior to the reload of the HAProxy.
Steps to Reproduce the Behavior
- Connect some Gateway before the HAProxy with connection pooling enabled, set the port reuse timeout to 5 seconds
- Use standard master-worker mode on HAProxy, add a HTTP backend, set http-keep-alive time out to 1m
- Establish multiple http GET requests from the client side and while the requests are in progress, issue soft reload on the HAProxy
Do you have any idea what may have caused this?
No response
Do you have an idea how to solve the issue?
No response
What is your configuration?
**HAProxy Config**
global
master-worker
defaults
log global
option redispatch
option http-server-close
option http-keep-alive
timeout client 600s
timeout client-fin 600s
timeout connect 5s
timeout http-keep-alive 1m
timeout http-request 5s
...
backend apps
mode http
balance hdr(xyz)
option srvtcpka
...
Output of haproxy -vv
NA
Last Outputs and Backtraces
Additional Information
No response
- Ngôn ngữ chính
- C
- Star
- 6.9k
- Fork
- 976
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của haproxy/haproxy
-
type: feature
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 77/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
type: code-report
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
type: code-report
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Tất cả issue của haproxy/haproxy
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
FujiNetWIFI/fujinet-lib#186 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100