Baoyuantop commented on code in PR #12261:
URL: https://github.com/apache/apisix/pull/12261#discussion_r2613263462
##########
apisix/schema_def.lua:
##########
@@ -472,11 +472,11 @@ local upstream_schema = {
scheme = {
default = "http",
enum = {"grpc", "grpcs", "http", "https", "tcp", "tls", "udp",
- "kafka"},
+ "kafka", "websocket"},
Review Comment:
Why was WebSocket added here? In APISIX, WebSocket is typically implemented
via HTTP upgrades.
##########
apisix/balancer.lua:
##########
@@ -196,11 +196,21 @@ local function pick_server(route, ctx)
local nodes_count = #up_conf.nodes
if nodes_count == 1 then
- local node = up_conf.nodes[1]
- ctx.balancer_ip = node.host
- ctx.balancer_port = node.port
- node.upstream_host = parse_server_for_upstream_host(node,
ctx.upstream_scheme)
- return node
+ -- For least_conn balancer, we still need to use the balancer even
with single node
Review Comment:
Why would a single node require such a change?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]