Large latency increase when using a resolver for proxy_pass

Maxim Dounin mdounin at mdounin.ru
Fri Mar 3 12:41:41 UTC 2017


Hello!

On Fri, Mar 03, 2017 at 04:53:56AM -0500, user384829 wrote:

> What about if we used a stream/tcp proxy_pass with resolver? Something like
> this:
> 
> resolver 8.8.8.8 8.8.4.4 ipv6=off; 
> 
> stream {
>   server { 
>     listen localhost:81; 
>     set $upstream_host my.upstream-host.com;
>     proxy_pass $upstream_host:443; 
>   } 
> }
> 
> server { 
>   listen 80; 
>   location ~ /api/ { 
>     rewrite /api/(.*) /$1 break;
>     proxy_ssl_verify off; 
>     proxy_pass https://localhost:81; 
>   } 
> } 
> 
> Would this work?

The result will be exactly the same: it will work, but SSL 
sessions won't be cached.

-- 
Maxim Dounin
http://nginx.org/


More information about the nginx mailing list