Fast websites in China – Optimizing delivery for great experiences

Fast websites in China – Optimizing delivery for great experiences

You may have a website and you want to serve content to the Chinese market. However, you hear anecdotally that there may be performance issues with China delivery, and you need to figure out a plan improve the situation.

Rich Howard
Rich Howard

Founder & CEO

China is a rapidly growing market.

At the time of writing, this country contained:

  • 20% of the global population
  • 10% of the global wealth
  • a middle class of over 109 million people.

According to a report published by Credit Suisse, China’s wealth growth is especially impressive when viewed over a longer time frame. In 2000, the country’s wealth was similar to that of the U.S. circa 1939, the report found. By 2015, it had expanded to the level of the U.S. in 1972, effectively accomplishing a 33-year leap in less than half the time. Household wealth in China is expected to continue to exceed the growth rate of developed economies, putting it on track to create 2.3 million millionaires by 2020, a 74% increase from today.

It short, this represents an enormous opportunity for international companies to grow their business and expand their reach.

full-width

At the same time, there are some very specific challenges of doing business over the Internet in China that you simple do not encounter in other countries.

The Internet in China is heavily controlled by the Chinese Government. Internet traffic from overseas gets routed and scanned via the “Great Firewall” (防火长城) before being delivered to end users. This system was put in place to moderate and filter foreign content and slow down content from overseas.

China also uses the Great Firewall to block content from sites that it does not like. For instance, Facebook, Twitter and Google are all not accessible from China (unless you specifically make use of VPN solutions to get around these restrictions).

The challenge for Western companies looking to do business is the delivery of Web and App content into China. We know that poor performance equates directly with a bad user experience and decreased engagement and conversion. Any competitor delivering that is already serving content within the Great Firewall will immediately have a competitive advantage over a business who is serving content from outside.

Also, since modern websites make heavy use of 3rd parties, these can also pose an issue where they may become blocked, either on a temporary or permanent basis. Regular monitoring of these is KEY to ensuring a consistent and fast user experience.

The challenge of web performance in China

full-width

You may have a website and you want to serve content to the Chinese market. However, you hear anecdotally that there may be performance issues with China delivery, and you need to figure out a plan improve the situation.

Internet speeds for accessing content outside the country grind to a halt and are so slow that they become unusable after 8pm Beijing time — probably due to traffic congestion on international backbone links.

The challenge is, where do you begin?

First, we measure

Before kicking off a program to optimize web performance, some form of measurement is required. This is important simply to understand the scale of the problem at hand. For end user experience, this will typically consist of setting up and analyzing data from two types of performance tools: Synthetic monitoring and Real User Monitoring (RUM).

Synthetic monitoring

full-width

Synthetic tools measure your website using a test agent setup to perform a specific set of actions. In the case of an e-commerce website, on journey may be to focus on Product search:

Homepage > Product Search > Select Typeahead Result > Search Results page > Product page

Another type of journey may be a “Buy journey”, which may consist of:

Home > Product Listings > Product Detail > Add to Basket > Basket > Checkout > Order Confirmation

Either way, you’ll want to set these up to be measured both within the country and outside the country, so you can understand the relative performance differences between accessing in and out of country. This data can be very useful in helping you to identify specific performance issues.

The synthetic data is really useful, but it has several key challenges, which is why we normally recommend pairing it with Real User Monitoring (RUM) data:

  • Synthetic scripts will be deployed in an environment which at best will simulate end user performance using a throttling profile. It will not give you a wide breadth of data e.g. multiple device types, multiple operating systems etc.
  • It will always follow a set path, based on what you tell it to do. It will not detect performance issues on pages that you are not measuring.
  • Synthetic agents are limited in their location. Some of the better synthetic companies have upwards of 40 global measurement locations; others only have a handful.

Examples of Synthetic tools include Rigor , Catchpoint and Dynatrace .

Real User Monitoring (RUM)

full-width

Real User Monitoring (RUM) is like the Google or Adobe Analytics of performance. Performance data is captured and sent back for analysis for each user visiting your site. This data set is much larger than Synthetic data and as such is the “real truth” when it comes to performance. With this data, you’ll be able to segment by various groups, including those that originate from China. However, this data will be quite noisy. As such, it’s really good for showing you where you have performance issues; synthetic data is still better for showing what you can do to fix performance issues.

The challenges with this data set are as follows:

  • If the page is blocked entirely, then you probably won’t know about it because the RUM tag will never get fired.
  • The data is noisy and as such is not that useful for debugging performance issues.
  • It requires integration on every page and may take some time to get installed.
  • It may not capture all performance data – this is really dependent on which browser is being used (i.e. Safari is notoriously bad at sending back detailed performance data).

Examples of RUM tools include: Akamai mPulse , Dynatrace RUM and New Relic Browser Monitoring .

Examples of good and bad performance in China

Bad: Rolex China

full-width

This is Rolex China’s store locator page, measured from 2 locations – Beijing (black line) and California (blue line). In this example, we see huge spikes in performance from time to time in the measurement from Beijing, which is symptomatic of content passing through the Great Firewall (GFW). Additionally, the measurements from Beijing are overall on average about 2.5 – 3 seconds slower than those in Northern California. CDN used: Akamai. Performance Test tool: Rigor .

Bad: Patek Philippe China

full-width

This is Patek Philippe’s Store Locator page (Chinese version), measured from 2 locations – Beijing (black line) and California (blue line). For this we looked at Visually Complete, which is the time to complete a full, above the fold render. Generally speaking the results from China are about 1.5 seconds slower than the results from Northern California. You’ll can also see a lot more variability in the measurement from China. These appear to be tied to some slow third parties, which are loading before some of the above the fold content. Performance Test tool: Rigor

Good (but variable): Nike China

full-width

This is Nike China’s homepage, measured from 2 locations – Beijing (black line) and California (blue line). For this we looked at Visually Complete, which is the time to complete a full, above the fold render. Generally speaking the results from China are faster than the results from Northern California. What’s more worrying is the random spikes that we see in the data, which is still indicative of some assets that are taking a long time to load. Therefore it makes sense to focus in on those in more detail to understand what may be holding up the performance of this page. CDN used: Akamai. Performance Test tool: Rigor

In the cases where the performance heavily degrades, we can see that this is tied to a slowdown in their images domain (c.static-nike.com) which is making use of Cloudinary to serve their images. Since this does not appear to be be well optimized for China, we would recommend an alternative delivery mechanism for images into this country.

full-width

Slow transfer speeds primarily from the c.static-nike.com domain – Cloudinary.

Why is a China specific CDN important?

Content not delivered directly into China will be slow coming into China. All content gets filtered by the Great Firewall of China and is often the cause of the bottleneck. The only CDN operators in China are those authorized by the Chinese Ministry of Information and Industry (MIIT). Many of the CDN providers that operate in other territories simply do not have presence in China, or rely upon a 3rd party to help them deliver to China. However, you still require an ICP license even if your site is hosted abroad and you use a Chinese CDN to accelerate delivery into the country.

So if the assets originate from outside, then they are going to be very slow at peak times. This becomes pretty evident in the performance spikes that you see in the chart above, which has not yet been optimized for China delivery.

Who provides China specific CDN services?

full-width

There are a number of providers that have established networks behind the Great Firewall. The following list is not exhaustive, but definitely a good place to start:

Regulatory issues and ICP licenses

What is an ICP license and why do we need it?

An ICP (Internet Content Provider) license is a permit issued by the Ministry of Industry and Information Technology (MIIT) of China that allows websites to be served from and operate in China.

For more information on this, please see our post on ICP licensing .

How do you secure an ICP license?

This is a multi-step process. Check out our post on ICP licensing for more specifics.

What if we don’t meet the criteria to apply for an ICP license?

If you are unable to meet the criteria for an ICP license (and therefore gain the ability to serve content directly), then you will be at a distinct disadvantage when it comes to performance. However, we do recommend the following:

  • Monitor and keep a close eye on your performance in China.
  • Scale back the the complexity of your experience for your Chinese audience. Consider serving simplified or cut down versions of your pages to a Chinese audience. Optimize as much as possible.
  • Remove most of your 3rd party tags (especially those that do not work well in China) and remove absolutely anything superfluous to the page.
  • Work with a CDN provider that has local access points (edge servers) in Hong Kong. This is the closest and best peered market with Mainland China.
  • Work with 3rd party vendors that can serve some of your static content through their local infrastructure.
  • Offload as much as you can to your Content Delivery Network.

Other issues impacting web performance in China that you should be aware of

3rd party integrations

full-width

Managing 3rd parties in China is a different ballgame in China, since so many more have been blocked. Also the 3rd party vendors that you use there could very well be specific to the Chinese market.

The following have been blocked previously or are currently blocked:

Facebook, Twitter, Instagram, Pinterest, Quora, Tumblr, Snapchat, SoundCloud, Google+, Hangouts, Google.com search engine, Youtube, Vimeo, Spotify, Gsuite, Pandora Radio, Slideshare, Dropbox, Scribd

3rd parties may not be optimized to deliver quickly into China. Or they may have Chinese alternatives that work better locally.

We recommend that you test your pages from within China using synthetic testing to understand:

  • Which 3rd parties have been blocked (you almost certainly will have some) and should be removed.
  • Which 3rd parties are very slow and not worth keeping (you almost certainly will have some).

It is also important to understand that this situation can change over time, and is something that requires constant monitoring and attention.

Dynamic content served from origin via CDN

These requests go via your CDN but ultimately still hit your infrastructure before returning a result. Therefore they can often be slow since they pass through the Great Firewall. In order to speed things up, ideally host your origin servers locally in China, or host outside but lean heavily on CDN caching for absolutely everything that you possibly can.

CDN Cache setup in low traffic situations

If you’re not getting a lot of traffic initially from within China, the CDN cache nodes may not be warm, especially if your cache expiration times are not long and you don’t have tiered or distributed caching enabled. In these cases, performance is degraded as the CDN has to fetch content from your origin servers. We recommend you keep an eye on offload percentages and tuning this as appropriate based on your business requirements.

DNS (Domain Name System)

DNS resolution using DNS servers located outside of China can often be slow. Similarly, TLS connections can take a long time to establish too. Consider making use of a DNS provider that can serve the Chinese market. Some examples include:

In summary

There are several important aspects to consider when optimizing websites for the Chinese market. Hosting or serving content from within the country is important, as is keeping a close eye on your 3rd parties.

If all of this seems overwhelming, don’t worry, you are not alone!

Optimal provides China specific optimization services to help large enterprises with these problems. Please contact us if you are interested in these services.

View all articles

Stay up-to-date on the latest performance news and tips

We believe it is important to keep abreast of industry developments. Join our newsletter and never miss out on breaking industry news again.

* We hate spam as much as you do and promise not to bombard you with emails.

Newsletter