By Victor Mak, Alibaba Cloud Solution Architect.
This tutorial is a step-by-step guide on how you can accelerate and protect your website hosted outside of Mainland China using Anti-DDoS premium with CDN interaction.
Alibaba Cloud provides DDoS protection capabilities to help customers to mitigate the risks of such attacks. In the past, customers usually had to choose between protection or acceleration, as some security services are incompatible with acceleration services. However, now, Alibaba Cloud DDoS protection can be used in combination with Content Delivery Networks (CDN), ensuring that there won't be any attacks to your traffic that's going through CDN.
Before you begin, make sure of the following:
So, let's get started. Follow the steps below.
1. Log on to the CDN console
2. Choose Domain Names, click Add Domain Name
3. Enter the required information, select outside of Mainland China, then click Next:
4. You will see a result like the one below:
1. Log on to the Anti-DDoS Premium console
2. Click Purchase Instances
3. In order to use CDN in combination with Anti-DDoS, you will need to purchase the Enhanced Edition. For the detailed information about the features of each edition, reference to this document.
4. Now the Anti-DDoS premium instance is ready.
5. Configure the Anti-DDoS premium in the Website Config tab under Provisioning. Enter the required information, then click Add:
6. You will see the result as follows. You are now ready to configure CDN Interaction in Anti-DDoS Premium:
1. Go to Sec-Traffic Manager under Provisioning, and then go to CDN Interaction.
2. Click Add Interaction. For this, you'll need to define Requests per Second. In the future, if the requests per second detected is greater than the number you specify here, Sec-Traffic Manager will automatically switch to Anti-DDoS Premium to protect your original site. We'll set the number 50 as the number for example purposes here.
3. You will see the domain already starting to interact with CDN.
1. After you configure CDN Interaction, Anti-DDoS Premium Sec-Traffic Manager will give you the CNAME.
2. You need to add a CNAME record into your existing domain provider. In this article, we use Alibaba Cloud DNS as an example.
3. Go to Alibaba Cloud DNS console and select the domain.
4. Click Add Record to add a CNAME record, for the value use the CNAME given by Sec-Traffic Manager.
5. You are now able to access the website with www.alibabacloud.life.
1. When there is no attack, you can see the Sec-Traffic Manager will route to traffic to CDN. You can verify by a ping test.
2. Let's generate some workload by use AB stress test tool with 100 concurrent users
3. You will see the Sec-Traffic Manager automatically route all the traffic to Anti-DDoS Premium after it exceeded the request per second we defined.
The views expressed herein are for reference only and don't necessarily represent the official views of Alibaba Cloud.
Alibaba Clouder - April 8, 2021
Alibaba Clouder - January 18, 2019
Thomas KW Poon - March 11, 2020
Alibaba Clouder - April 1, 2020
Alibaba Clouder - January 12, 2021
Thomas KW Poon - February 23, 2021
An encrypted and secure cloud storage service which stores, processes and accesses massive amounts of data from anywhere in the worldLearn More
An online computing service that offers elastic and secure virtual cloud servers to cater all your cloud hosting needs.Learn More
More Posts by Alibaba Clouder