<p style="margin-top:0px!important;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font:inherit;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px;background-color:rgb(255,255,255)">

I'm trying to address several redis instances, dispatching it on a host:port basis (one single backend location)</p><p style="margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font:inherit;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px;background-color:rgb(255,255,255)">

here part of my nginx.conf location<br>...<br>location /redis_backend {<br>internal;<br>set_unescape_uri $verb $arg_verb;<br>set_unescape_uri $key $arg_key;<br>set_unescape_uri $r_host $arg_host;<br>set_unescape_uri $r_port $arg_port;<br>

redis2_query $verb $key;<br>redis2_pass $r_host:$r_port;<br>}<br>...</p><p style="margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font:inherit;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px;background-color:rgb(255,255,255)">

I call /redis_backend location from a lua like this:</p><p style="margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font:inherit;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px;background-color:rgb(255,255,255)">

....<br>r_instance["redis_host"] = '127.0.0.1'<br>r_instance["redis_port"] = '33001'<br>....<br>local res = ngx.location.capture (<br>"/redis_backend",<br>{ args = <br>{ verb = r_verb,<br>

key = redis_key,<br>host = r_instance["redis_host"],<br>port = r_instance["redis_port"],<br>} <br>}<br>)<br>...</p><p style="margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font:inherit;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px;background-color:rgb(255,255,255)">

in nginx error log (i use the openresty suite ngx_openresty/<a href="http://1.0.10.44">1.0.10.44</a>), I got this error</p><p style="margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font:inherit;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px;background-color:rgb(255,255,255)">

<i><b>2012/04/07 19:25:03 [error] 11715#0: *1 redis2: upstream "<a href="http://127.0.0.1:33001">127.0.0.1:33001</a>" not found, client: 127.0.0.1, server: ....</b></i></p><p style="margin-top:15px;margin-right:0px;margin-bottom:15px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font:inherit;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px;background-color:rgb(255,255,255)">

I'm sure redis instance is up&running. I'm able to connect to her via redis-cli or, simply setting redis2_pass <a href="http://127.0.0.1:33001">127.0.0.1:33001</a>;</p><p style="margin-top:15px;margin-right:0px;margin-bottom:0px!important;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font:inherit;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px;background-color:rgb(255,255,255)">

ciao<br>massimo</p><br><br>