]> git.kaiwu.me - nginx.git/commitdiff
use MurmurHash2 for split_clients, because
authorIgor Sysoev <igor@sysoev.ru>
Fri, 15 Apr 2011 10:59:57 +0000 (10:59 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 15 Apr 2011 10:59:57 +0000 (10:59 +0000)
its distribution is much better than CRC32's one

src/http/modules/ngx_http_split_clients_module.c

index c28b8f931c46c380327f331c208e0ff08dcb0cc6..a43fac5195e01658fa36905ebe08633778e5a09a 100644 (file)
@@ -87,7 +87,7 @@ ngx_http_split_clients_variable(ngx_http_request_t *r,
         return NGX_OK;
     }
 
-    hash = ngx_crc32_short(val.data, val.len);
+    hash = ngx_murmur_hash2(val.data, val.len);
 
     part = ctx->parts.elts;