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

Load balance across module connections in v4 #2466

Open
alandekok opened this Issue Feb 6, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@alandekok
Copy link
Member

alandekok commented Feb 6, 2019

We want to have modules (e.g. radius) open multiple connections, and manage connections to multiple home servers. At the same time, we want to do load-balancing, etc. in the server core, instead of pushing that to the modules.

We can't instantiate multiple versions of the same module, one for each connection / home server. The issue there is that the module instance tree isn't thread-local (tho maybe it should be). Also, if a module clones itself, what does that mean?

i.e. we have:

load-balance {
   radius
}

How will the module tell the parent keyword that there are multiple instances of itself?

One option is to just have the module register keyword-specific callbacks. That way the load-balance keyword can ask the module how many connections it has, and then do load-balancing across those connections.

That does seem somewhat solution-specific tho.

The unlang compile && interpret phase then have to be updated to know about the dynamic number of children, instead of using g->num_children.

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