Enum CommonConstants.Broker.AdaptiveServerSelector.Type

  • All Implemented Interfaces:
    Serializable, Comparable<CommonConstants.Broker.AdaptiveServerSelector.Type>, java.lang.constant.Constable
    Enclosing class:
    CommonConstants.Broker.AdaptiveServerSelector

    public static enum CommonConstants.Broker.AdaptiveServerSelector.Type
    extends Enum<CommonConstants.Broker.AdaptiveServerSelector.Type>
    Adaptive Server Selection feature has 2 parts: 1. Stats Collection 2. Routing Strategy Stats Collection is controlled by the config CONFIG_OF_ENABLE_STATS_COLLECTION. Routing Strategy is controlled by the config CONFIG_OF_TYPE. Stats Collection: Enabling/Disabling stats collection will dictate whether stats (like latency, # of inflight requests) will be collected when queries are routed to/received from servers. It does not have any impact on the Server Selection Strategy used. Routing Strategy: Decides what strategy should be used to pick a server. Note that this routing strategy complements the existing Balanced/ReplicaGroup/StrictReplicaGroup strategies and is not a replacement.The available strategies are as follows: 1. NO_OP: Uses the default behavior offered by Balanced/ReplicaGroup/StrictReplicaGroup instance selectors. Does NOT require Stats Collection to be enabled. 2. NUM_INFLIGHT_REQ: Picks the best server based on the number of inflight requests for each server. Requires Stats Collection to be enabled. 3. LATENCY: Picks the best server based on the Exponential Weighted Moving Averge of Latency for each server. Requires Stats Collection to be enabled. 4. HYBRID: Picks the best server by computing a custom hybrid score based on both latency and # inflight requests. This is based on the approach described in the paper https://www.usenix.org/system/files/conference/nsdi15/nsdi15-paper-suresh.pdf. Requires Stats Collection to be enabled.