Solution to slow consumer(eventProcessor) issue in LMAX Disruptor pattern

后端 未结 3 564
谎友^
谎友^ 2020-12-30 14:28

While using the disruptor, there may be a consumer(s) that is lagging behind, and because of that slow consumer, the whole application is affected.

Keeping in mind

3条回答
  •  轮回少年
    2020-12-30 15:02

    Try to separate slow part to other thread (I/O, not O(1) or O(log) calculations, etc.), or to apply some kind of back pressure when consumer is overloaded (by yielding or temporary parking of producers, replaying with 503 or 429 status codes, etc.): http://mechanical-sympathy.blogspot.com/2012/05/apply-back-pressure-when-overloaded.html

提交回复
热议问题