Skip to content

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.

@IronsDu
Copy link

IronsDu commented Nov 7, 2025

摇人来合并啊。

1 similar comment
@WZFlik
Copy link

WZFlik commented Nov 7, 2025

摇人来合并啊。

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吗?

3 participants