If we just default to 0 then the OS will pick is a port in whatever range is ephemeral and free. We don’t have to do any work. No need to define a range and seek an open port.
> On Oct 5, 2018, at 10:40 AM, Dan Smith <dsm...@pivotal.io> wrote: > >> On Fri, Oct 5, 2018 at 10:31 AM Jacob Barrett <jbarr...@pivotal.io> wrote: >> >> Why not change the default behavior to that of port 0, letting the OS >> select an open ephemeral port if the user doesn’t specify a specific port? >> > > I think what we'd really like to do is change the cache server port to > something other than 40404. Maybe 0 (pick a port), or maybe something less > than 32K. > > Unfortunately, on most linux distributions the ephemeral port range is 32K > -> 61K, which includes 40404, which I think is why Brian is proposing a > subset of that range. > > -Dan