Support for setting keepAliveTimeout
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- docker, node.js
- Lĩnh vực
- backend
Hướng nghiên cứu
Điểm vào liên quan là phần thiết lập máy chủ HTTP/HTTPS tạo httpServer và httpsServer; hãy bắt đầu bằng cách lần theo cách container Echo đọc các biến môi trường lúc chạy. Thêm thời gian chờ keep-alive có thể cấu hình cho cả hai máy chủ, bao gồm cả hành vi headers-timeout liên quan được nêu trong issue, và xác minh rằng container vẫn khởi động và chấp nhận các yêu cầu HTTP/S khi có và không có thiết lập này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi,
I was making some tests with the Echo container, including ensuring connection pool logics / configuration.
Currently this is taking the default 5s Node keepAliveTimeout which will then start dropping connections. If we would be able to stablish the keepAliveTimeout we would be able to allow the consumer side to manage the connections.
I've hacked a solution as:
// How long an idle keep-alive connection is held before the server closes it.
// Node's default is 5s, so an upstream keep-alive pool in front of this server can never be observed intact.
// Raising it past the drain time lets the pool settle and leaves the reverse proxy in charge of trimming it.
const keepAliveTimeoutMs = parseInt(process.env.KEEPALIVE_TIMEOUT_MS, 10);
if (Number.isFinite(keepAliveTimeoutMs) && keepAliveTimeoutMs > 0) {
for (const server of [httpServer, httpsServer]) {
server.keepAliveTimeout = keepAliveTimeoutMs;
// headersTimeout bounds how long a started request may take to send its headers;
// keeping it above keepAliveTimeout stops Node from closing a pooled connection just as it is being reused.
server.headersTimeout = keepAliveTimeoutMs + 5000;
}
console.log(`Keep-alive timeout set to ${keepAliveTimeoutMs}ms (headers timeout ${keepAliveTimeoutMs + 5000}ms).`);
}
- Ngôn ngữ chính
- Shell
- Star
- 792
- Fork
- 152
- Merge trung bình
- 3 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 mendhak/docker-http-https-echo
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
mendhak/docker-http-https-echo#86 · 3 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
mendhak/docker-http-https-echo#80 · 2 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
mendhak/docker-http-https-echo#60 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
mendhak/docker-http-https-echo#59 · 1 bình luận ·
Tất cả issue của mendhak/docker-http-https-echo
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
elastic/gradle-plugins#156 ·
-
Priority/High ready-for-agent Severity/Major Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
comp/cli P3 type/docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
NousResearch/hermes-agent#119756 · 1 bình luận ·
-
comp: build/pipeline type: bug version: current (v17+)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
angular/angularfire#3766 ·
-
out-of-date
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
CachyOS/CachyOS-PKGBUILDS#1903 ·