Re: [jgroups-users] unexplained port usage
Questions/problems related to using JGroups <[email protected]>
| Newsgroups | gmane.comp.java.javagroups.general |
|---|---|
| Message-ID | <[email protected]> |
On 14/06/16 16:23, Questions/problems related to using JGroups wrote: > On Fri, Jun 10, 2016 at 12:49 AM, Questions/problems related to using > JGroups <[email protected] > <mailto:[email protected]>> wrote: > > > the only other port opened should be by FD_SOCK. This can be set by > start_port. > > > Thanks, I can watch FD_SOCK#run in the debugger and see where it's > picking up the random port. For whatever reason, I never realized that > FD_SOCK was using a different port than the bind port used in TCP -- I > guess I thought the TCP socket was used for everything. Nope - you can use FD_SOCK also with UDP as transport. And even if TCP is used, FD_SOCK cannot rely on TCP closing a connection as idle connections may get reaped and closed. > Do you know if there's any disadvantage to letting users set this? (They only set the > bind address/port now.) No, that should be fine > In the next version, we're switching to: > > [...] > .addProtocol(new MERGE3() > .setValue("min_interval", 10000) > .setValue("max_interval", 30000)) > .addProtocol(new FD_SOCK()) > .addProtocol(new FD_ALL2() > .setValue("timeout", getJGroupsTotalTimeout() * 1000L)) > [...] > > So I'd want to expose the FD_SOCK start_port and client_bind_port, or > else set them to bind port plus one/two to let users really control > which ports are used, right? Sure. Note that you can replace the SocketFactory used, with one that keeps track of which sockets/ports are open, and perhaps even expose this via some management interface. -- Bela Ban, JGroups lead (http://www.jgroups.org) ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e