[Advanced Operation and Maintenance Knowledge] Use Alibaba Cloud to deploy kod Kedao cloud network disk (DNS resolution + CDN cache + Web application firewall + elastic scaling)

This article continues to introduce Alibaba Cloud products based on the kod Kedao Cloud project, introducing DNS resolution, CDN caching, Web application firewall, and elastic scaling.

DNS resolution

e7799cfd96684ae0b0285d42a35b52d7.png

bb4fee4c9e844451a614c82658a2bfee.png

4661b1e9477c4522b73cda7d85088ee0.png

Here I set the second-level domain name to kod. Generally, it is set to www and @. With @, it means that you can access it directly without adding the second-level domain name. You can also click on the novice guide and enter according to the prompts.

6f0e6194676142abaf87e3b214b6582f.png

 67ebe84e38be426aa9c7a542ffb0d5b5.png

CDN cache

Cloud product selection security acceleration SCDN

718ae54a9a0348d9a0d877a824396f96.png

ba8967c9a7d0434db3cac429fcb627d6.png a22e0e0c4e78405194ac6ef9038e7acb.png

 7120458ea4b2493b8168c396df05b5af.png

af58a625fbe34569ad6c109a32b9b918.png

 b7f6c587d56d4c04a7b26139f0fc180e.png

 Pay attention to the port number here. If you have a certificate, remember to resolve it to port 443.

 699ae674707e4932bff800b9668f5b20.png

 ab1481470e164b03972e169fc8b86753.png

Configure DNS resolution according to the prompt information

ca5bfa1b778e4dd79a95cd688140abf2.png

If no error is reported when accessing the connection, the operation ends here. If an error is reported when accessing the connection, further settings of the CDN are required.

42e4c46e44884b5eb20a23433a5adb0a.png

86b37ddec61c45278a3e395e374dac5d.png

b87a2457f5714822bfa7ff6b91c0f303.pngTest our CDN cache

F12 gets image address

58d4f00003bc4721b36b72e119dc1e41.png

1b58411e9f2f4ad7bb42998931ae64ce.png

 We upload the image and overwrite it, and then refresh the image link.497ffb300dd54bb99edce9fa52ce57b5.png

 The previous avatar is still displayed, indicating that there is CDN cache.89ca3758b6c8465681aa055bf6a39078.png

 We can refresh and preheat in the CDN background. Refresh means forcibly transferring the web resources to the CDN and updating the CDN resources. Preheating means sending the web resources to the CDN in advance, and we perform the refresh operation.

c1ab81ffe8744ac19b90eef0d4919f7b.png

After submitting the operation, refresh the connection again, and our updated image is displayed, indicating that our CDN resources have been refreshed. 

d64917d3345349d28772d807fc9b821a.png

Web application firewall

9379d9f8b7a640df99964a19f7be3542.png

6633e500be0143e8910d197f0ffbd476.png57a21b8732b140f88cf20d73b7ae4ec6.png f4694cdc7603468198cfc32960b9e316.png

 

dfca02c07d3c40548846fa13d7304acd.png

Access DNS 

6db87cf9d61441faab8a8b4433693262.png

 After access, you can further configure the firewall by changing the rules.

 5688d0e6b2aa41cd805c3c1f8b6ce191.png

Elastic scaling

03a26fafc26842d2a7a1a6bc5afc6786.png

This step is about advanced configuration. You need to associate load balancing. Fill in the port number 443 or 80. 

 e0d510090a5640c18534f6b4750f8f44.png

The configuration is as shown in the figure, a simple example, increasing by 1 each time, and the cooling time can be adjusted smaller to facilitate testing. 

fa13d093d85f440299d0fe44b06e0862.png

It is best to associate it directly in the advanced settings when creating, so that elastic scaling can be associated with load balancing. 

49d260235b7c4be9a33399281dc66908.png

 There is no modification word in the view. I added it wrong at first.05d5ead642cf40799f29de3ebe4afb99.png

After the service is displayed here, the auto-scaling server is displayed in the load balancing area, indicating that the association with load balancing is successful. f129a65d160344449664698017297c4c.png

 Alarm tasks can be created to determine when to perform expansion and when to perform reduction.

Added rules and alarm tasksd5c0eda0ee1145db9cc010d2ab89de9c.png

 161f08c10d874c2d98753cc149449ce9.png

 ​​​​​​3b118987756b437bbf95bedc80487ad5.png

632e75256f2c414f9e33f8284207d72d.png

Reduced rules and alert tasks 

fb09cce6edba4bf0bb60308563859f21.png

2e5f679485de4b50bcdbe207034cbc8e.pngd19d563ceb0041a4a2670c7a414b5e46.png

Use the following command to increase the average load of the system and query. When the average load exceeds the value we set, machines will be added. When the average load is lower than the set value, machines will be reduced.

[root@web01 ~]# dd if=/dev/zero of=/dev/null bs=10M count=100000
[root@web01 ~]# uptime
 19:04:55 up  1:33,  2 users,  load average: 4.68, 1.35, 0.51

We will set the expected value, maximum and minimum number as shown below 

0851ceef4e374eb69d112dc89a8cd5b4.png

When it is detected that the average value is less than the set value, it will automatically move out. 

7e71901bb8d440698c90133c58f445f7.png

831d8be16e6143ac860d5087359f1d82.png

 If the status of the alarm task shows insufficient data, you can refresh it in the host monitoring. If it still doesn't work, contact Alibaba after-sales engineers.7ab4febe3a9647ad950ae52ffbd3ff55.png


My name is Koten. I have 10 years of operation and maintenance experience. I continue to share operation and maintenance tips. Thank you for reading and paying attention!

 

Guess you like

Origin blog.csdn.net/qq_37510195/article/details/130359803