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
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.
CDN cache
Cloud product selection security acceleration SCDN
Pay attention to the port number here. If you have a certificate, remember to resolve it to port 443.
Configure DNS resolution according to the prompt information
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.
Test our CDN cache
F12 gets image address
We upload the image and overwrite it, and then refresh the image link.
The previous avatar is still displayed, indicating that there is CDN cache.
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.
After submitting the operation, refresh the connection again, and our updated image is displayed, indicating that our CDN resources have been refreshed.
Web application firewall
Access DNS
After access, you can further configure the firewall by changing the rules.
Elastic scaling
This step is about advanced configuration. You need to associate load balancing. Fill in the port number 443 or 80.
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.
It is best to associate it directly in the advanced settings when creating, so that elastic scaling can be associated with load balancing.
There is no modification word in the view. I added it wrong at first.
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.
Alarm tasks can be created to determine when to perform expansion and when to perform reduction.
Added rules and alarm tasks
Reduced rules and alert tasks
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
When it is detected that the average value is less than the set value, it will automatically move out.
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.
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!