Enhancements for the `ChannelPool`
@0xCryptoZen đang làm issue này rồi.
Từ ngày 3/7/2023.
Đá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
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- rust
- Lĩnh vực
- networking
Hướng nghiên cứu
Bắt đầu bằng cách xác định phần triển khai ChannelPool và điểm vào with_channel, sau đó làm rõ những tính năng được đề xuất nào nằm trong phạm vi. Xác định hành vi dự kiến đối với số lượng kết nối tối đa và thời hạn của kết nối trước khi thay đổi pool; phần hoàn tất cần bao gồm hành vi đã thống nhất cho cả hai tính năng và việc xác minh ảnh hưởng của chúng đối với các kết nối gRPC được gom vào pool.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Background:
ChannelPool is a struct for managing gRPC client connections, providing basic connection pooling functionality. While it already offers some useful features, there are potential improvements and extensions that could further enhance performance, stability, and maintainability.
Proposed Features:
-
Maximum Connection Limit: To prevent creating too many simultaneous connections, consider adding a maximum connection limit to the ChannelPool struct. Concurrent connection creation can be controlled using a Semaphore or other concurrency control structures.
-
Connection Expiration: Add an expiration time for each connection in the ChannelPool. Connections exceeding this duration would be automatically closed, ensuring connections don't remain open indefinitely.
I chose to implement these two features because they can significantly improve performance and reduce resource usage. Additionally, these features lay the groundwork for future improvements.
There are also any other features about ChannelPool, for example :
-
Smarter Connection Recycling Strategy: The current implementation simply discards connections when they encounter errors. Implement a smarter recycling strategy, such as deciding when to close connections based on their usage frequency or idle time.
-
Connection Health Checks: Perform periodic health checks on connections to ensure that the connections in the pool are still functional. If unhealthy connections are discovered, remove them from the pool and create new connections as needed.
-
Connection Load Balancing: If connecting to a service with multiple backend instances, consider implementing connection load balancing. Choose between round-robin, least connections, or other load balancing strategies based on connection usage.
-
Detailed Error Handling and Logging: For easier debugging and troubleshooting, consider adding more detailed error handling and logging within the code.
-
Generics: The current implementation of the with_channel method requires a function returning a Result<T, Status>. Consider using a generic error type to make it more adaptable to different error handling requirements.
- Ngôn ngữ chính
- Rust
- Star
- 425
- Fork
- 89
- Merge trung bình
- 2 giờ 48 phút
- Pull request đã merge (30 ngày)
- 3
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 qdrant/rust-client
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
qdrant/rust-client#320 ·
-
upsert_points deep-clones the whole request on every call, not only on retryCó thể làm lại được @NullSense đã nhận 7 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
qdrant/rust-client#316 · 3 bình luận ·
-
Option to set TLS domain name and :authority origin (client behind a tunnel/proxy)Có thể làm lại được @inamdarmihir đã nhận 37 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
qdrant/rust-client#306 · 1 bình luận ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
qdrant/rust-client#289 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
qdrant/rust-client#272 · 2 reaction ·
Tất cả issue của qdrant/rust-client
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
samkerrcode/opengent#113 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
app bug session
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ 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
-
backlog
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
sagemathinc/sagebrush#3415 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
marketing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày