06 Sep 2024

As a web developer, you often come across the word server, and it can mean different things depending on the context. This can get confusing. Like Abbott and Costello asking “Who’s on first?” or Aretha Franklin wondering “Who’s Zoomin’ Who?”, we ask ourselves: Who’s serving what to where?
It’s funny while dining at my favorite restaurant, I found myself having a discussion with my server. I said, “Let’s clarify the key difference between programming a server in code and the physical machine we call a server!” She furrowed her brow and replied, “I asked what you’d like to drink.”
For beginners, it’s easy to get lost. And honestly, even for seasoned developers, the term can still be misleading at times.

A server is a physical machine that provides resources to other computers. It may live in a data center or exist as a virtual server provisioned in the cloud. Either way, it typically runs 24/7 to serve files or data to the web, whether on-premises or in massive data centers managed by AWS, Google Cloud, or Microsoft Azure.
To deliver content, these physical servers rely on software like Apache or Nginx, which handle incoming requests and send the appropriate data to users.
On-premise servers: Dedicated hardware maintained by a company or data center.
Cloud servers: Virtual machines running on shared infrastructure, providing scalability without managing physical hardware.
It’s hardware with CPU, memory, and storage.
Both on-premise and cloud servers provide computing power for applications.
Cloud servers offer elastic scaling, but underneath, they’re still physical machines.
After a volleyball game, a teammate and I were discussing his confusion about what Node.js is. Man, he’s a strong server. I explained that in programming, a server can also refer to software that listens for requests and responds to them. A server within a server, so to speak. Server-ception.

When we talk about a server in programming, we’re usually referring to software that listens for and responds to requests. This server-side code runs on a physical (or cloud) machine and handles everything from delivering web pages to managing databases.
The software server is the brain behind what the user sees. It can be written in many programming languages, each with its own strengths and tradeoffs.
JavaScript (Node.js) — Great for asynchronous operations. Common frameworks: Express.js, Nest.js.
Python — Simple and readable. Common frameworks: Django, Flask.
Ruby — Optimized for developer happiness. Common frameworks: Ruby on Rails, Sinatra.
Java — Highly scalable and stable. Common frameworks: Spring Boot, Java EE.
PHP — A long-standing web powerhouse. Common frameworks: Laravel, Symfony.
C# (ASP.NET) — Enterprise-grade development within the .NET ecosystem. Common framework: ASP.NET Core.

Just the other day, while deploying my Node.js server to AWS, there was a knock at the door. A process server stood there delivering legal documents. As he handed me the papers, he said, “A server can be both hardware and software and both matter.”
Physical servers handle the hardware side moving data from point A to point B.
Software servers handle the programming side receiving requests, processing them, and sending responses.
And sometimes, other servers exist just to remind you not all servers live in the digital world.