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

Add IPv6 support #486

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Add IPv6 support #486

wants to merge 7 commits into from

Conversation

tdrhq
Copy link

@tdrhq tdrhq commented Mar 16, 2025

Brpc already supports IPv6. Braft needed some changes to support it.

The main motivation to support IPv6 is operational simplicity. For instance, otherwise we need to know which IPv4 maps to which IPv6, and within IPv4 there's local IPs vs public IPs etc.

Working with Brpc endpoint for IPv6 is a little awkward, which is why this is more complicated than it needs to be. Btw, I haven't done C++ professionally for over 10 years, so feel free to suggest any code changes.

Fixes #376

Test plan:

Updated the Counter service to take an --ip parameter. Used that to pass in an IPv6 address, both [::1] and my actual IPv6 address.

Ran Counter client.

Also, used braft_cli to transfer leaders to see if braft_cli was correctly parsing the config, which it did.

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.

braft支持ipv6吗?
1 participant