You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/07/14 11:20:52 UTC

[GitHub] [apisix] spacewander opened a new pull request #4605: feat: allow user-defined balancer with metadata in node

spacewander opened a new pull request #4605:
URL: https://github.com/apache/apisix/pull/4605


   Signed-off-by: spacewander <sp...@gmail.com>
   
   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #4605: feat: allow user-defined balancer with metadata in node

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #4605:
URL: https://github.com/apache/apisix/pull/4605#discussion_r673586354



##########
File path: docs/en/latest/admin-api.md
##########
@@ -568,6 +568,7 @@ In addition to the basic complex equalization algorithm selection, APISIX's Upst
 * `chash`: consistent hash
 * `ewma`: pick one of node which has minimum latency. See https://en.wikipedia.org/wiki/EWMA_chart for details.
 * `least_conn`: pick node which has the lowest `(active_conn + 1) / weight`. Note the `active connection` concept is the same with Nginx: it is a connection in used by a request.
+* user-defined balancer which can be loaed via `require("apisix.balancer.your_balancer")`.

Review comment:
       The user-defined balancer needs to use the metadata.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander merged pull request #4605: feat: allow user-defined balancer with metadata in node

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #4605:
URL: https://github.com/apache/apisix/pull/4605


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Yiyiyimu commented on a change in pull request #4605: feat: allow user-defined balancer with metadata in node

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on a change in pull request #4605:
URL: https://github.com/apache/apisix/pull/4605#discussion_r673549520



##########
File path: docs/en/latest/admin-api.md
##########
@@ -568,6 +568,7 @@ In addition to the basic complex equalization algorithm selection, APISIX's Upst
 * `chash`: consistent hash
 * `ewma`: pick one of node which has minimum latency. See https://en.wikipedia.org/wiki/EWMA_chart for details.
 * `least_conn`: pick node which has the lowest `(active_conn + 1) / weight`. Note the `active connection` concept is the same with Nginx: it is a connection in used by a request.
+* user-defined balancer which can be loaed via `require("apisix.balancer.your_balancer")`.

Review comment:
       I failed to find the context so I'm not sure the relationship between "allow user-defined balancer" and "discovery when metadata changed". Are they two separate features?

##########
File path: apisix/schema_def.lua
##########
@@ -389,7 +389,6 @@ local upstream_schema = {
         type = {
             description = "algorithms of load balancing",
             type = "string",
-            enum = {"chash", "roundrobin", "ewma", "least_conn"}

Review comment:
       do we need to test the behaviour when a non-user-defined algorithm is chosen




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Yiyiyimu commented on a change in pull request #4605: feat: allow user-defined balancer with metadata in node

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on a change in pull request #4605:
URL: https://github.com/apache/apisix/pull/4605#discussion_r673601987



##########
File path: docs/en/latest/admin-api.md
##########
@@ -568,6 +568,7 @@ In addition to the basic complex equalization algorithm selection, APISIX's Upst
 * `chash`: consistent hash
 * `ewma`: pick one of node which has minimum latency. See https://en.wikipedia.org/wiki/EWMA_chart for details.
 * `least_conn`: pick node which has the lowest `(active_conn + 1) / weight`. Note the `active connection` concept is the same with Nginx: it is a connection in used by a request.
+* user-defined balancer which can be loaed via `require("apisix.balancer.your_balancer")`.

Review comment:
       Got it. Thanks for explaination




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org