Server cluster (8) How About Using Cluster for Blog?

1. Server Status

After starting the "Networking Plan", many small partners joined the cluster one after another, and some quit because the server expired. In any case, we now have an 8-node server cluster:

Qingbei Science and Technology Node Monitoring
https://node.tsinbei.com

Description of networking plan:

Qingbei Science and Technology Networking Plan
https://cdn.tsinbei.com/projects/cluster.html

It just happens that among the 8 stations, 4 stations are from Shanghai, and 4 stations are from Hong Kong. We divide Shanghai into "back-end computing nodes", and Hong Kong into "front-end distribution nodes", that is, origin sites and CDNs.

As of April 2023, this blog has been running stably on this cluster for nearly 8 months, you can go to:

Qingbei blog site status
https://blog.tsinbei.com/status.html

Check the load status of each node. Generally speaking, the distribution ratio of the four nodes is 1:1:1:1, and sometimes the weight will be dynamically adjusted according to network fluctuations.

2. Service Availability SLA

Having said so much, maybe everyone is most interested in SLA. Here is the data from Google Search Console:

Overall Availability

Robots.txt extraction

DNS Resolution

Server Connection

The most important indicator is that the server is connected. It can be seen that as a personal operation and maintenance website, my blog is relatively stable.

The problem with Robots.txt extraction is that for a period of time I was bothered by the scanner and blocked all access to .txt, and then after a long time, Google sent an email saying that there was a problem with Robots.txt crawling, and I realized that The impact of this on reptiles.

DNS resolution is nothing to say, DNSPod Professional Edition, the world is very fast, and there has never been a problem.

3, Troubleshooting

Looking at my series of articles, you can see that I have quite a few complaints about the operation and maintenance of the cluster. However, this is an early cluster, and it hasn't had a problem serious enough for me to deal with for up to 5 months after optimization. There is only one secret:

"Don't move if you can run."

Don't keep making changes to the server without backup, or it will be a disaster if something goes wrong.

However, due to Tencent cloud server SLA, and some inexplicable problem (I don't know what, but it does make the website down), my blog still fails. This is about D monitoring and load balancing. D monitoring detects every 10 minutes, and automatically switches nodes if there is a problem; load balancing is directly concurrent when the backend fails, and returns whichever backend is available.

When I wake up, I can occasionally see a few warning messages, which are basically "reminder of website failure", and "reminder of website failure recovery" less than 1 minute later, which is basically indifferent to user experience.

Now I am more familiar with the MySQL configuration, so in recent months there has been no troublesome master-slave out-of-sync problem.

4. User Experience

When it comes to user experience, I still care more about website speed.

This site does not use a CDN in mainland China, and the average speed of the naked connection to three networks is 0.6s. After the HTTPS billing of Tencent Cloud CDN, I migrated the static resources from Tencent Cloud to my own cluster overnight. It is not enough to have only 4 Hong Kongs. I purchased another CDN. Counting the redundant backup nodes, the number of Qingbei CDN nodes has reached 16.

These are for mainland nature visitors. For machine access, I specially resolved a node with a strict WAF policy; for overseas access, I resolved it all to Cloudflare, ensuring global access for 1s and avoiding overseas DDoS attacks.

Cloudflare Website Monthly Report

The loading of CSS and JS on my site has undergone a lot of tuning, and now Dalujiakuan’s non-cached access triggers DOMContentLoaded at the fastest time of 0.8s. Such a station, I think it is friendly to the user experience.

5. Inadequacies

Although there are so many advantages, due to the problem of MySQL configuration, this site will be slower when editing and commenting on articles, but this can be solved by some simple means, such as using third-party comments.

Using this solution, there will be some small problems in file synchronization. My solution is to store them all in the object storage. The object storage can be used by a large factory or built by yourself. If there is time, there will be a self-built tutorial.

Using Dachang Object Storage can directly use the server in the same region as a reverse proxy to avoid traffic.

My cluster is still being optimized. If you have valuable opinions, please put them in the comment area.

Server cluster (8) How About Using Cluster for Blog?

https://blog.tsinbei.com/en/archives/737/

Author
Hsukqi Lee
Posted on

2023-06-22

Edited on

2023-06-22

Licensed under

CC BY-NC-ND 4.0

Comments

Name
Mail
Site
None yet