zhoujian2030 / jdiameter

Automatically exported from code.google.com/p/jdiameter
0 stars 0 forks source link

jDiameter should be able to wait for a period before binding to port #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
During start up the jDiameter stack binds to the port while the JSLEE is still 
loading - this can cause problems when messages come in before everything is 
loaded.

jDiameter should wait 60 seconds after starting before binding to port and 
accepting incoming connections.

jDiameter should also start the client only after listeners have been notified.

Patched attached against jDiameter master for TCP.

Similar pattern should be applied to SCTP and TLS.

Original issue reported on code.google.com by richard....@smilecoms.com on 21 May 2014 at 1:47

Attachments:

GoogleCodeExporter commented 9 years ago
Getting this issue with my servers as well. I'm connecting to the network's 
live HSS and MME. They will start sending data once the link has been 
established. But if this loading is not done properly, calls may be 
dropped/hanged in the time of a system reboot/maintenance restart of JBOSS

Original comment by tdevi...@gmail.com on 12 Jun 2014 at 4:45

GoogleCodeExporter commented 9 years ago
Well, IMO, 60s is a lot of time to wait all the time :) It may make sense when 
being used with AS/SLEE but in pure stack usage things usually happen much 
faster. 

I see the value of this enhancement but it would be better if it comes as a 
parameter (eg: NETWORK_INIT_DELAY, in ms) to the stack, with a default value 
[close to] 0.

Original comment by brainslog on 8 Jul 2014 at 1:01

GoogleCodeExporter commented 9 years ago
100% agreed - or even as suggested on the mailing list it should not be based 
on timer but on callbacks confirming SLEE/RAs/etc are ready.

I think parameter with default (close to) 0 - is the most practical starting 
point.

Original comment by richard....@smilecoms.com on 8 Jul 2014 at 1:08

GoogleCodeExporter commented 9 years ago
Yes, but the problem with such approach (callbacks confirming SLEE/RAs/etc are 
ready) is that we do not know ahead of time how many will they be, if I am 
getting it right the idea.

It would be something like wait for a certain (by configuration) number of 
listeners to register before binding to the port.. I am not sure I prefer such 
approach, to be honest.

Original comment by brainslog on 10 Jul 2014 at 12:28

GoogleCodeExporter commented 9 years ago
Agreed - I think parameter with default (close to) 0 - is the most practical 
starting point.

Original comment by richard....@smilecoms.com on 16 Jul 2014 at 2:27

GoogleCodeExporter commented 9 years ago
This issue was updated by revision de9b5c011ad8.

Committed changes to support using a bind delay parameter.
Should be used as:
<Parameters>
  ...
  <BindDelay value="15000" />
  ...
</Parameters>

The value is specified in ms.
Test also committed.

Original comment by brainslog on 26 Aug 2014 at 12:52