Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / cloud

Configuring CDNs for Multiple Regions on Alibaba Cloud

5.00/5 (1 vote)
13 Dec 2017CPOL3 min read 3K  
Alibaba CDN is one of the services provided by Alibaba Cloud. It has several distribution nodes around the world so that simultaneous updates to different services are facilitated, and consequently reduce downtime.

Alibaba Cloud provides a comprehensive suite of global cloud computing services to help power and grow your business. Create an account today and get $300 in new user free credit.

Alibaba CDN is a service that optimizes delivery of files, images, and assets. It’s used to improve the performance of websites hosted by server applications such as NGINX or Apache.

Alibaba CDN is beneficial in many ways, but it can be particularly useful for boosting performance in situations where your applications are distributed across a wide geographic area. By properly configuring the CDN for multiple regions, you can ensure that data is delivered to users faster and more reliably, no matter how close they are in physical terms to your main datacenter.

This is an important benefit, because although in theory the Internet connects all parts of the world equally, in practice, data transfer speeds are impacted by the physical difference separating servers from endpoints. Given that even a few seconds’ delay is often not acceptable to users, it is very important to optimize the delivery speed of data and the availability of your application no matter how much physical distance separates users from your data center.

How multiple CDNs work

Alibaba CDN is one of the services provided by Alibaba Cloud. It has several distribution nodes around the world so that simultaneous updates to different services are facilitated, and consequently reduce downtime.

Alibaba CDN is a network of clusters of edge servers distributed in different regions, and distribution is concentrated on these servers. In this way, the applications work in an accelerated way by being close to the users, with faithful copies of the applications on their servers. Like many of Alibaba Cloud’s services, CDN has a pay-per-use pricing model.

Below is a diagram that illustrates how data replication is performed between CDN nodes. As we can see, the user makes the request to the initial access point, and this request will analyze where the user is located so that the nearest server responds to it. That way, there is no delay in application access for the user.

Image 1

When we apply the configuration of the CDN in a multi-national way, it is easy to see how we should proceed. You need to create the CDN and define in which countries your application should be available. You can even use monitoring to see where you need to scale up due to localized demand. Updates take place automatically, and transparently to the user.

Configuring a CDN in Alibaba Cloud

To create a CDN, we need to access the Alibaba Cloud portal. In the main dashboard, we have to choose the option Alibaba CND, in the field Storage & CDN, as indicated in the image below.

Image 2

When accessing it, you must select the CDN Domain Name List on the left side and create a domain name by clicking Add Domain on the right side. Within these options, choose according to your needs. An example of this screen is presented below.

Image 3

Within Business Type, we can choose the following options:

Image 4

Within Origin Site Type, we have the following options:

Image 5

And to finish, we need to choose the Accelerating Region:

Image 6

At this point, you must select Global Acceleration or Overseas Acceleration (non-Chinese mainland) so that your application can be replicated in different places in China. After going through the steps of creating the CDN Domain Name, there is an approval period. After approval, the management console can be accessed.

Conclusion

After CDN creation, we can add our files to the CDN, then get the URL of each file and use them to build websites and applications. The files served by Alibaba CDN will be provided efficiently and quickly to users, in whichever regions the CDN has been configured to serve.

Not all public cloud platforms provide complete built-in CDN services. Before considering which cloud to use, evaluate the importance of having an integrated CDN solution, which, as noted above, can be particularly useful in situations where you need to deploy an application across a wide geographic area.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)