Communicate between containers¶
Containerized application environments often require internal service communication. In MedStack Control, service containers can be accessed over the internal network by using the service name as the host address/local DNS name.
For example, sending a packet from one container (service name "backend") to another container (service named "cache") you could communicate in the following way:
# Inside "backend" container shell
ping cache
You can also communicate over specific protocols and ports within the internal network. In the case of a redis service named "cache", that could look like:
# Inside "backend" container shell
ping redis://cache:6379