开发者

Which data structure to throttle outbound messages?

开发者 https://www.devze.com 2023-02-13 00:17 出处:网络
I need to send messages (the actual technology is irrelevant at this stage) while complying with a number of throttling constraints.

I need to send messages (the actual technology is irrelevant at this stage) while complying with a number of throttling constraints. Basically I have contraints that are related to the sender and to the destination, in terms of messages per second. I don't mind in enforcing the throttling while accepting the messages from the sender, while I do need to throttle them when sending out. I was thinking about priority queues, but maybe there开发者_StackOverflow中文版's a better advice.

Anyway, the application is multithreaded, written in C and running under Linux, if this matters.


Take a look at this question and the answers mentioned there:

Throttling method calls to M requests in N seconds

0

精彩评论

暂无评论...
验证码 换一张
取 消