We are developing an nginx openresty app that will have a high load upstream traffic. ex - https://upstream.com
However, are spending around 100 ms every time we connect to upstream.
To leverage the connection pool, I started using
http://nginx.org/en/docs/http/ngx_http_upstream_module.html with the keep alive directive.
in this directive, we have tried to make the server name dynamic using the balancer by lua block.
https://github.com/openresty/lua-nginx-module#balancer_by_lua_block
and using https://github.com/openresty/lua-resty-dns#tcp_query for dns resolution.
Though these things work for me, I am trying to find out if there is any way we can achieve DNS resolution on openresty + nginx opensource and still avoid the hard coupling of not entering the host DNS directly in the upstream block.
Because if we explicitly mention the server DNS for upstream then the nginx+openresty app fails to start when it can't resolve the DNS.
Sample code:
Any help in this regard will be appreciated.
--
You received this message because you are subscribed to the Google Groups "openresty-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openresty-en...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openresty-en/b1b824e9-5fc6-45b4-a5bb-51831066d652n%40googlegroups.com.