Managing an application server is a very sensitive task. Being able to understand the limitations and capabilities of your server is as important as developing the functionalities of your application.
Imagine having a To-do list application that can add new To-do items by voice command, but adding anew to-do item takes too long. All the effort in building the application is gone because no one can use it. What's worse is that you have no idea where the problem is. Your server hosting service provides monitoring graphs but you don't understand them. There are too many concepts to learn and understand. Where to start?
I always found concepts related to web servers daunting and scary. This is why I decided that in monitoring my servers I will focus on two of points only. The goal is to get comfortable with these concepts, then move to other items that are important to pay attention to when managing a server.
In this case I recommend that beginners start by monitoring two items:
- Server CPU
- Server Memory
This article is intended for beginners who found themselves somehow managing a web server for a client or a company. If you are experienced in this field, please feel free to share your thoughts in the comments 😀
Central processing unit is the thing in the server or computer that executes the commands or instructions given by a program. In our case the server CPU is what runs our application. Each server can have access to more than one CPU core. The more CPU cores you have the more capable your server will be to handle large loads or expensive tasks.
There are two metrics to pay attention to when monitoring CPU:
Both CPU load and CPU utilization are best monitored over time.
A great resource to start at is this article by Digital Ocean:
Memory can be divided into two:
- RAM (Random Access Memory)
- Disk Storage
RAM is the memory that the server is actively using. This data will be lost if your server or application shuts down.
Imagine fetching a large chunk of data from your database and storing it in an object. This object will have the data stored as long as the server and or application instance is running. Once a user refreshes the application page (as an example) then that object returns to being empty till another fetch happens.
Disk Storage is more permanent. It is what you save in your database (as an example). It is important to pay attention to disk storage. If the storage is full then your application will likely stop functioning. For example a user will not be able to add more To-dos if there is no more storage space. If you are consistently monitoring disk storage then you can plan ahead for any memory shortage.
A good resource for more in-depth readying is:
For a beginner that is managing a web server for a small client, I believe this is a good start. Simply focus on CPU and memory (Google how to monitor them on your particular hosting service). Once you are comfortable, then you will find yourself delving deeper into these concepts to provide the most reliable service to your clients. The goal is to always find the issue before your client points it out to you. Monitoring can help us plan ahead.
Got questions? Feel free to reach out via the comments or my twitter
Ok! Now back to learning 👨🏿💻