Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to reconnect based on number of failed ping requests #18

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

davidertel
Copy link

When running jitsi videobridge in amazon, we connect to our XMPP servers through an ELB. When deploys of the XMPP server happen, the nodes are terminated but the connection to the ELB still stays up, even though the nodes behind it have been removed. This causes the videobridge to think that it still has a connection to the XMPP server. Although the connection still appears valid, nothing is there to respond to pings or pubsub messages so the videobridge gets into a bad state. Forcing the underlying connection to reset based on failed ping requests helped to solve this for us.

The jitsi videobridge pom.xml will need to be updated to use the new version of Jicoco once this is merged into master. I'm not sure of the proper way to make that happen together so please advise here. Also did not see any documentation for jicoco and would be happy to start some but it felt like since this is used in the videobridge that the documentation should go there. Please advise as to where I should document this new configuration property.

The new configuration property can be set in the sip-comminicator.properties by adding the property configPropertiesBase.RECONNECT_ON_PING_FAILURES and setting it to true. To maintain the original behavior is treated as false by default. Setting this value will cause the connection to be reset after the number of pings set in the ping threshold fail.

…s can be configured in the sip-comminicator.properties by setting the property configPropertiesBase.RECONNECT_ON_PING_FAILURES to true. To maintain the original behavior this is set to false by default. Setting this value will cause the connection to be reset after the number of pings set in the ping threshold fail.
@davidertel
Copy link
Author

bump... does this repo get love anymore?

David Ertel added 3 commits May 18, 2016 17:11
@@ -271,6 +287,25 @@ public boolean isConnectionAlive()
}
}

/**
* Restart the component connection if we have exceeded the threshold for ping failures
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please break this comment to fit in 80 chars.

@gpolitis
Copy link
Member

Thank you very much for the detailed description. Reading it has helped me understand why we need this. Could you please add this text (or something similar) in the commit description or inside the code?

Other than that, the code looks good to me.

…ers through an ELB. When deploys of the XMPP server happen, the nodes are terminated but the connection to the ELB still stays up, even though the nodes behind it have been removed. This causes the videobridge to think that it still has a connection to the XMPP server. Although the connection still appears valid, nothing is there to respond to pings or pubsub messages so the videobridge gets into a bad state. Forcing the underlying connection to reset based on failed ping requests helped to solve this for us.

The jitsi videobridge pom.xml will need to be updated to use the new version of Jicoco once this is merged into master. I'm not sure of the proper way to make that happen together so please advise here. Also did not see any documentation for jicoco and would be happy to start some but it felt like since this is used in the videobridge that the documentation should go there. Please advise as to where I should document this new configuration property.

The new configuration property can be set in the sip-comminicator.properties by adding the property configPropertiesBase.RECONNECT_ON_PING_FAILURES and setting it to true. To maintain the original behavior is treated as false by default. Setting this value will cause the connection to be reset after the number of pings set in the ping threshold fail.
@davidertel
Copy link
Author

Updated the commit with your comments, thank you for reviewing.

…ers through an ELB. When deploys of the XMPP server happen, the nodes are terminated but the connection to the ELB still stays up, even though the nodes behind it have been removed. This causes the videobridge to think that it still has a connection to the XMPP server. Although the connection still appears valid, nothing is there to respond to pings or pubsub messages so the videobridge gets into a bad state. Forcing the underlying connection to reset based on failed ping requests helped to solve this for us.

The jitsi videobridge pom.xml will need to be updated to use the new version of Jicoco once this is merged into master. I'm not sure of the proper way to make that happen together so please advise here. Also did not see any documentation for jicoco and would be happy to start some but it felt like since this is used in the videobridge that the documentation should go there. Please advise as to where I should document this new configuration property.

The new configuration property can be set in the sip-comminicator.properties by adding the property configPropertiesBase.RECONNECT_ON_PING_FAILURES and setting it to true. To maintain the original behavior is treated as false by default. Setting this value will cause the connection to be reset after the number of pings set in the ping threshold fail.
@davidertel
Copy link
Author

@gpolitis anything else you would like me to update on this PR? Thank you again for reviewing it

@davidertel
Copy link
Author

bump?

@gpolitis
Copy link
Member

gpolitis commented Jun 6, 2016

Hi @davidertel, I apologize for the late response. I'm sorry to bother you with this, but could you please make sure that your code does not go beyond 80 chars? You can configure IntelliJ IDEA (or any other tool) to show you a ruler. Thanks very much and again, I'm sorry for bothering with this and for taking so long to reply.

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@davidertel
Copy link
Author

Signed that several months ago. You should have it on record

On Nov 1, 2016, at 4:10 PM, jitsi-jenkins [email protected] wrote:

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@bgrozev
Copy link
Member

bgrozev commented Nov 2, 2016

We do, sorry for the noise.

Jenkins: add to whitelist.

@davidertel
Copy link
Author

merged in the latest from master to update this PR, reduced the width of the code to 80 characters... who has a screen that only supports 80 characters? email me and I'll send you a nice widescreen :-)

@damencho
Copy link
Member

damencho commented Nov 3, 2016

Yep, there were a lot of discussions on the 80 chars online and offline, but one big + for that one is mobile. Also you should count it 160, normally you look diffs of two files side by side.

@davidertel
Copy link
Author

Anything further needed for this PR before merging?

@dy93
Copy link

dy93 commented Jun 1, 2020

Hi, I encounter the same problem when using NLB to connect to xmpp server for jvb.
Any one can help to merge this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants