comparison src/http/modules/ngx_http_split_clients_module.c @ 3892:12d8d2f30205

use MurmurHash2 for split_clients, because its distribution is much better than CRC32's one
author Igor Sysoev <igor@sysoev.ru>
date Fri, 15 Apr 2011 10:59:57 +0000
parents 8bff43217171
children eccd0b66a4ab
comparison
equal deleted inserted replaced
3891:203eb026ec07 3892:12d8d2f30205
85 85
86 if (ngx_http_complex_value(r, &ctx->value, &val) != NGX_OK) { 86 if (ngx_http_complex_value(r, &ctx->value, &val) != NGX_OK) {
87 return NGX_OK; 87 return NGX_OK;
88 } 88 }
89 89
90 hash = ngx_crc32_short(val.data, val.len); 90 hash = ngx_murmur_hash2(val.data, val.len);
91 91
92 part = ctx->parts.elts; 92 part = ctx->parts.elts;
93 93
94 for (i = 0; i < ctx->parts.nelts; i++) { 94 for (i = 0; i < ctx->parts.nelts; i++) {
95 95