×
Community Blog Accelerate and Protect Your Website Using Anti-DDoS Premium with CDN Interaction

Accelerate and Protect Your Website Using Anti-DDoS Premium with CDN Interaction

Learn how you can accelerate and protect your website hosted outside of Mainland China using Anti-DDoS Premium with CDN interaction.

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.

Prerequisites

Before you begin, make sure of the following:

1

Procedure

So, let's get started. Follow the steps below.

Configure CDN to Accelerate Your Website

1. Log on to the CDN console

2. Choose Domain Names, click Add Domain Name

2

3. Enter the required information, select outside of Mainland China, then click Next:

3

4. You will see a result like the one below:

4

Configure Anti-DDoS Premium to Protect Your Website

1. Log on to the Anti-DDoS Premium console

2. Click Purchase Instances

5

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.

6

4. Now the Anti-DDoS premium instance is ready.

7

5. Configure the Anti-DDoS premium in the Website Config tab under Provisioning. Enter the required information, then click Add:

8

6. You will see the result as follows. You are now ready to configure CDN Interaction in Anti-DDoS Premium:

9

Configure CDN Interaction in Anti-DDoS Premium Sec-Traffic-Manager

1. Go to Sec-Traffic Manager under Provisioning, and then go to CDN Interaction.

10

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.

11

3. You will see the domain already starting to interact with CDN.

12

Update the DNS Record

1. After you configure CDN Interaction, Anti-DDoS Premium Sec-Traffic Manager will give you the CNAME.

13

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.

14

4. Click Add Record to add a CNAME record, for the value use the CNAME given by Sec-Traffic Manager.

15

5. You are now able to access the website with www.alibabacloud.life.

16

Verify the result

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.

17

2. Let's generate some workload by use AB stress test tool with 100 concurrent users

18

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.

19

The views expressed herein are for reference only and don't necessarily represent the official views of Alibaba Cloud.

0 0 0
Share on

Alibaba Clouder

2,599 posts | 764 followers

You may also like

Comments