antirez / antirez/disque

More cluster aware MAXLEN option in ADDJOB

Đang mở
#76 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
api change proposal
Ngôn ngữ chính
C
Star
8.1k
Fork
532
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

The idea is that while we don't want to run consensus or alike to make sure the queue is a given length, it should have a more global meaning. Example of things we could do:
1. Send the MAXLEN count in the ADDJOB cluster packet, and let the receiver discard the packet or NACK if the MAXLEN is reached on the receiver. This way the option is already more cluster aware since the job will be replicated only by instances where the queue length is less than MAXLEN. In turn this means that all the node will eventually reach MAXLEN if the consumers are not fast enough.
2. Reply to ADDJOB (GOTJOB) may carry the current length of the queue in the target so that if the sum of our queue length and the replicas is greater than MAXLEN, we don't accept the job.

There is to consider if in the Big Picture this really helps or not. The current behavior is to just check the local queue length. Given Disque automatic federation, if the length was reached in the local node, likely there is no demand or not enough demand for jobs cluster-wide, so it may make sense to have just a local limit. However this issue is here as a placeholder in order to rethink the problem soon or later.

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

Đánh giá

Issue này chưa được đánh giá.

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.