At the time of writing (5 Feb), the novel coronavirus has infected 24,539 people, the bulk of which are in Mainland China. With the travel restrictions, quarantines, and general limitations on people-movement, large cities like Beijing, and Shanghai are ghost-towns without anyone in sight.
What once were busy areas filled with cars and foot-traffic, are now empty streets and shops, just waiting for time (and this virus) to pass:
With 1.4 billion people, where, have they all gone? Online.
While our thoughts, and prayers are with those affected, we wanted to look at the impact that real-world events such as these have on user experience, page composition and network infrastructure. In this analysis, we set out to find:
i) How did the Coronavirus affect the Internet in China
ii) Why and how it affects business websites
iii) What performance geeks like us can do about it
TLDR; The Coronavirus, self-imposed quarantines, and subsequent increase in internet usage has led to an approximately 30% or 6.5 sec increase in page loading times for websites hosted outside of China.
With everyone moving online, we wanted to look at internet traffic, and bandwidth consumption - largely, as it relates to cross-border onshore/offshore traffic. While onshore DNS, and CDN servers can easily handle 2-4x jumps on traffic (a higher baseline vs bursts in traffic), it's different when you consider the limited connections, and limited bandwidth between China and the global market. We wanted to seek out and answer questions like:
- How are the sites they visit affected?
- How are those sports highlight videos affected?
We start at the top of the funnel, or at the DNS query response time. When you enter in: www.yoursite.com, on your computer/phone, there is a server (a DNS server) which tells your browser which IP/Location is the 'actual' server you are retrieving content from.
Let's assume, for all intensive purposes that Chinese New Year coincides with limitations on travel.
Prior to Chinese New Year (CNY) on January 25th 2020, we see DNS query response times taking ~300ms on average, with them bouncing up almost immediately to around ~350ms, or 17% higher than 'normal'. While 50ms is 'huge' by Western standards (where you might commonly see 60-100ms response times), when dealing with cross-border traffic there doesn't appear (on the surface) to be much to fret about.
CDN response times, similarly, seem to have had a slightly lesser impact with 153ms response times prior to CNY, increasing 12ms to 165ms - a 15% increase.
Looking further at CDNs, we consider now the impact on bandwidth, or throughput. That is, how much content can bebeing transferred into China per-second on a single request. Prior to CNY, we see bandwidth humming along, like grandma's old Datsun, with throughput speeds ~3,000kbps (bits) or 375KBps (bytes). In early February, we see these speeds having dropped precipitously down to -27% to ~ 2,200kbps or 275KBps - seems the Datsun has a flat tire.
At Chinafy, we're constantly monitoring the performance of websites, and their constituent parts. Measuring the speed of a site isn't straight-forward, it's path-dependent in nature where one component loads other components, and the sequence upon which file is actually retrieved differing from one instance, to the next. On top of this, there are ad trackers, and chat bots that are constantly pinging their origin servers. We generally say a page has loaded when you reach a Dom Complete state (i.e. when all the essential components are loaded).
We have a few data sets we're running, in this case, it's a mix of the Fortune 500, and S&P 500.
In China, the DNS requests consist of about 6% of the total webpage loading time with the total sum of DNS requests taking (considering concurrency) about 1.4 seconds on average for a typical page (wow!).
Coming back to the coronavirus we see that over the past few weeks, the marginal DNS response time increase of 50ms, has led in fact to a ~ 0.2-0.3 second increase in page loading time.
CDNs are similar to DNSs in the sense that, today, it's not one CDN which loads all the files, it's the 10-15 CDNs through which the 20-30 supporting domains pass files to the end-user. CDN Response time takes into account 20% of a page's full loading time, or a whopping ~5 seconds! Granted, there are different quality CDNs out there, but when you're relying on a font, or more importantly, images, from a slow provider, this has a severe visual impact on your end user experience. How has this changed?
Over the last few weeks, we see similarly that prior to the onset of the coronavirus, the CDN response time represented about 4.6 secs of a page's full loading time, with it increasing to around 5.1 seconds - an increase of 0.5 secs.
Five seconds is huge! With the 1.4 second DNS lookups, and an additional 5 seconds with CDN responses, you're looking at an almost entirely blank page for 6.4 seconds.
CDN bandwidth represents about 73% of the entire page loading time. With bandwidth at 375 KBps dropping down to 275KBps following the coronavirus outbreak, the time-allocated bandwidth for a 4 MB webpage goes from ~ 16 secs up to around 22 seconds.
Putting this all together now, prior to the coronavirus, pages took 22.0 sec on average to fully load, and now, they're even less usable now at a 28.5 secs.
That's a 30% or 6.5 sec increase in page loading times due to the coronavirus (damn that virus!).
These are averages - in reality, highly optimised pages that once took 4 secs to load, now take 5.25 secs to load - and poorly performing sites which took 40 seconds, now take 52 seconds. As bandwidth becomes limited, some sites begin to just timeout (i.e. not load at all).
As it relates to the coronavirus, and for those in infected areas, we'd defer to the WHO guidelines of wearing a mask, staying indoors, and most importantly, washing hands frequently.
For the web developers, performance consultants, strategists, and engineers concerned about web optimisation and page-loading times in China - reach out to us. While global loading times are indeed affected during this period of increased usage, we can continue to load foreign sites in China within about 4-6 seconds.
Stay safe, y'all.