Yazan.
كل المقالات

المقالات مكتوبة حالياً بالإنجليزية، أما بقية الموقع فتتبع اللغة التي اخترتها.

2 دقيقة قراءةNetworkingDevOpsBackend

Network Ports Every Developer Should Know

Network Ports Every Developer Should Know cover

:22, :443, :5432, :6379… If you're a developer, you type these numbers almost every day.

The simplest way to think about it: the IP address is the building, and the port is the door to one specific app inside it. One server can run SSH, a web server and a database at the same time, and the port number is how a connection says which of them it wants.

AlgoInsight made a short video that breaks down fourteen ports every developer should know, from SSH and HTTPS to PostgreSQL, Redis, Kafka and Elasticsearch.

Still from AlgoInsight's Network Ports video, listing fourteen ports from 22 (SSH) to 9200 (Elasticsearch)
Still from the AlgoInsight video I shared on LinkedIn.

The fourteen

Port Service What it's for
22 SSH Remote login and file transfer, encrypted
25 SMTP Sending email between servers
53 DNS Turning names into IP addresses
80 HTTP The web, in plain text
443 HTTPS The web, encrypted
3000 Dev server A Node, React or Next.js app on localhost
8080 HTTP alternate Proxies and app servers when 80 is taken
3306 MySQL The classic SQL database
5432 PostgreSQL The other classic SQL database
6379 Redis In-memory cache and key-value store
27017 MongoDB Document database
9092 Kafka Event streaming
5672 RabbitMQ Message queues
9200 Elasticsearch Full-text search

Ports below 1024 are the "well-known" range. On Linux and macOS, a program usually needs elevated privileges to listen on one, which is why development servers pick numbers like 3000 and 8080.

One addition from my own backend work

If you build with Laravel, Django or FastAPI, your local dev server runs on 8000 by default, not 3000: php artisan serve, python manage.py runserver and uvicorn all start there.

Which port do you type the most?

First shared on LinkedIn.