Distinguish high load and unavailability of TiDB
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách đọc các triển khai của health-check và router, tập trung vào thời gian chờ 2 giây, ba lần kiểm tra thất bại và việc di chuyển tất cả kết nối cùng lúc được mô tả trong issue. Tái hiện hoặc suy luận về các kịch bản tải cao đối với hai instance TiDB, sau đó xác định và xác thực hành vi phân biệt sự chậm tạm thời với tình trạng không khả dụng mà không vi phạm graceful-wait-before-shutdown.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Development Task
When the load of TiDB is very high, it may not respond within 2 seconds, and thus TiProxy treats it as down and migrates ALL connections away from it. The migration is typically very fast and may finish most of them before the next health check.
If there are 2 TiDB instances, A and B. The CPU usage of A is 100% and B is 90%. Theoretically, this may happen:
- TiProxy can not dial A within 2 seconds and treats A as down and B as alive
- TiProxy wants to migrate all connections from A to B
- After 3 seconds, the CPU usage of A becomes 90% and B becomes 100%
- Again, TiProxy thinks A is alive but B is down
- TiProxy wants to migrate all connections from B to A
This situation is just theoretically possible but I'm not sure if it will happen in the real world:
- If the CPU usage of A is 100%, is it possible to migrate many connections within 3 seconds?
- When the CPU usage of B becomes 100%, it's slow to dial B. Will the connection migration be that fast?
Anyway, the strategies of the health check and router are too aggressive:
- The health check treats the backend as down when it just fails in 2 seconds for 3 times. However, I also want to make the health check fast enough so that the
graceful-wait-before-shutdowncan be configured shorter. - The router tries to migrate all connections all at once. Exactly, 10ms for 10 connections and thus 3s for 3000 connections for each TiProxy. 3000 connections almost mean all the connections on one TiDB. However, I also want to make the migration ASAP because it needs to finish within
graceful-wait-before-shutdown.
- Ngôn ngữ chính
- Go
- Star
- 73
- Fork
- 41
- Merge trung bình
- 12 giờ 38 phút
- Pull request đã merge (30 ngày)
- 21
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 pingcap/tiproxy
-
contribution first-time-contributor type/enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
pingcap/tiproxy#1239 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type/enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Flaky test TestForwardUntilErrorĐang mởseverity/minor type/bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
type/bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của pingcap/tiproxy
Issue tương tự
-
automation models
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug llm-stack needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
P3 Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
grpc/grpc-go#9483 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
needs-area needs-kind needs-priority needs-status needs-triage
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 85/100
cncf/automation#736 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Signing PIN can't be collected in-TUI: gpg helper never opts into credential handling, and the PIN pattern misses ssh-keygen's wordingCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
jesseduffield/lazygit#6094 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày