Container DNS: how web finds api by name
Select an icon to see what it is.
Step 4 of 6
web connects to the address
With the answer, web opens its connection to 172.18.0.3:3000. From here on it is plain bridge traffic and DNS is not involved. If api restarts with a new IP, the next lookup returns the new address.
connect()
172.18.0.2 -> 172.18.0.3:3000resolved from the name "api"