dhiaayachi / temporal

Temporal service
https://docs.temporal.io
MIT License
0 stars 0 forks source link

Support listening on both IPv4 and IPv6 networks in dual stack environments #310

Open dhiaayachi opened 2 months ago

dhiaayachi commented 2 months ago

Is your feature request related to a problem? Please describe. Migrating to ipv6 is hard but will (probably?) eventually happen. To make this transition easier for operators, it would be advantageous for operators to be able to use either/both ipv4 and ipv6 to connect to temporal server services at the same time.

Describe the solution you'd like when starting temporal server services, by default, if an external ipv4 and ipv6 address are available, bind to both using the same port.

Alter services rpc config BindOnLocalHost to bind on both 127.0.0.1 and ::1 if both are available.

Add some method to services rpc config to allow specifying multiple IPs to bind to (could be one v4 and one v6, or just N addresses to support multihomed environments).

Describe alternatives you've considered It may be possible to run multiple of the same service on a host with both IPv4 and IPv6, one bound to IPv4 and one bound to IPv6, though that would probably be more resource intensive than enabling one process listening on multiple addresses.

Additional context N/A

dhiaayachi commented 1 month ago

Thank you for your feature request! We understand the need to support both IPv4 and IPv6 for future-proofing Temporal deployments.

Currently, Temporal Server binds to a single IP address and port. However, you can work around this by running separate Temporal Server processes for each IP version, each listening on the same port.

While this approach might be more resource-intensive, it offers a temporary solution until direct IPv4/IPv6 binding is implemented. We appreciate your feedback and will consider this feature for future releases.

dhiaayachi commented 1 month ago

Thanks for your feature request! This is a great idea for making Temporal more adaptable to future network changes.

While directly supporting multiple IPs on a single port for a Temporal service isn't currently available, you can achieve a similar outcome by running separate instances of the Temporal server, each bound to a different IP. For example, you could have one server bound to IPv4 and another to IPv6, allowing your client applications to connect to the appropriate server based on their IP configuration.

This approach might require some additional configuration and load balancing to ensure seamless transitions between the servers, but it would provide the flexibility you're looking for.