From 7e3dacd261ca2d6f85a58a35116d930868bf6154 Mon Sep 17 00:00:00 2001 From: htuch Date: Fri, 19 May 2017 05:32:45 -0400 Subject: [PATCH] rds: make hash policy extensible. (#52) Fixes #5. --- api/rds.proto | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/api/rds.proto b/api/rds.proto index 3bc3e7a6..9754cecb 100644 --- a/api/rds.proto +++ b/api/rds.proto @@ -199,9 +199,18 @@ message ForwardAction { google.protobuf.BoolValue include_vh_rate_limits = 13; message HashPolicy { - string header_name = 1; - // Do we want to extend this for additional session affinity inputs? - // [V2-API-DIFF] + // [V2-API-DIFF] We expect additional hash policies in the future, e.g. + // cookie based, originating IP, etc. + message Header { + // The name of the request header that will be used to obtain the hash + // key. If the request header is not present, the load balancer will use a + // random number as the hash, effectively making the load balancing policy + // random. + string header_name = 1; + } + oneof policy_specifier { + Header header = 1; + } } repeated HashPolicy hash_policy = 14; }