Git Product home page Git Product logo

Comments (8)

everesio avatar everesio commented on June 3, 2024

I am not sure if this will be helpful.

  • proxy-request-buffer-size and proxy-response-buffer-size are bytes buffers used in the go to write / read from socket
  • proxy-listener-read-buffer-size and kafka-connection-read-buffer-size set SO_RCVBUF
  • proxy-listener-write-buffer-size and kafka-connection-write-buffer-size set SO_SNDBUF

Default values in Kafka 2.2 for SO_RCVBUF / SO_SNDBUF are 102400.
In Java Drivers OS defaults are used.

For system changes you should probably search for "TCP Tuning" e.g. https://cromwell-intl.com/open-source/performance-tuning/tcp.html

from kafka-proxy.

everesio avatar everesio commented on June 3, 2024

I missed the error message.
"open requests buffer is full" error comes from the kafka proxy itself and it has nothing to do with request / socket buffers. It signifies that channel used during initial request (ApiVersions message) is full.
Messages from the channel are consumed when the Kafka initial response is received. This channel buffer size is 256 (param kafka-max-open-requests). So this should never happen when the kafka responses are received and when the clients and the proxy are configured properly.

Questions:

  • When do you get this failure ?
  • Do you received any traffic back from Kafka (firewall problem) ?
  • How is your proxy (proxies) configured ?
  • How the clients are connected to proxy ?
  • Do you use ELB ?

from kafka-proxy.

thranduil avatar thranduil commented on June 3, 2024

I have tested that with the following setup:

  • AWS MSK with Kafka 2.1.0
  • EC2 instance with kafka-proxy in the same VPC as MSK (all open between it and MSK, open ports 32500,32501,32502 to producer)
  • Producer outside MSK VPC

I get this failure when producer has published around 500 msgs.

I can also consume Kafka messages from the instance where producer is - I hope that this qualifies as 'receiving data back from Kafka'.

I run proxy with the following configuration:

--bootstrap-server-mapping "<kafka_bootstrap_ip_1>:9092,0.0.0.0:32500,<ip_of_proxy-instance>:32500"
--bootstrap-server-mapping "<kafka_bootstrap_ip_2>:9092,0.0.0.0:32501,<ip_of_proxy-instance>:32501"
--bootstrap-server-mapping "<kafka_bootstrap_ip_2>:9092,0.0.0.0:32502,<ip_of_proxy-instance>:32502"

Producer connects to <ip_of_proxy-instance> on all 3 ports.

ELB is not used.

from kafka-proxy.

everesio avatar everesio commented on June 3, 2024

I cannot reproduce the behavior you described.

I created a MKS and an EC2 instance where a proxy runs
https://gist.github.com/everesio/262e11c6e5cebf56f1d5111c8cd7da3f

After ssh to ec2 with kafka-proxy, starting the proxy, I could run kafka-producer-perf-test.sh from my laptop using kafka-proxy public IP without any problems ( throughput -1 and throughput 10)

I would suggest that you check your Security Groups / Firewall Rules.

from kafka-proxy.

thranduil avatar thranduil commented on June 3, 2024

Thanks for your help.
Your example works for me as well. The problem was with using non default producer, which apparently messes things. I used producer that comes with NiFi (tool I am using for data processing).

from kafka-proxy.

radekg avatar radekg commented on June 3, 2024

I missed the error message.
"open requests buffer is full" error comes from the kafka proxy itself and it has nothing to do with request / socket buffers. It signifies that channel used during initial request (ApiVersions message) is full.
Messages from the channel are consumed when the Kafka initial response is received. This channel buffer size is 256 (param kafka-max-open-requests). So this should never happen when the kafka responses are received and when the clients and the proxy are configured properly.

Questions:

* When do you get this failure ?

* Do you received any traffic back from Kafka (firewall problem) ?

* How is your proxy (proxies) configured ?

* How the clients are connected to proxy ?

* Do you use ELB ?

Hi @everesio. I am currently investigating a similar problem. The initial indicator here is, when a producer is configured with acks=0, I see this error quite often in my logs. With large message throughput, when this error appears, I see a significant drop in performance.

from kafka-proxy.

everesio avatar everesio commented on June 3, 2024

Hi @radekg,
thanks for narrowing down the problem. Kafka proxy expects a response from server even for ack=0.
I will create a bug issue.

RequiredAcks:
"This field indicates how many acknowledgements the servers should receive before responding to the request. If it is 0 the server will not send any response (this is the only case where the server will not reply to a request). If it is 1, the server will wait the data is written to the local log before sending a response. If it is -1 the server will block until the message is committed by all in sync replicas before sending a response."

from kafka-proxy.

radekg avatar radekg commented on June 3, 2024

@everesio thank you for this quick reply. I could help coming up with a fix, if I could receive some pointers to the place in the code where this can be handled?

from kafka-proxy.

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.