Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Aren't lower ports reserved for system things? Like the ports below 255 or something?
I think ports are only special if currently being used. Like port 80.
Edit:
I should've searched:
https://stackoverflow.com/questions... -
C0D4681383yJust don't use any port here and you'll be fine.
https://iana.org/assignments/...
Some software will use a random port and cause conflicts if you have the same port in use for your own projects. -
sariel85313yThink of ports like channel frequencies managed by the FCC or ipv4 address space managed by IANA.
There's ports reserved for everything.
Port 8080 or 8000 is typically used for local intranet broadcasting for HTTP or other streaming services (like rtsp).
Think of these ports like you think of your local network IP, most the time these will be along the lines of 192.168.x.x
Those first two sets of numbers are widely accepted to determine a local network IP. Port 8xxx can also be thought of the same way (with a few exceptions).
Regardless, you can set the port anything runs on usually but it's not really recommended unless you know exactly what you're doing. -
A port is a port is a port.
The ports 0 - 1023 are reserved for well-known applications,
1024 - 49151 can be reserved by IANA.
But in reality you can pick anything above 1023
Cause: A port is a port is a port.
Meaning: Say you have Host A.
Host A runs Docker.
Then only external ports of containers matter - as these are associated with the IP of Host A.
Back to the triplet:
A port cannot be assigned multiple times to a single IP address, it will fail - for obvious reasons.
A port is just a number that is associated with a IP to match a service.
So... A port is a port is a port.... -
Additionally to what has been said in https://stackoverflow.com/a/... (Answer to Question on StackOverflow linked by @Demolishun), tutorial ports tend to be easy to remember for obvious reasons.
8080 and 8443 are derived from the official ports for HTTP(S).
3000, 4000, ... are easy to remember because they are just full thousands.
Ports like 12751 would make the reader wonder, how the author came up with that. Humans in general try to find reason behind things. So you should never just use random ports in a tutorial to not distract from the actual topic... -
Same reason every example you find has "foo" and "bar". Someone used those ports specifically, and someone else went "Oh, that looks like a good idea" and now everyone uses them because everyone else uses them. You can use any port that isn't currently being used
-
0 to 1023 are known ports https://en.m.wikipedia.org/wiki/... and I thi k ports around 2000-something can be used by services.
It's become practice to jump by a thousand when a range is occupied.
Which is why 3000 is common. -
I think it's entirely about picking a number which is easily guessable in case your run some web server locally and it doesn't console log the port number - you just randomly start visiting some known port numbers.
Once in a while you build a server while you need to have other severs running locally and then you might pick a unique port. Usually pick a famous number and do +1 like 8081.
Related Rants
-
paranoidAndroid17Consultant: "you should deploy a website. Use wordpress and have a draft ready in a few days. It's easy." Me:...
-
jodee92911BETA USER: Is this feature working? When I add a link I get an error that says "URL cannot be more than 255 ch...
-
Number09Receives email from warranty guy in work. Warranty: "Hi, see attached scan in PDF form. I normally fill the b...
Why do any tutorials on any kind of technology start their projects on ports like 3000/8080/4200/5000 and so on? Why not start them on port 1/2/3/65536/etc.? Are these chosen tutorial ports free to use? Any special meaning? I've looked up a table of ports and many ports have a specific purpose but are still (mis)used for that arbitrary whatever project?
question
why?
any tutorial project
seemingly random choice
port