0

I use Google Stackdriver Uptime Check on two websites. One of the sites shows a very steady latency graph, whereas the other site's latency graph is constantly spiking up and down.

The site that is constantly spiking is behind CloudFlare CDN.

What would be the reasons for a website's latency to be so volatile, and how might one fix this?

  • Can you do a test of the website with variable latency outside CloudFlare? I do this kind of thing from my local machine by changing the hosts file to point to the server IP. If your server has a firewall preventing direct access (it should) you'll need to whitelist your testing IP. CloudFlare IPs are [here](https://www.cloudflare.com/ips/). report back your findings. – Tim Nov 23 '19 at 19:38
  • Use MTR (or WinMTR or similar) to see where the jitter is coming in. – davidgo Nov 23 '19 at 23:26
  • Tim, thanks for your suggestion: I ran the Stackdriver test outside CloudFlare, but the latency volatility persisted. So I guess I must conclude that the problem is related to the server, not CloudFlare. But I'm not sure what to do next to diagnose the issue. – Silver Fox Nov 24 '19 at 11:41

2 Answers2

0

There is no possible answer for this without having an idea what is called.

One reason could be that the data (website) is not cacheable or marked as not cacheable (cloudflare not able to cache) and the servers of a part of the backend connection are overloaded, but again - we can not say more than that generic answer without knowing details about the service.

TomTom
  • 51,649
  • 7
  • 54
  • 136
  • Both the sites are WordPress sites using nginx and with caching enabled. The site with volatile latency is hosted on a Google Compute Engine SSD VPS running latest version of Debian and PHP-FPM 7.3, and using CloudFlare CDN with the Cloudflare Argo (smart routing) feature enabled – Silver Fox Nov 24 '19 at 12:27
0

Based on the information you have provided, I understand the following about your issue:

  • You have a website running on GCE that is running the latest version of Debian and PHP-FPM 7.3, using CloudFlare CDN (with the Cloudflare Argo feature enabled) and WordPress (using nginx with caching enabled).
  • The reports that you are receiving from Stackdriver Uptime Check is that the website’s latency graph is constantly spiking up and down which is unusual compared to your other website you have running.

Since you have already ruled out that after testing outside of CloudFlare, the latency issue did not change. We could believe that the issue could be related to the server itself, or GCE.

However, keep in mind that latency issue could be caused by many things, and by looking over this situation, these are the following possible causes:

  1. Latency issues could be caused by Wordpress, as the application is CPU intensive which could cause issues when working on the app.
  2. Latency issues could also be caused by the traffic that is passing through the website. If you have users going in and out of your website, this could cause major latency issues as the web server is attempting to accommodate the users accessing the pages.
  3. Depending on how you have set your VM instances on GCP, it could also be that you may not have enough resources set to accommodate the users passing through the website. It would be best to review your resources set on the VM, and adjust them to accommodate your needs.

An alternative way to fix latency issues on GCP is to have Load Balancing on your project. I would suggest looking into implementing a Load Balancer to optimizing application latency.

Hope this help!

Anthony Leo
  • 181
  • 4
  • Thanks Anthony, I would like to emphasise that the issue is not so much the latency, but rather the latency **volatility**: in other words, the Stackdriver uptime chart shows the latency constantly spiking up and down, and from all Stackdriver test regions (EU, Asia, South America etc) – Silver Fox Nov 28 '19 at 09:36
  • In regards to Latency Volatility, It is possible for latency to be liable to change rapidly and unpredictably across different regions. However, without having the charts available to analyze and troubleshoot this issue further, It would be best for you to redirect this issue to Issue Tracker (https://cloud.google.com/support/docs/issue-trackers) and mark it under Stackdriver Monitor so that the Stackdriver Monitor product team can have a look at this issue further. – Anthony Leo Dec 02 '19 at 13:33