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

dyups更新和删除upstream不生效问题 #1979

Open
binghe1918 opened this issue Dec 13, 2024 · 1 comment
Open

dyups更新和删除upstream不生效问题 #1979

binghe1918 opened this issue Dec 13, 2024 · 1 comment

Comments

@binghe1918
Copy link

nginx配置:
upstream test222 {
#check interval=3000 rise=3 fall=3 timeout=3000 type=tcp;
server 10.0.0.10:80;
server 20.0.0.20:80;
}

server {
listen 1.1.1.1:7777;
location / {
proxy_pass http://test222;
}
}

nginx启动之后,使用dyups更新uptream test222或删除test222,数据面访问 1.1.1.1:7777,还是会按照原始的配置进行转发,是否合理?
主要原因在ngx_http_upstream_init_request函数中:
if (u->resolved == NULL) {
uscf = u->conf->upstream; //从此处直接获取upstream,而不是遍历umcf->upstreams.elts查找
} else {
}

@IYism
Copy link
Contributor

IYism commented Dec 25, 2024

server {
listen 1.1.1.1:7777;
location / {
set $target "test222";
proxy_pass http://$target;
}
}

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