Stop 01 · Internet & Backend BasicsTopics · 1/15

Internet

Part of the Backend Developer Roadmap

In short

Your backend is just a program running on a computer somewhere. The internet is how a phone in Patna reaches it in milliseconds. Know the plumbing and 'site not loading' gets far less scary.

The global network of interconnected computers that lets browsers, servers and devices exchange data using standardized protocols like TCP/IP.

The mascot waves a green flag at a railway junction as parcel wagons split onto different tracks.

Think of it like this

Railway junctions across India

Different zones run their own tracks, yet a parcel from Guwahati still reaches Kochi. At every junction, staff read the destination and send the wagon onward. The internet is the same: separate networks, shared rules, and routers acting as junctions.

Watch it happen

Reaching your server on port 443

Client
Routers
Server

to 203.0.113.7:443

1/7The packet leaves the client with two things on it: the server's IP address and the port number.

The big ideas

What you need to know

IP address picks the machine

Every server on the internet has an IP address like 203.0.113.7. Routers use it to deliver packets to the right computer.

Port picks the program

One server runs many programs. The port number (3000 for your Node app, 5432 for Postgres) tells the OS which one gets the data.

TCP vs UDP

TCP guarantees order and delivery, so HTTP uses it. UDP is faster but makes no promises, which suits video calls and games.

localhost is your own machine

127.0.0.1, or localhost, always means 'this computer'. It's where you'll run and test servers during development.

See it in code

Walk through the code

js
1import net from "node:net";2 3const server = net.createServer((socket) => {4  console.log("Client connected from", socket.remoteAddress);5  socket.write("Namaste from the server!\n");6  socket.on("data", (data) => {7    socket.write("You said: " + data);8  });9});10 11server.listen(4000, () => console.log("Listening on port 4000"));12// In another terminal: nc localhost 4000

1/3createServer runs this callback once for every new TCP connection, after the handshake is done.

Raw TCP, no HTTP at all. nc (netcat) opens a TCP connection so you can type to your server directly. HTTP is just text sent over a connection like this.

Save yourself the pain

Common mistakes

Oops

Binding your server to 127.0.0.1 on a cloud machine and wondering why nobody can reach it.

Do this instead

127.0.0.1 only accepts connections from the same machine. Listen on 0.0.0.0, then control access with a firewall.

Oops

Thinking a port is a physical socket on the server.

Do this instead

A port is just a number from 0 to 65535 that the OS uses to hand incoming data to the right program.

Your mission

Talk TCP by hand

~15 min

Quick check

Your Node API and PostgreSQL run on the same server. How does the OS know which program gets an incoming packet?

Go deeper

  1. 1Learn the basics of TCP/IP and how packets travel between devices.
  2. 2Understand the difference between the Internet and the World Wide Web.
  3. 3Watch a short explainer on how data physically moves across networks.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge