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

upstream无法触发轮询策略 #16

Open
1926813494 opened this issue Jan 5, 2025 · 3 comments
Open

upstream无法触发轮询策略 #16

1926813494 opened this issue Jan 5, 2025 · 3 comments

Comments

@1926813494
Copy link

openresty版本:openresty-1.25.3.2
nacos:2.4.3

upstream 配置:
upstream test {
nacos_subscribe_service service_name=test group=DEFAULT_GROUP weight=1 max_fails=1 fail_timeout=10s;
}

location /admin/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://test/;
}

启动3个服务,访问请求,发现一直只请求第一个服务,没有进行轮询请求

@zhwaaaaaa
Copy link
Collaborator

zhwaaaaaa commented Jan 8, 2025

确保 服务是健康状态,并且 未被下线。不健康或者被下线的服务会被 忽略掉

@1926813494
Copy link
Author

1926813494 commented Jan 15, 2025

确保 服务是健康状态,并且 未被下线。不健康或者被下线的服务会被 忽略掉

服务都是在线状态,下线后会切换在其它正常的服务,但是没进行轮询,我还是测试了openresty-1.21.4.4、openresty-1.19.9.2 都不会触发请求轮询,还是说不支持,我使用操作系统是centos7.9的不会由于系统的影响吧

@zhwaaaaaa
Copy link
Collaborator

实现实现的是轮询,每个版本都是一样的。可能是个bug,尝试把权重调大试试,我周末再复现一下。

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

No branches or pull requests

2 participants