Skip to content
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

core: Support Unix domain socket HTTP server listener #798

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LINKIWI
Copy link

@LINKIWI LINKIWI commented Feb 3, 2024

This PR implements support for listening on a Unix domain socket for Burrow's main HTTP server. Users can specify an address of the form unix:/path/to/socket to enable the Unix socket listener, instead of the traditional TCP-based listener.

Test Plan

Example config:

[logging]
level="info"
use-localtime=false

[zookeeper]
servers=["localhost:2181"]
timeout=6
root-path="/burrow"

[client-profile.local]
client-id="burrow"
kafka-version="1.0.0"

[cluster.local]
class-name="kafka"
servers=["localhost:9092"]
client-profile="local"
topic-refresh=120
offset-refresh=10

[consumer.local]
class-name="kafka"
cluster="local"
servers=["localhost:9092"]
client-profile="local"
group-denylist="^(console-consumer-|python-kafka-consumer-|quick-).*$"
group-allowlist=""

[httpserver.default]
address="unix:/tmp/burrow.sock"

Usage:

$ ./bin/burrow --config-dir /tmp/burrow
Reading configuration from /tmp/burrow
{"level":"info","ts":1706928222.3937771,"msg":"Started Burrow"}

Verification:

$ curl --unix-socket /tmp/burrow.sock http://localhost/v3/kafka/local/topic
{"error":false,"message":"topic list returned","topics":[...],"request":{"url":"/v3/kafka/local/topic","host":"..."}}

@LINKIWI LINKIWI requested a review from bai as a code owner February 3, 2024 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant