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

Marten Lehmann lehmann at cnm.de
Wed May 12 06:16:02 MSD 2010


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





More information about the nginx-devel mailing list