This is a little subjective, as there are no rules so to speak. Every time I create a server, I think to myself, "What is the best port to use?" I guess an answer is "Any, as long as the user can change it." So, how does everyone else decide how to choose the default port? Personally, I like to use something like 8000-something if it's HTTP related, and I've noticed this is a pretty common trend. But what if 8000 is already in use? Use 8001? It seems a little ad-hoc, and I suppose it is.
Clearly I'm not the first to have asked this question; IANA maintain a port numbers list... Which leads me on to the unassigned range (48620-49150). I guess we should really be using these, but why don't more programmers do so? How do you decide which to use; if everyone started at #1, then we'd all be using 48620.
I think you've pretty much answered your question as much as is possible; there isn't really a strict rule you can follow here beyond what you've said. But generally:
(And if you want a tip for picking memorable port numbers, I once worked with someone who remembered port numbers based around the telephone extensions of his co-workers.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With