Solutions for AEM and Edge Delivery Service Performance in China
If you haven’t put serious thought into how you’re tackling the problem of website performance for mainland China (or other locales that may need specific handling like Turkey or Russia), please first watch this first quick video on some considerations (and potential pitfalls) that orgs run into when considering whether or not to spend effort against in-China web performance:
Part 1 of the running-marketing-sites-in-China journey also details these challenges.
But let’s say you’re past that, and after analyzing your current site’s user experience in China you’ve decided SOMETHING HAS TO CHANGE. The next big question is: WHAT DO YOU DO? What are your options?
If you’re running either Adobe Experience Manager self-hosted (AEM 6.5) or AEM as a Cloud Service, or if you’re running the new Adobe Edge Delivery Service (or even if you have a mix of other CMS’s) this post is for you.
What’s Involved in Hosting in China?
Hosting your site in China gets you a number of decided advantages, but is a complex and rather involved process that comes with limitations as well. For example:
- Significant latency penalty for Chinese visitors when hosted outside of China: As noted in the last article, hosting outside of China means you will most likely be subject to a significant penalty in terms of latency and quality-of-service as compared to in-China hosting. In some cases, and for some sites, your performance may be acceptable, but for others it’s a deal-breaker – and only your RUM analytics can tell you the story of whether you’re turning away customers due to a sluggish or unusable site.
- Ability to use in-China CDN: In order to use an in-China CDN provider like Akamai China or China Cache, you need to be hosted inside of China, and also need to have a license for your content as well (see ICP license section below).
- Subject to blocking & quality-of-service limits: If you’re outside China, your site experience will also be highly-variable, subject to potential blocking without recourse, as well as random (or seemingly-random) quality-of-service degradation.
- Online Sales within China or accepting Payment: If your mission is to accept payment inside China or sell & deliver products & services to Chinese residents, you’ll need a licensed, hosted-in-China site.
China ICP Licensing: When You Need It and When You Don’t
In order to host any website within the borders of mainland China (i.e. not in Hong Kong or Macau), the first thing you’ll need to do is to apply for what’s called an ICP License.
ICP stands for “Internet Content Provider” and is a state-issued registration that allows a China-based website to legally exist. Two different licenses are available – essentially one for commercial activities, and the other (called a Bei’an license) for non-commercial activities. You require a commercial license though if you intend to:
- Make any online sales in China
- Advertise products in china
- Conduct any business activities that involve payments through your Internet platform
If you intend to host any of this on a server in mainland China, or if you intend to host outside of China but use an in-China CDN like Akamai to accelerate your web traffic, you need to get an ICP license first. This site give a very informative rundown on the ICP process and what’s involved.
Another facet of this is that generally only Chinese citizens and companies can get approved for an ICP license. From the site linked above, the following individuals & entities can apply for a license:
- Chinese nationals who use their state-issued ID. They are eligible to apply for an individual ICP.
- Foreign passport holders who use their passports as identification. They must be physically present in the country for a long enough duration that they can fulfill basic registration requirements. They can acquire individual ICP.
- Chinese-owned businesses with a Chinese business license can apply for a business ICP license.
- Wholly foreign-owned businesses with a Chinese business license can apply for a business ICP license.
- Joint venture businesses where more than 50% of the company is owned by a Chinese company can apply for a business ICP license.
Once you’ve got an ICP license, you can then start building out infrastructure – either just by deploying your content via a CDN and a .cn domain, or by using a local ISP like AliCloud to host your content.
Is AEM as a Cloud Service Available Inside China?
It is NOT, and there are no plans at this point for AEM as a Cloud Service to be available in mainland China. As noted in AEM as a Cloud Service a Year Later – Update on Features & Limitations the closest you’d be able to get, geographically, to running AEMaaCS in China is the APAC-Japan region. There are too many components that comprise AEM as a Cloud Service that rely on 3rd-party cloud services not available in mainland China.
Is Edge Delivery Service (Helix) Available Inside China?
It is NOT. Edge Delivery Services (formerly “Helix” and “Franklin”) is not available in mainland China. EDS relies on the Fastly CDN, and Fastly does not have points of presence on the Chinese mainland, so any infrastructure you build to ensure fast performance in China will have to include other in-China caching or event streaming solutions to deal with your specific delivery needs.
Options for Designing an In-China Infrastructure
The “traditional” way to solve in-China performance is through pure brute force, and duplicating a large fraction of your infrastructure in China. This can work if you’ve got a self-hosted AEM 6.5 (or similar CMS setup).
The Brute-Force AEM 6.5 Duplicative-Infrastructure Approach
The set-up: Let’s assume you’re a US company with an existing AEM environment. It’s a three-publisher setup with a standalone Author, and most of your Authoring manpower is in the USA. You front your website with Akamai, but that’s just the normal “Global-but-not-China” Akamai service that you’re paying for. You’ve got a SolrCloud search backend that builds many of your pages on the fly out of search, as well as a legacy PIM (product information management) system that has a catalog of all of your products and specifications. You use Dynamic Media for your images and video content. What might your in-China AEM infrastructure look like, and what are some gotchas on this?
In the infrastructure schematic above, you can see the global infra on the left, and the newly-deployed China infra on the right. The vertical, heavy red dashed line represents everything inside or outside of mainland China. The red dotted lines all represent high-latency, potentially slow/unreliable connections outside of China.
A few points to make about this diagram which might be food for thought for your own China plans:
- Akamai: The global Akamai CDN product is not really a “global” product, but really “global except China” just like every other CDN (Limelight, Fastly, Cloudflare, etc). In order to get CDN services in China (which in most cases is a complete necessity) you need to first procure an ICP license for your domain, and then work with Akamai to acquire the Akamai China CDN product which gives you content delivery to the Chinese market.
- Putting both Publishers and Dispatcher in China: As the license cost of AEM publishers is very high, it can be tempting to only put a dispatcher server in China as a local caching layer, and having that go back to your publish tier back in the main USA datacenter. Realize though that the latency between your Chinese infrastructure and the USA is very high (with a possibility for errors & connection resets), so unless your cache hit ratio is planned to be +98%, it would be unwise to rely on such a connection.
- Search Infrastructure: In this example you can see the SolrCloud search cluster only existing in the USA. If Search is only used infrequently, this could be an acceptable trade-off to duplicating your search hardware in China. However, if search is used often, this could create a major performance bottleneck. Also, given that China -> USA connections frequently lag or drop entirely (especially if the user generates a search string that triggers content filters in any way) the search backend may error out, thus returning ugly search errors to your China users.
- Adobe Dynamic Media: Out of the box, Dynamic Media will only get you as close as Hong Kong or Singapore, as Akamai is used as the edge for Dynamic Media. However, the word on the street is that if you acquire an ICP license for your custom Dynamic Media domain, you can speak to Dynamic Media Support at Adobe, and they can set up an in-China endpoint for your Dynamic Media. I’ve never attempted this, so at this point this is just theory, but I’m told it’s possible.
- Adobe Launch: Also to be covered in my cloud services post, but Adobe Launch too will not be served from China. Your workaround for this, if latency is too slow, is to run Launch in SFTP self-host mode instead of hosted by Adobe.
- Okta / SSO / Login: At this point in time, due to the murky waters of China’s data residency law, Okta only supports SAML2 auth and not Federated SSO in China. It also means that if you’re authenticating against AD or LDAP, you would need to have Okta authenticating against an LDAP directory physically located in China.
- Maintainability / Effort / Expense: This is also a VERY HIGH-EFFORT and high-cost infrastructure, as it requires basically doubling your infrastructure spend and instance count, purely to serve an additional geography.
Also - this AEM infrastructure listed above is a simplified one, and many AEM implementations end up with considerably more integration points than this one – especially as they connect with legacy sites and backend systems, and especially if they also perform an eCommerce role and need to have the user-facing servers integrate with product management, Magento/Hybris, or other tooling. The most important take-away is that in evaluating a service design for China, one has to think with ALL the ways it will have to talk to anything outside of AEM, and to also isolate which of those communication points have a direct real-time impact on a user request.
The Event Streaming Approach (StreamX)
With this approach, instead of relying on a complete duplication of your AEM or other website infrastructure in China, you turn the whole paradigm on its head with respect to caching and assume that only the UPDATES need to be pushed out to the edge (as opposed to requiring that a cache tier close to the user be reactively updated when a user requests a resource).
Please first watch our podcast on event streaming with the StreamX co-founder for an in-depth explanation on how this works.
This way, you can push a lightweight StreamX infrastructure into China (which does still require you to get an ICP license as noted above), an infrastructure which then gets updates streamed TO IT from your onshore CMS infrastructure, updates appropriate to China.
The Caching Approach (Chinafy)
This approach uses a specialized caching & website delivery service called Chinafy, which gets you over two major hurdles:
- In-China delivery - Chinafy locates the caching infrastructure inside China (still requiring that you be properly ICP-licensed) so that you can have in-China delivery nodes for your AEM content.
- Resource translation - there are a large number of resources that have delivery issues in China - either being blocked and not available at all (Google services, ShareThis, many tag management services, video delivery services, etc). Chinafy has a proprietary system of translation & work with you to set up mappings for your in-China site so that resources that have issues with local delivery get translated & delivered in a way that Chinese users can consume. Videos get transcoded and delivered via appropriate platforms, tag management services proxed, etc.
Please watch our podcast with Chinafy SVP Jodie Chan on how this solution works.
YES BUT WHAT SHOULD I DO
The core problem is that every company has its own unique blend of user base, features, resources, staffing, budget and business goals.
The right design and approach for you depends on each of those things, and that means taking a solid look at your resources, challenges and goals to determine the right path forward.
We LOVE talking about these problems. Please reach out, we’d love to help point you in the right direction.
Tad Reeves
Principal Architect at Arbory Digital
AEM Architect & DevOps guy with 14 years experience on AEM/CQ and 25+ years in systems infrastructure. He’s been mountain biking longer than he’s been doing system administration, and though originally from Maine, makes his home in the mountains of Northwest Georgia.
Like what you heard? Have questions about what’s right for you? We’d love to talk! Contact Us
Podcast Episodes & Blog Posts
How do you solve the constant problem of cache freshness and backend system latency in any modern CMS (especially AEM or Edge Delivery?) In this episode we talk to Michał Cukierman, CTO of Dynamic Solutions and co-founder of StreamX - a digital experience mesh for dramatically and reliably accelerating complicated dynamic content requests from the many constituent systems that make up a modern CMS deployment.
How much do you know about the tools at your disposal to optimize your site's performance in mainland China? And even if you don't have a Chinese-language site, do you need to be concerned with in-China performance? YOU DO!
What’s involved in serving content to users in mainland China, especially if you’re on an Adobe platform (AEM, AEM EDS, Cloud Service, etc). What do you need to consider before launching a presence in China?