Search code examples
google-cloud-platformipip-addressreserved-ip-addresses

Google Cloud Platform external IP point to an instance in Singapore but shown in US


I purchased a GCP VM instance in asia-southeast1 and reserved an external IP in the same region for this.

The instance and IP information that is shown in GCP console seems to be okay but when I deploy my website into it, the response is really slow.

My static IP
VM instance

So I lookup my IP and the tool show my IP is from US

IP lookup result

I am not sure what wrong with my IP or instance, I am new in GCP please help. Thank you.


Solution

  • Thank guys for clarification about the IP, it is not related to my issue. I got confused with GeoIP at first.

    After all, I found out that the slow response is caused by 2 things below:

    • Database region: My Google Cloud Sql (mysql) region is in Australia because GCP Cloud Database has no server in SEA. I tried to change database region to asia-east (exactly is in Taiwan) and got doubly faster response.

    • Connection method: GCP provide 2 ways to connect to its cloud sql: Database External IP (with IP whitelist config) and via Cloud SQL Proxy that both have network latency. I think GCP should support database communication inside a VPC. I am not sure why GCP does not support this way currently.

    The response of my website is now better but much slower as compared with the same one I deployed into AWS. In AWS the communication between my App and database is done inside a VPC, no public IP exposed and no network latency. Moreover, AWS database have server in SEA that why AWS is much faster in my case
    Response time: GCP vs AWS