I'm hosing my web app on google cloud server and I also registered the domain on google. My problem is that when I access this web app within google clould server(RDP) it loads within a second, but if I try to access the web app outside(in south africa) the server, it takes lot of time to load(more than 10 seconds). What could be the issue? How can I fix this issue?
1 Answers
There could be a few reasons which can cause your web app to be slow outside of Google VM server.
Network Latency- One important thing to remember about network latency is that it’s a function of physics. If a server is located in a different physical location,accessing the web app from outside the server’s network may experience higher latency, resulting in slower performance.
Using external IP’s -Any time you transfer data or communicate between VMs, you can achieve max performance by always using the internal IP to communicate. In many cases, the difference in speed can be drastic. Below, you can see for a N1 machine, the bandwidth measured through iperf to the external IP was only 884 Mbits/sec
TCP window size- If you have ever wondered why a connection transmits at a fraction of the available bandwidth — even when both the client and the server are capable of higher rates — then it might be due to a window size mismatch.
Content delivery- If the web app includes large files or resources such as images,videos, javascript libraries,the delivery of these assets to users outside the server network may be slower due to longer network distances.
Server configuration- The server hosting the web app outside of Google VM server may not be optimized for performance, lacking necessary configurations or h/w resources to handle hing traffic effectively.
To diagnose specific issues you can test your network performance. Here are the tools which you can use- Iperf, Netperf,traceroute.
For more information refer to this blog written by Colt McAnlis.

- 2,123
- 3
- 11
-
Also using the CLI `curl` is very useful to figure out where the delay is: https://stackoverflow.com/a/57096190/8016720 This article has the method I use: https://www.hashbangcode.com/article/timing-page-responses-curl – John Hanley Aug 11 '23 at 18:45
-
Which tool can I use to show the apps that are consuming lot of bandwidth on the server? – chosenOne Thabs Aug 11 '23 at 20:08
-
NetFlow Analyzer is a flow-based bandwidth usage monitoring tool that helps you monitor your network's bandwidth usage in real-time. Flows exported to NetFlow Analyzer will help you understand which applications are consuming the most bandwidth and which are the top talkers in the network. Refer to this [link](https://www.manageengine.com/products/netflow/bandwidth-monitoring.html#:~:text=NetFlow%20Analyzer%20is%20a%20flow,top%20talkers%20in%20the%20network.) for more details. – Fariya Rahmat Aug 14 '23 at 08:18