Having a website means you need to manage it. One of the essential management skills is to be able to monitor if the website is accessible. This is particularly important because no one wants to use a website that is unstable. Additionally, a highly stable website builds trust and positive user experience.
Server administration can be a challenging task or we may not have enough time to do it. Usually, administrators do not need to be constantly with the server. Instead, they need to know how to detect and resolve pending or ongoing issues. In fact, the components that make up a website are not simply a service. Microarchitecture allows us to break down larger features into independent services. However, this creates difficulties in managing because there are many discrete services that can become problematic at any time. Monitoring is an essential solution to gather information from them.
I am not a professional server administrator, but I have some experience in maintaining a few servers. I hope to share my experience with everyone through this article and also receive more experiences from others!
Monitor to ensure the stability of your system. The more stable a software application is, the more it retains users. No one wants to use a system that intermittently fails. Therefore, you always need to know if your system is working as expected or not, and if not, you need to find out quickly to take action.
Monitor to detect runtime errors and potential future issues. Through logging and analysis, we can identify unusual signs in the system, such as high CPU usage or full memory, which have not occurred before.
Monitor to train the ability to handle emergency situations. These are situations where your services or servers are inaccessible. If a system is too stable, it can create another worry, which is the worry that the monitoring system is malfunctioning. Sometimes there will be a simulated session when the system "fails" to test if the monitoring tools are working as expected or not.
In the past, the image of server administrators was associated with a large number of servers and intricate network cables. However, with the development of virtualization and the cloud, everything can be brought to the "cloud", and of course, servers are no exception. A decade ago, to monitor a server, we had to install additional system monitoring software, but now providers actively add many monitoring and system alert tools. Through the administration page, you are provided with information about the server you rent in a visualized manner, such as statistics or charts.
Sometimes, using the integrated monitoring feature of the provider is not enough to meet the needs. You can install many other system monitoring software tools, depending on the needs of each person and system.
In summary, with the help of cloud technology and virtualization, monitoring systems have been simplified to some extent. However, the monitoring methods and approaches can vary depending on the monitoring needs. For me, it's just as simple as ensuring 99.99% uptime for the system. To achieve this, I have been using the following methods.
First, you should choose a reputable service provider. To ensure system stability, the foundation must be strong, and in this case, it is the service provider. Choose a provider with experience in operating systems for a sufficient amount of time or is highly regarded by the community. Names like Google Cloud or AWS are well-known, but relatively expensive. However, they offer great reliability, stability, and excellent support. You can also choose smaller providers such as Vultr, DigitalOcean, Linode, Bizfly, etc. I have tried them all and found them to be very stable.
Take some time to check how your system is using its resources. Is there anything unusual that needs immediate action? You can find the system resource monitoring feature in the server management section. The data is displayed as a timeline, updated in real-time, helping us quickly identify abnormalities.
Many service providers offer the feature to send system alerts via email or messaging channels. This is useful for quick notifications to system administrators. These alerts can include information such as high CPU usage or full memory. This setting is very useful for those who are concerned about resource consumption.
These are the system monitoring software tools that I mentioned earlier. Although I have not had many opportunities to use them, their tasks are to monitor system resources and generate alerts. They also provide many other complex features that require experience in operation.
The previous methods focused on system resources. What about managing internal services at a more detailed level?
My blog is composed of many microservices, and my task is to know which ones are running, which ones are failing, and which ones need immediate attention. There are many tools that can monitor this issue, collectively called Monitors or Application Performance Monitoring (APM) tools. By integrating them into each service, we can monitor them through the log records collected by these tools. They also have real-time alerting capabilities.
uptimerobot.com is a useful tool for me. It monitors the uptime of my website and quickly sends alerts when it is not accessible. The working principle is simple, it tries to access the website every 5 minutes, and if it fails, it promptly sends an email alert. A few times, my website had a 500 error, and thanks to the tool, I knew about it and fixed it immediately after receiving the alert.
There are many other tips and tricks as well. For example, in my article Telegram and Real-time Notification Channels, I mentioned using the Telegram messaging app as a notification channel for multiple recipients to know about issues.
Monitoring servers helps maintain the stability of your system. Nowadays, with the help of virtualization and cloud technologies operated by professional teams, server monitoring has become easier. However, we need to apply monitoring methods effectively. I hope that this article helps readers understand a part of server monitoring tasks and that it also provides an opportunity to receive more experiences from others.
The secret stack of Blog
As a developer, are you curious about the technology secrets or the technical debts of this blog? All secrets will be revealed in the article below. What are you waiting for, click now!
Subscribe to receive new article notifications
Comments (0)