Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Serverless] Ensure that only one subscription instance is active

Đang mở
#162 7 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 7 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
20/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp
Lĩnh vực
distributed-systems

Hướng nghiên cứu

Start by reading issue #161 for the proposed subscription position API, then trace how subscriptions are started and how their checkpoints are managed. The issue proposes an HTTP presence API and ongoing instance election, but leaves race conditions and the election design unresolved; done would require a decided approach that keeps one instance active and hands over activity when it shuts down.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement serverless subscriptions

When a subscription is deployed as a serverless function or container, it's hard to control how many instances are currently active. It will inevitably lead to multiple instances running simultaneously, processing the same events (which could be a problem) and overriding the checkpoint (another potential problem).

#161 suggests adding an HTTP API to subscriptions to report their positions. Another API could also expose the subscription presence with some unique id. The id could be generated on startup and remains static for a given running instance.

It would allow creating a self-managed distributed control plane for subscription services. It could work like this:

  • A newly instantiated service makes several calls to its own HTTP endpoint, assuming the endpoint is load balanced with a round-robin strategy
  • It will collect all the responses from running instances and can understand how many are there
  • If there's only one instance, the subscription will mark itself as active. This status is included in the API response.
  • If there are multiple instances, and one of them is active, the subscription doesn't start
  • If there are multiple instances, and none of them is active, the subscription decides to become active after gossiping with other instances
  • When a subscription receives a gossip call from some instance that wants to activate, it will ensure that it is not active. Otherwise, the request should be denied.

This process needs to run continuously, so when one active subscription gets shut down, some other instance will become active.

I foresee some race conditions during the elections, but I am not sure yet if it's relevant.

Ngôn ngữ chính
C#
Star
512
Fork
99
Merge trung bình
5 ngày 6 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Eventuous/eventuous

Tất cả issue của Eventuous/eventuous

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.