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

jDiameter Extension - traffic load balancing among peers & failover #36

Open
gfigiel opened this issue May 2, 2016 · 14 comments
Open

Comments

@gfigiel
Copy link
Collaborator

gfigiel commented May 2, 2016

Enhancement of the jDiameter stack according to https://telestax.zendesk.com/hc/en-us/requests/33156

Basic functionality is to add load balancing among peers and failover of Diamtere traffic in case peer is not available.
Failover for protocols errors according to RFC 6733, failover for ongoing session according to RFC 4006.

@nsowen
Copy link
Contributor

nsowen commented May 6, 2016

For peer load balancing, we simply extended RouterImpl and did a override of method selectPeer(List availablePeers). A new router can be configured per stack by setting the following extension point:

  <Extensions>
     <RouterEngine value="net.toscale.jdiameter.WeightedRoundRobinRouter" />
  </Extensions>

To do AVP-based balancing, one could simply override getPeer(IMessage message, IPeerTable manager) additionally and reading the required AVPs before selecting the final peer.

If anyone is interested, I could of course share some details.

@deruelle
Copy link
Member

deruelle commented May 6, 2016

@nsowen definitely interested. Can you share more details ?
Do you want to contribute your extensions back to jDiameter so it benefits others ?

@nsowen
Copy link
Contributor

nsowen commented May 6, 2016

Absolutely! I will submit some code to Github very soon

@deruelle
Copy link
Member

deruelle commented May 6, 2016

Thanks @nsowen. looking forward to the pull request then !
Can you sign our Contributor License Agreement as well at https://telestax.com/open-source/#Contribute as described in our Open Source Playbook so we can accept the contribution ?

@nsowen
Copy link
Contributor

nsowen commented May 6, 2016

Done!

@deruelle
Copy link
Member

deruelle commented May 6, 2016

@nsowen received. Thanks ! Looking forward to the Pull Request !

@deruelle
Copy link
Member

@nsowen any tentative ETA for the Pull request ?

@gfigiel
Copy link
Collaborator Author

gfigiel commented May 19, 2016

@nsowen as we started implemntation we are definitly interested in combining our requirements with your implementation. Did you have chance to go through the requirements list attached to the case mentioned by me in the issue description? As not to do the same implementation twice we will look into failover functionality while waiting for you Pull Request.

@nsowen
Copy link
Contributor

nsowen commented May 20, 2016

@gfigiel Sorry to let you guys wait. I'm still facing issues on a router implementation (WeightedLeastConnectionsRouter) which currently relies on Peer-Statistics being enabled, which does not work perfect. Nevertheless, I'm not happy with it, but I will share my current progress with a pull request by lunchtime if that's ok.

@gfigiel
Copy link
Collaborator Author

gfigiel commented May 20, 2016

Great :-) We will still need some time to go deeply into jDiameter implementetion and algorithms so any help/code from you would be really greatfull :-)

@nsowen
Copy link
Contributor

nsowen commented May 20, 2016

Added pull request #40 - happy to contribute at least a little bit of work ;-)

@gfigiel
Copy link
Collaborator Author

gfigiel commented Jan 13, 2017

Hello,
Please feel free to review the further extension implementation as for PR: #82

RA extension will follow.

@gfigiel
Copy link
Collaborator Author

gfigiel commented Feb 14, 2017

During another session of internal test I found an issue with loadbalancing algorithm. The fix will follow after next testing session is finished (this week).

@stevedwyer-nasstar
Copy link

For peer load balancing, we simply extended RouterImpl and did a override of method selectPeer(List availablePeers). A new router can be configured per stack by setting the following extension point:


To do AVP-based balancing, one could simply override getPeer(IMessage message, IPeerTable manager) additionally and reading the required AVPs before selecting the final peer.
If anyone is interested, I could of course share some details.

Hi @nsowen , We've supplemented the WeightedRoundRobinRouter to resubmit failures due to a 3002 or 3004 Result Code to an alternate peer in the realm, while respecting the Weighted Round Robin routing algorithm. All peers are tried until the list becomes exhausted and they all returned a similar Result Code, or until one peer returns a Result Code other than 3002 or 3004.

I'd like to get this Pull Request merged, but it's just sat waiting. Perhaps if you're interested, you could give it a first review, then feed back any comments you have to me.

I'm hoping if I can get someone to review this, the barrier to getting it merged might be lowered.

Thanks so much. The Pull Request in question is #156 and this should fix #150 .

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

No branches or pull requests

6 participants