Servers, virtual machines, containers and the cloud
What a server is
A server is just a computer whose job is to serve requests from other computers, all day, every day. It usually has no screen or keyboard; you reach it over the network. Almost all servers run Linux. A laptop can act as a server; in a company, servers live in data centres or the cloud.
Virtual machines
A physical server is often much more powerful than one application needs. A hypervisor is software that splits one physical machine into several virtual machines (VMs). Each VM believes it is a complete computer with its own operating system, CPU, memory and disk. An AWS EC2 instance is a virtual machine.
Containers
A container packages an application together with everything it needs — libraries, runtime, configuration — into one image. Containers on the same machine share the host's Linux kernel instead of each running a full operating system, so they start in seconds and use far less memory than VMs. Docker made containers popular; Kubernetes runs many containers across many machines.
The big win: the same image runs identically on a developer's laptop, in testing and in production, which ends most "it works on my machine" problems.
The cloud
"The cloud" means renting computing from a provider such as AWS, Azure or Google Cloud instead of buying hardware. You create a server in a minute, pay by the second or hour, and delete it when you are done. Providers also offer managed services — a database, a queue, a Kubernetes control plane — where they handle patching, backups and failover for you.
Cloud services come in three broad levels, depending on how much the provider manages:
Two more ideas you will meet everywhere:
- Regions and Availability Zones. A region is a geographic area (for example Mumbai,
ap-south-1). Each region has several Availability Zones — separate data centres with their own power and networking. Spreading servers across zones means one building failing doesn't take you down. - Shared responsibility. The provider secures the data centres and hardware; you secure what you build on top: who has access, your network rules, your data and your code.
Pets and cattle
Modern DevOps treats servers as cattle: identical, created by automation, replaced rather than repaired. If you find yourself logging into a server to fix it by hand, that fix will be lost the next time the server is replaced — so the fix belongs in code.