Coder Social home page Coder Social logo

Support unfixed backoff strategy about decaton HOT 2 CLOSED

line avatar line commented on July 28, 2024
Support unfixed backoff strategy

from decaton.

Comments (2)

ocadaruma avatar ocadaruma commented on July 28, 2024

Yeah, we know some users want this feature (exponential backoff) but it could be challenging because:

  • In Decaton (Kafka), mixing tasks with different backoff in single partition doesn't make much sense.
    • Let's say we queue retry task with backoff-500ms to retry-topic-0
    • Next, we queue retry task with backoff-100ms to retry-topic-0
    • backoff-500ms will be consumed first. Decaton sleeps the processor-thread for 500ms till start processing
    • So, backoff-100ms will be started after processing backoff-500ms, while the backoff is 100ms.

This is inevitable because Kafka's partition behaves as queue.

Possible ideas to solve this:

  • Having another internal queueing mechanism inside Decaton for different backoffs
    • However we can hold only limited tasks due to memory bound. So it doesn't scale for high-traffic or long-backoff cases
  • Having different topics for backoffs
    • like retry-topic-backoff100ms, retry-topic-back-off500ms,...
    • I can find some cases on the web that achieving flexible backoff using this strategy
    • However, we need to prepare many topics

from decaton.

ta7uw avatar ta7uw commented on July 28, 2024

Thanks for your explanation.
It makes sense to me that supporting unfixed backoff would be challenging.

from decaton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.