Hi, to enable the nginx to refresh resolution of the upstream, we put the upstream domain in a variable
set $redis_dev redis:6379;
and our redis and redis2 is configured as follows:
location = /redis {
internal;
set $redis_key $args;
redis_pass $redis_dev;
}
location = /redis2 {
internal;
set_unescape_uri $exptime $arg_exptime;
set $key $arg_key;
redis2_query set $key $echo_request_body;
redis2_query expire $key $exptime;
redis2_pass $redis_dev;
}
but when doing it this way it appears the srcache redis_pass is not resolving the hostname but it is giving an error:
2020/09/16 20:54:23 [error] 7#7: *1 redis: upstream "redis:6379" not found, client: 172.17.0.1, server: ....
Is there anything wrong the the current configuration and how i can make it work? thank you