March 2021
Intermediate to advanced
260 pages
5h 45m
English
Currently, we configure Raft’s address as the transport’s local address, and the server will advertise its address as ::8400. We want to use the fully qualified domain name instead so the node will properly advertise itself to its cluster and to its clients.
In internal/log/config.go, change your Config to this:
| | type Config struct { |
| | Raft struct { |
| | raft.Config |
| » | BindAddr string |
| | StreamLayer *StreamLayer |
| | Bootstrap bool |
| | } |
| | Segment struct { |
| | MaxStoreBytes uint64 |
| | MaxIndexBytes uint64 |
| | InitialOffset uint64 |
| | } |
| | } |
Change your DistributedLog’s bootstrap code to use the configured bind address:
Read now
Unlock full access