../courses.php
The Server's Role
ASERVER
90
One Server Many Jobs
Why fixing one job on a shared server can quietly break a completely different one.
An administrator updates one piece of software on a server to fix a problem with the website it hosts. The website starts working correctly again. The very same server's email handling, untouched and seemingly unrelated, stops working entirely the next day. Nothing about email was changed on purpose. How could fixing one job on a shared machine break a completely different job that nobody touched?
Multiple services on one machine commonly share underlying resources and sometimes shared software components, even when their own specific jobs, serving a website and handling email, seem unrelated. An update made for one service's sake can change a shared library, a shared configuration, or simply consume enough resources differently that a separate service depending on some of that same shared ground stops working, even though nobody intended to touch it and nothing about its own configuration changed at all.
A single server machine very often runs more than one job at once: a website, an email system, a database, scheduled background tasks, and more, each as its own separate process or set of processes.
Separate jobs on the same machine are not necessarily fully isolated from each other. They commonly share the same underlying operating system, the same physical resources, and sometimes the same installed software components.
A change made for one job's benefit, such as updating a shared software library to fix a website problem, can affect any other job on the same machine that happens to depend on that same shared component.
A machine running many jobs also means its physical resources, covered in an earlier lecture, are being divided among all of them at once. One job using significantly more resources than usual can leave less available for every other job sharing that same machine.
Knowing which jobs a given server is actually responsible for, in full, is a prerequisite for predicting what else a change might affect, beyond just the one job the change was specifically made for.
Checking what else is actually running before making a change
$ systemctl list-units --type=service --state=running
nginx.service running
postfix.service running
mariadb.service running
cron.service running
nginx serves the website, postfix handles email, mariadb runs the database, and cron runs scheduled tasks, all on this one machine at the same time, independently of each other in terms of their own specific jobs.
An administrator about to update something for nginx's sake can check this same list to see exactly what else is running on this machine and might share something with whatever is being changed.
Nothing about this list suggests postfix or mariadb interact with nginx directly. The connection that can break one because of a change to another is typically something underneath all of them, a shared library or shared resource, not anything about their own specific jobs.
Scheduled tasks run by cron can include anything from backups to maintenance scripts to monitoring checks. A change that affects how much memory or CPU is available can cause a scheduled task to start failing with no direct connection to whatever was actually changed.
This list shows what is running, it does not by itself show what depends on what. Figuring out an actual shared dependency between two services usually requires looking further, but knowing the full list of what is running is the necessary first step.
Shared resources connect jobs that have no direct relationship to each other
A website and an email system can have nothing to do with each other in terms of their own purpose, while still drawing from the exact same pool of memory, disk space, or a shared software library, which is exactly the kind of connection that makes an unrelated-seeming change affect both.
Updating a shared component for one job's sake can change it for every job that uses it
A shared library updated specifically to fix a website's problem is, after the update, the same shared library every other service on that machine that happens to use it is now also running, whether or not that was the intention.
Knowing every job a server is responsible for is a prerequisite for predicting a change's full effect
An administrator who only knows about the one job they are actively working on has no way to predict which other jobs on the same machine might be affected by a shared dependency. A full accounting of everything running on that machine is what makes that prediction possible at all.
A resource-heavy job can starve every other job sharing the same machine
One service consuming significantly more CPU, memory, or disk than usual leaves correspondingly less available for every other service on that same machine, which can cause an apparently unrelated job to slow down or fail purely from reduced resources, with no shared software component involved at all.
Separating jobs onto different machines removes this specific kind of risk entirely
A website and an email system running on two completely separate machines cannot affect each other through a shared library or shared resources, because there is nothing shared between them at all. This is one of the practical reasons for splitting jobs across multiple machines as a system grows, even though it was once common to run everything on one.
Updating a shared library with no check of what else depends on it
$ apt upgrade libssl
(updated for the website's sake, with no check of other dependents)
Checking what else depends on a shared component before updating it
$ apt-cache rdepends libssl
$ systemctl list-units --type=service --state=running
When an AI tool plans a change to fix one specific job on a server, three things are worth checking. First, does it first check what other jobs are running on the same machine. Second, does it consider shared resources, such as memory or disk, as a possible connection between otherwise unrelated services. Third, does it avoid assuming a fix made for one job's sake has no effect on anything else sharing that same machine.
List every service currently running on a machine you have access to, and identify which ones you did not already know were running there.
Pick two unrelated-looking services from that list, and research whether they share any common underlying software component.
Explain, in your own words, why splitting jobs across separate machines removes the specific risk covered in this lecture.
Describe a realistic scenario where one resource-heavy scheduled task could cause an unrelated website to slow down on the same shared machine.
Before making a hypothetical change to one service, write out a short checklist of what else on the same machine should be checked first.
Updating a shared software component for one specific job's sake without checking what else on the same machine also depends on it.
Assuming two services with unrelated purposes, such as a website and an email system, cannot possibly affect each other on a shared machine.
Making a change without first knowing the full list of jobs actually running on the affected machine.
Overlooking shared physical resources, such as memory or disk, as a possible connection between two otherwise unrelated services.
Continuing to run many unrelated, critical jobs on one single machine indefinitely without ever considering separating them as the system grows.
You can now list everything actually running on a shared server before making a change, and explain how a fix made for one job's sake can unintentionally affect a completely unrelated job sharing the same machine. You can also identify shared resources and shared software components as the two main kinds of hidden connection between otherwise unrelated services.
Login - Jit4All
Login
Welcome back to Jit4All