Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Host alias not getting correctly configured

I have two Message Processors :-

10.80.96.4:9002 and 10.80.96.17:9002

I have load-balanced them using 10.80.96.32:9002

I have made three entries for the above as :-

{
    "hostAliases": [
        "10.80.96.4:9002",
        "10.80.96.17:9002",
        "10.80.96.32:9002"
    ],
    "interfaces": [],
    "listenOptions": [],
    "name": "default",
    "port": "9002",
    "retryOptions": []
}

I am able to call all my APIs using any of the above three IPs.

I now have a load-balanced VIP api-abcd.com which is pointing to 10.80.96.32:9002

I have made a new entry like this :-

{
    "hostAliases": [
        "10.80.96.4:9002",
        "10.80.96.17:9002",
        "10.80.96.32:9002",
	"api-abcd.com"
    ],
    "interfaces": [],
    "listenOptions": [],
    "name": "default",
    "port": "9002",
    "retryOptions": []
}

I am able to access my APIs using the three IPs but I am not able to access them using VIP in the host.

I checked the deployments for an API poc-ankit. I found the following :-

http://10.80.96.4:9002/poc-ankit 
http://10.80.96.17:9002/poc-ankit
http://10.80.96.32:9002/poc-ankit
http://api-abcd.com:9002/poc-ankit

Why is 9002 being appended as port in the 4th URL. I want to invoke my API like :-

http://api-abcd.com/poc-ankit

Please help

0 7 351
7 REPLIES 7