VM Instance group to configure to listen on port 8

2019-02-21 04:41发布

I have configure my VM in such a way that I have 2 application running on one VM. First App listen on ip:80 port Second App listen on ip:8080 port

I have enabled ports on VM instances group like this.

enter image description here

I have my Load Balancer configured with two front rules like this.

enter image description here

I want to map ip1:80 to my 80 port application and ip2:8080 to 8080 application

when I tried accessing my application using load balancers IP address it always show me 8080 port application.

I have two backend service running help me here google team. I m newb

2条回答
倾城 Initia
2楼-- · 2019-02-21 05:35

I had similar problem and I had to add second backend. So I have two backends: one for 80 port, other for 8080. And I have on managed group.

查看更多
何必那么认真
3楼-- · 2019-02-21 05:40

If you want to use IP addresses but not URLs/Domain(s) to reach to your web applications, then URL Maps cannot help to implement your design, as URL map forwards the request to the correct backend service using host values (example.com) and path values (/path) in the destination URL.

That being said, you can add one more Target Proxy to your LB resources to route incoming requests directly to the desired backend services. This will allow you to keep your minimum number of instances as one VM.

For more information, visit this article.

查看更多
登录 后发表回答