Dynamic http upstream based on Host-Header an DNS/LDAP lookup

Mauro Stettler mauro.stettler at gmail.com
Wed May 12 06:21:39 MSD 2010

i haven't tested this. but one thing that you could check is doing the
lookups in an eval block, using the nginx mod eval. then use the reply
to select the upstream. maybe also use  the memc module to cache the
reply in memcache


what i don't know is how to do the lookup using dns/ldap

On Wed, May 12, 2010 at 10:16, Marten Lehmann <lehmann at cnm.de> wrote:
> Hello,
> I studied the documentation of NginxHttpUpstreamModule, NginxHttpProxyModule,
> NginxHttpMemcachedModule and NginxMailAuthModule in the nginx wiki and each
> module does partially what I need, but none of them completely.
> This is my idea: I want to route HTTP requests to certain backends according
> to the host header of the request. The domain of the host header shall be used
> to lookup the backend/upstream IP-address by DNS or LDAP and set it as
> proxy_pass target. To prevent frequent lookups of the domains in every HTTP
> request, the lookups shall be cached with memcached. So in short, I want to
> built a dynamic proxy/upstream routing for mass hosting and later SSL
> offloading, too.
> Does any nginx module exist that I haven't get to know yet, but that is
> suitable for this task? Or should I think about extending the
> NginxHttpProxyModule for dynamic proxy_pass lookups and memcached-caching?
> Kind regards
> Marten
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://nginx.org/mailman/listinfo/nginx-devel

More information about the nginx-devel mailing list