Welcome! Log In Create A New Profile

Advanced

question regarding the "server" directive handler function

February 20, 2010 11:36AM
hi

some time ago i wrote the nginx module upstream_consistent_hash which
is also presented on the nginx wiki:
http://wiki.nginx.org/Nginx3rdPartyModules#Upstream_Consistent_Hash

so this module actually works and is compatible to the php memcache
module. but i have the following problem. if you specify memcache
hosts, using dns names, then the php-memcache module will build the
hashring based on the dns names that are entered, but the nginx
upstream_consistent_hash module builds the hashring based on the
resolved ips.
i'm looking for a way to fix this. for this the directive handler
function ngx_http_upstream_consistent_hash would need to get the
actual strings which are entered into the config somehow, not only the
resolved ips. so i've read through the code of the upstream module
where it handles the "server" directive. and if i understand that code
there right, there is actually no way to retrieve the entered strings
without patching the upstreams module, because the upstreams module
seems to resolve the names via ngx_parse_url and then only keeps
certain data of the ngx_url_t struct, but not the actual entered
string.

is that right, do i really have to patch the upstreams module, or did
i (hopefully) miss something?

thanks,

mauro

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

question regarding the "server" directive handler function

replay February 20, 2010 11:36AM

Re: question regarding the "server" directive handler function

Maxim Dounin February 20, 2010 11:36AM

Re: question regarding the "server" directive handler function

replay February 20, 2010 11:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 176
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready