-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kafka is not supported? #171
Comments
I think in this case the My feeling is that this issue is not with Toxiproxy but instead the upstream kafka at |
I may have time to try reproducing this later in the week. :) |
Hi @jpittis, any update on the above? |
We have used toxiproxy successfully with kafka. The issue here is (and with most distributed systems like redis sentinel etc) you just specify the coordinators(or broker or whatever it's called) ip addresses in the client config. Once the client establishes connection with any coordinator, it will ask the coordinator for the list of nodes. Unless configured explicitly, the coordinator will just give the ip addresses. Now the client will just directly connect to the given ip addresses bypassing toxiproxy completely. In kafka case, the advertised host name can be configured.
We use hacks in docker-compose to trick the dns to resolve kafka to toxiproxy. So from all other containers kafka will resolve to the original node, but from consumer container it will resolve to toxiproxy. You still need to make sure the port numbers are same in kafka & toxiproxy
|
Do you have a working example on how to set this up ? If coordinator hands out the kafka ip addresses, how does it go through toxiproxy? I mean in case of multiple kafka brokers. |
broker config
service.properties
client config
The above config is what we use. In non docker env it should be simple as well. Change the /etc/hosts file in the client and override the kafka hostname with toxiproxy address. The port number used in toxiproxy listen should be same as the upstream. This way, whenever, the client wants to connect to any broker, the hostname would get resolved to toxiproxy.
I can't share the full code
The
Just configure multiple hostnames and add multiple entries in /etc/hosts of the client |
same issue happening with redis cluster as well. geting error like close network connection. can you help me with a solution ? |
@Anu5399 I would propose to create a separate issue with your example how could be reproduced: toxiproxy setup, sample applications, logs and etc. |
Hi All,
I tried to use toxiproxy for simulation bad connections to Kafka cluster. And it works like proxy, but when added some toxic it breaks connection and switch connection directly to original url (instead of use proxy, we receive messages without delay) or sometimes it just skips messages (don't receive messages).
I use kafka cluster (https://github.com/wurstmeister/kafka-docker) and toxiproxy-server.
And add proxy: 9999->9092
I tried to send message(any string) with enabled toxic and then got it.
And tried to consume messages, but without success.
Is it okay or I miss something?
Thanks
The text was updated successfully, but these errors were encountered: