From 07644456eedccd8c506ef09b7379dcc2a2b01b1f Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Fri, 11 Jan 2019 02:38:26 +0000 Subject: [PATCH] Add murmurhash2 for ring hash load balancing. (#5492) Signed-off-by: Henry Yang Mirrored from https://github.com/envoyproxy/envoy @ d0bfc0e269b300584c052bb26e5f68fd1e7b9c72 --- envoy/api/v2/cds.proto | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/envoy/api/v2/cds.proto b/envoy/api/v2/cds.proto index d4daac7b..840fd4cc 100644 --- a/envoy/api/v2/cds.proto +++ b/envoy/api/v2/cds.proto @@ -416,6 +416,20 @@ message Cluster { // Deprecated settings from v1 config. // [#not-implemented-hide:] Hide from docs. DeprecatedV1 deprecated_v1 = 2 [deprecated = true]; + + // The hash function used to hash hosts onto the ketama ring. + enum HashFunction { + // Use `xxHash `_, this is the default hash function. + XX_HASH = 0; + // Use `MurmurHash2 `_, this is compatible with + // std:hash in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled + // on Linux and not macOS. + MURMUR_HASH_2 = 1; + } + + // The hash function used to hash hosts onto the ketama ring. The value defaults to + // :ref:`XX_HASH`. + HashFunction hash_function = 3 [(validate.rules).enum.defined_only = true]; } // Specific configuration for the