Git Product home page Git Product logo

Comments (2)

achille-roussel avatar achille-roussel commented on May 14, 2024

@dgregoire are you able to share which version of Kafka you had done these tests against, as well as the number of brokers and partitions in the topic? The writer definitely shouldn't block until the deadline is reached, because we have tests that verify its behavior.

If it timed out due to reaching the context deadline you should be getting en error returned from the (*Writer).WriteMessages call, is this what you observed? (seems like it from your screenshot but I just wanted to confirm)

A batch size of 2 is quite small, I would expect this to put significant load on the Kafka brokers, which means some requests could timeout if there is concurrency involved and you hit hardware limits on the underlying hardware (like disk bandwidth, IOPS, CPU, etc...).

from kafka-go.

dgregoire avatar dgregoire commented on May 14, 2024

@achille-roussel Kafka 1.0.1 with 3 brokers, 12 partitions / topic.

The specific use case is:

  • default batch size of 5/2
  • context with timeout in 100/200/500ms
  • WriteMessages() with 1 kafka.Message

In all combinaisons I tested, the WriteMessages function locks until the context is deadline exceeded and the function returns that error, unless the configured batch size is 1.

I suspected this might happen when using send messages with a number of message != batch size but never proved that theory, what do you think?

from kafka-go.

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.