Comments (8)
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.
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.
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.
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.
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.
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.
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.
@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)
- IAM auth passthrough to MSK with encryption in transit?
- MSK TLS Errors HOT 1
- TLS extract CN and lookup on LDAP for SASL
- cannot connect to aws kafka from on-prem server with SASL_SSL enabled HOT 2
- Simple use case to connect docker compose container to remote vpn kafka cluster over socks5a proxy via ssh HOT 1
- Pod startup issue after version 0.3.3-all HOT 3
- CVE-2023-37788 - github.com/elazarl/goproxy HOT 3
- AWS MSK Serverless - had error: api key -13567 is invalid HOT 4
- updating to tag 0.3.7-all from 0.3.3-all getting error auth-local-command HOT 1
- [Question] Can I attach 3 bootstrap server endpoints to a single port? HOT 1
- [Question] If my Kafka brokers are running version 2.8.1, should I be using kafka-proxy version 0.2.9? HOT 1
- "Metadata" request (ApiKey=3 and ApiVersion=5) in the Kafka Proxy is not following the protocol structure defined by Kafka protocol guide HOT 1
- [Question] is there a plan to release a Java implementation of Kafka Proxy ? HOT 1
- [Need Help] Sending Custom METADATA response through Kafka Proxy
- [Question] is there a plan to support HTTPS proxy ?
- will there be an update to resovle 7 vulnerabilitys
- tls: failed to parse private key AWS MSK HOT 6
- bad performance when executing kafka-producer-perf-test.sh HOT 3
- Can not use grepplabs/kafka-proxy ARM image as base image HOT 1
- one port mapping to 6 broker HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kafka-proxy.