24007: Choosing the right port for project

Amar Tumballi
Jun 21 · 3 min read

I was looking some iptable configurations, and then realized that we haven’t documented why we choose the current port number for glusterfs. Its been 13+ years for the project, and we have used different ports in this time period. Lets look at where we started.

June 2006: 5252

When the first client-server, code was written for validating basic concepts on FUSE based distributed file system, Avati wrote some quick and dirty code¹, and we could watch a video² through a fuse mount. File was present in his laptop, mount was on my laptop, and stream worked perfectly fine using mplayer.

The first ever commit we did had 5252 as the port to listen to client connections.

While this was the default, we always had the ‘option’ for choosing remote port, and listen-port. And as we used to run more than 1 process, always never bothered much about this.

Nov 2006: 5432

While cleaning up protocol code, Avati introduced 5432 in the code base.

Dec 2006: 6996

While doing some cleanup, AB introduced port 6996 as default.⁷

This stayed for a long time.

Oct 2010: 24007

By this time, gluster was no more a ‘small’/’fun’ project. It was having revenue, and some good production deployments. The discussions started as many project managers and few developers didn’t like the number 69*³. To add to their credit, port 6996 was widely used in many torrent sites, and not so legal friendly sites/services.

We had to change 6996 to something else. The energy in the team always came from discussing and spending a lot of time for such decisions. We had to find a reason for each such choices⁴. Like Gluster Ant, and Release names, etc. The discussions started sometimes in September, and lasted for some time.

We had to first go through list of all IANA ports, which were available, so we can list it for glusterfs. We found many ranges in that, which were ‘Unassigned’. While going through this list, something caught my eye, 24007… I liked it for 2 reasons. One, it ended with 007 (bond number, and my college (Engineering) hall ticket number⁵, and secondly 24x7 had a meaning, which means ‘always available’. GlusterFS is ‘highly available’ storage with its replicate module, so 24007 sounded as really nice pick, and immediately, there was a patch out, and we made the change.

May 2012: 24007 and 49152+

While 24007 was unassigned in IANA port list, and worked well and got us good image, and help gluster get acquired⁶, we were consuming further ports which were assigned as we used to spawn bricks on those ports.

So we had to pick new set of ports along with 24007 to use for brick processes, and picked the last set of unassigned range in IANA list, which starts with 49152.


Its been 7 years, and we haven’t done any serious changes to port numbers since then. Interesting how some small events makes us go through so many the details, and spend hours on remembering all the good times.

If you are reading till here, and you want to know about some stories of Gluster, ask me as in comment section. Who knows, I may pick that as the next topic for blog.


Trivia:

  1. Quick and Dirty” is just a quote. Knowing Avati, dirty code and him doesn’t get together. (may be libevil was one such rarity).
  2. I vaguely remember it as a torrent downloaded LOST series episode (note: then, we didn’t had paid streaming services like now to watch our interested series).
  3. Well this is not trivia. 69 does have some deeper meaning for many people.
  4. We had a macro, which we use it even after 10 yrs, called GF_UNIVERSAL_ANSWER. By the way, no brownie points for guessing the value :-) Hint: 42.
  5. My hall-ticket number ended with 007, had other characters before it though.
  6. I just made this up 😐
  7. AB had just returned from Venezuela when this change was made. Well, there is no relation, but as it is a trivia time, wanted to mention that :-)
Amar Tumballi

Written by

#gluster #kannada #life