curl refused to connect between two separate apps using private ip.

Hi, I hope everyone is good. I am running two apps, written in Rust, say A and B. App A wants to send some stats to app B(a web server with 3 instances running) A should send these stats to all three of them. I am trying to curl 3 instances from app A via private IP assigned to each instance, which says connection refused on port 80/443. While app B is accessible via the public IP. Your help will be highly appreciated.

Hi @Zaid

When making internal requests between two apps you need to use the internal port, so if your app B is public port 80/443 and internal port 4000, you need to use port 4000 when making requests from app A to app B.

1 Like