Repository navigation
fake: --listen unix:DIR, and --control takes a port - #87
Merged
Merged
Conversation
--control now takes only a port and listens on 127.0.0.1, like the brokers and the schema registry. A bare --control still uses 9099.
--listen unix:DIR serves each broker on a Unix socket, DIR/<port>.sock, instead of TCP. Brokers still advertise 127.0.0.1:<port>, so a client reaches the socket through its own dialer. A Unix socket avoids the TCP stack on loopback, which helps when benchmarking a client. A socket path over the OS limit (103 bytes on macOS) fails with a bare "invalid argument"; we add the path length to that error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two
kcl fakeflag changes.--listen unix:DIRserves each broker on a Unix socket,DIR/<port>.sock,instead of TCP. Brokers still advertise
127.0.0.1:<port>, so a clientreaches the socket through its own dialer (in franz-go,
kgo.Dialer). AUnix socket avoids the TCP stack on loopback, which helps when benchmarking a
client. A socket path over the OS limit (103 bytes on macOS) now reports its
length instead of a bare "invalid argument".
--controlnow takes only a port and listens on 127.0.0.1, like the brokersand the schema registry. A bare
--controlstill uses 9099.Changelog
kcl fake --listen unix:DIRserves brokers on Unix sockets.kcl fake --controltakes a port rather than an address,and always listens on 127.0.0.1.