DNS name in BroadcastAddress
I try deploy temporal cluster on docker swarm(need concept proof(scalability/limitations) before we will use it in prod). Kuber+helm too cumbersome for my laptop(and i have not too much expertise in it (i am developer not a devops)) We face problems with BIND_ON_IP (it sets only on one interface and cannot see requests from others) and TEMPORAL_BROADCAST_ADDRESS(we can not set a dns name as address(validation failure ringpop.go:75) can not understand reason for this restriction)
Probable solution TEMPORAL_BROADCAST_ADDRESS(BroadcastAddress) can be dns name BIND_ON_IP is 0.0.0.0 by default
Alternatives solution Maybe you can add a swarm config in docker-compose repo for concept proof purpose. Single node deployment not enough to be sure in scalability and see bottlenecks.
Sorry for bothering))
I think its a good idea to have a sample for docker-compose in swarm mode.
These two settings have different meanings:
BIND_ON_IP is the local IP address to bind on. 0.0.0.0 represents all interfaces and is needed for containerized services. localhost in the context of a container process is not accessible to other containers, generally not exposed.
TEMPORAL_BROADCAST_ADDRESS is the address that is reachable by other temporal services.
Together these settings enable the membership coordination.
In Kubernetes this is the pod IP address, I am not sure of the analog in docker swarm mode. This is the IP that would be provided and showing the network the containers are connected to.
I can see how an example would help make this clearer. I will have to dig around docker docs and see what I can come up with.
This is the functionality from Kubernetes that enables this to work. https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/
I so far haven't been able to locate the docker equivalent. A DNS name is not going to be sufficient as this value needs to be unique per replica, this represents the IP reachable by other pods in the docker network.
You could allocate static IPs for each replica in the docker network, and then configure this per replica.
To be honest it is going to be more complicate than just using Kubernetes and helm.
Have you given k3d.io a try?
Make unique dns names much more simpler. If broadcast address can accept a dns name i can just launch it without containers and set a bunch of names in /etc/hosts I think an application can not require for k8 or any other orchestrator for launching in local environment Developers rarely have such expertise. And i can not blame them)) k8 is not very developer friendly
Without containers and on a local system using 127.0.0.1 with different unique ports in the services section.
Docker in swarm mode is where the problem occurs.
You do not need Kubernetes.
Right now we have helm for helping simplify running temporal with multiple replicas in a production scenario.
Temporal is a go binary and can be run without containers.
@ai-zelenin I am also looking into similar issues, adding my two cents for adding DNS names for docker configuration if it helps anyone.
You can write a bit of code to resolve DNS names at container startup and set the appropriate value for TEMPORAL_BROADCAST_ADDRESS.
For example, I added these couple of lines of code in entrypoint.sh
: "${TEMPORAL_BROADCAST_ADDRESS:=$(hostname -i)}"
export TEMPORAL_BROADCAST_ADDRESS