-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Support for additional LB options #71
Comments
+1 I've been using max_fails=0 to prevent all our applications going down when one is misbehaving. Yes, we have a bit of a weird set up on AWS ECS where we use nginx for ssl termination & caching in front of a ALB that routes to multiple applications. When one application becomes unreachable, nginx would mark the upstream server (i.e. the ALB) as down and server 503's or something for 10s. Unfortunatly, setting proxy_next_upstream off does not prevent this. |
all the options that are on round robin shouldnt be that hard as jdomain extends round robin. @holstvoogd Could you please explain your proxy_next_upstream comment? From my understanding that should behave the same with jdomain as with a round robin (without any weight, max_fails or fail_timeout). |
@splitice It was just a note/observatiuon that |
Agree this would be a good addition. I don't know if it's possible since I haven't looked at the roundrobin code in a while, but ideally we could leverage the builtin module to parse any arguments not exposed by jdomain directly. Otherwise, I am not opposed to parsing them manually along with the rest of the arguments. |
By the way do you have any data on this module and how it interacts with other balancers (e.g least_conn)? What might be required to make jdomain compatible with additional underlying balancers? |
Not exactly what 'data' you'd be interested in, however I do have some (admittedly weak) tests defined which address the various other upstream-context directives, including least_conn and hash. (See t/004.compatibility_nginx.t) If my memory serves, the way it's implemented is that jdomain, upon initialization, extends the current loadbalancer alg specified for that upstream block or roundrobin as default if none is specified, which basically means that in order to use an underlying LB algorithm other than roundrobin, you just need to declare that before any instance of a |
In the situation:
Assuming example.com expands to 4 servers how does least_conn behave? 5 total hosts each balanced for least_conn? I did some testing with least_conn nearly a year ago and it didnt seem to be working. Perhaps I made a mistake in my testing. Perhaps I need to repeat that testing. Regarding option parsing. It looks like we can get most of it just by passing Disadvantage of course is that string and array manipulation is ugly. Possibly slightly slower than our current method (configuration time performance). How I would do it:
|
Hi @splitice , Regarding testing of The behaviour of the LB the way it's being tested in the repo currently, it does basically the same thing as regular round robin, since the upstream is only getting one connection at a time. In the future it would be great to harden that test case, and perhaps also define a test case for |
BTW I did one of the possible options in #84 To anyone who needs additional options, thats how you add it. The only way that I can see for now is to manually bring each over. |
+1 |
seems that this module do not support other arguements e.g weight, max_fails, fail_timeout, will it support in the future ? thx |
do u guys have any solutions? |
e.g weight, max_fails, fail_timeout
This does raise the question as to how we specify these (equally?) to each server member
The text was updated successfully, but these errors were encountered: