Blog / CDN or Chinafy? Which One Do You Need?

CDN or Chinafy? Which One Do You Need?

One of the questions we get often is "We already have a CDN, why do we need Chinafy?" 

To answer this question, let's go back to Basics: 

Question 1: Why do Foreign Sites Not Work in China? 

Question 2: What do Content Delivery Networks (CDNs) do? 

TLDR;

CDNs do not address resource Compatibility. They are also slow in China. 


Why do Foreign Sites Not Work in China?

Compatibility

The main reason sites don't work is Compatibility. A website or web page typically comprises of ~100 components called Resources. These can be more visible components like images, Instagram embeds, Facebook Like widgets, or Google Maps, or they may be less obvious components like JavaScript (which might power an image carousel), Fonts, Recaptcha (for bot detection / real-human verification), or analytics trackers. For the most part, a number of these Resources are outright blocked in China, and the vast majority of them don't load because the server/network is too slow.  

Compatibility is typically addressed on the Webpage-side, and not the Infrastructure side. Questions that come up are:

Does Youtube work?

How about Google Maps?

How about Adobe Typekit? 

How about Fonts? 

Are we using Google Translate?

How about Recaptcha?

While some of these questions are easy, or straight-forward to answer, the difficulty often lies in having a site already built for a Western, or Google framework. Once a site is built, optimised for a 'Google' environment, and processes are established, it's difficult to get anyone to change the way they populate or add to the site (i.e."You mean I can't upload our videos to Youtube anymore? That's one of our key acquisition channels - what the *** am I supposed to do?"). These are better handled by automation. 

Speed

The second reason sites don't work is Speed. Speed is a broad term that is impacted at many points along the web development chain. When the connection is slow, some resources will take too long, or simply fail to load (i.e. time out) - they should eventually appear although nobody wants to wait 5-6 minutes for a site to load. 

Speed is typically addressed on both the Webpage side, as well as the Infrastructure or Network side. On the Webpage-side, some questions to evaluate with your Content Management System (CMS) are:

Are images compressed?

Are files minified?

Which components are blocking? 

Which components are dependent?

Which initiators could be slow or blocked? and thus affect other resources?

On the Infrastructure side, common questions are:

Which hosting company do I use? 

Does the server have enough capacity? 

What is latency in China like? 

What is Bandwidth, or Throughput like in China? 

How many 3rd party domains do I rely on? How reliable are these?

Am I using HTTP/2?

Brotli or Gzip Compression?

Cache? or No-Cache?

Which components are static? Which are dynamic? 

and more...

For a deeper dive on both Speed and Compatibility read our "How do Sites Actually Load in China.

What do CDNs do? 

CDNs perform a variety of functions, the most traditional being accelerating the "delivery of content". When you load a webpage, or watch a video, that file is stored somewhere on the 'Internet.' What does that mean?


Speed

There are two key aspects to speed: Latency, and Throughput. Let's say you're a US-based company, and your server is based in San Francisco. If your visitors are browsing your site from say Europe or Australia, it takes a long time to load the page. The physical distance data needs to cover is 8,948kms to Europe, and 11,940kms to Sydney. For data to cover that distance, it takes 149 milliseconds (ms) to Europe, and 151ms to Sydney - this is called Latency, that is, the time it takes a small piece of data to from Point A to Point B, and back. The second aspect of speed is Throughput or Bandwidth - that is, how much data can transfer from Point A, to Point B in one second. If a 1MB file takes 2 seconds, and you have 10 images, then 20 seconds won't cut it for a consumer experience. 

As mentioned above, each web site is comprised of a number of components or 'Resources' - typically about ~100 of them, although some sites have upwards of 300. While 150ms isn't that long of a time to wait for one resource, when you're loading 300 resources, this time starts to add up. Even worse, in China, latency is sometimes upwards closer to 1 full second!

What CDNs do is place that specific file much closer to you by storing it on nodes or servers all around the world (note: these servers are often called POPs which stand for Point of Presence). If that file is hosted with a company called Akamai (the largest CDN), it's likely that file may literally be on a server hosted next door or in your building (they have over 175,000 locations globally). This way, you don't need to go 'across the world' to retrieve that webpage, you can literally just load it from 'across the street'. Generally, when a CDN Node or Server is closer to you, the Latency is lower (i.e. faster), and Throughput is Higher (i.e. faster). 

Security

Another important element to CDNs nowadays is security, where CDNs are the "first line of defence" for many sites offering Web Application Firewalls (WAF) and Distributed Denial of Service (DDOS) protection - this isn't as relevant here though. We really just wanted add these monsters/ghouls into the graphic below.


Where does China come into Play?

With China, there's an ongoing friction between Web Developers and DevOps as to who should 'fix' this but it squarely involves both types of roles as the issues span across Compatibility, and Speed, at multiple touch points along the web development and infrastructure. 

Area 1: Compatibility - 70% of the Equation

This is where Chinafy shines. Chinafy identifies, modifies and replaces incompatible resources to ensure they load fully, and quickly in China. It further goes onto identifying slow resources, and then accelerating those accordingly. 

To identify these resources, transcode, and maintain a process for an entire site for the Chinese market takes considerable effort for any web developer. We find that where this is done in-house, the site quickly fails when the site is updated by 'Marketers' (no offence Marketers, this is just technical stuff). 

While there are Content Management Systems that purportedly streamline this process, they're very expensive (i.e. US$1mm/year - reach out to us for this datapoint) and even in those cases, extremely rare to see any site handle this properly. 

Area 2: Speed - 30% of the Equation

CDNs (non-Chinese CDNs to be precise) host content in many locations around the world, except China. For this reason, having a "Global Content Delivery Network" should be read more accurately as a "Global Content Delivery Network - except China". While the nuances of why CDNs don't, or can't host content in Mainland China is beyond the scope of this article, what happens is that when Chinese users load your site, they're retrieving files from CDN nodes generally outside of China - often these nodes may be in the US. 

To get around this, global companies need to set up a Multi-CDN infrastructure although this is still considerably more complex to set up. This only addresses the infrastructure side of the equation and you're still left with the Web-side, i.e.:

Are images compressed?

Are files minified?

Which components are blocking?

Which components are dependent?

Which initiators could be slow or blocked? and thus affect other resources?

and you would need to set up a system for this too. 

Wrapping Up

Optimising sites for China is an incredibly complex undertaking that typically requires a large team that understands the nuances. If you're paying for a large team, then you're spending too much money and you should have simply just Chinafied it...


×

Notey will use the information you provide on this form to be in touch with you and to provide updates and marketing. Please let us know all the ways you would like to hear from us:

You can change your mind at any time by clicking the unsubscribe link in the footer of any email you receive from us, or by contacting us at community@notey.com. We will treat your information with respect. For more information about our privacy practices please visit our website. By clicking below, you agree that we may process your information in accordance with these terms.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.