pinot-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull request #5046: Re-design the broker routing
Date Fri, 07 Feb 2020 23:50:33 GMT
Jackie-Jiang commented on a change in pull request #5046: Re-design the broker routing

 File path: pinot-broker/src/main/java/org/apache/pinot/broker/routing/v2/instanceselector/
 @@ -0,0 +1,62 @@
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.pinot.common.metrics.BrokerMetrics;
+import org.apache.pinot.common.utils.HashUtil;
+ * Instance selector for replica-group routing strategy.
+ * <p>The selection algorithm will always evenly distribute the traffic to all replicas
of each segment, and will select
+ * the same replica id for all segments with the same number of replicas. The algorithm is
very light-weight and will
+ * do best effort to select the least servers for the request.
+ * <p>The algorithm relies on the mirror segment assignment from replica-group segment
assignment strategy. With mirror
+ * segment assignment, any server in one replica-group will always have a corresponding server
in other replica-groups
+ * that have the same segments assigned. For an example, if S1 is a server in replica-group
1, and it has mirror server
+ * S2 in replica-group 2 and S3 in replica-group 3. All segments assigned to S1 will also
be assigned to S2 and S3. In
+ * stable scenario (external view matches ideal state), if we always pick the same replica
id for all segments, only
 Review comment:
   There is no guarantee on selecting the servers from the same replica-group, but it is guaranteed
that only 2 servers are selected for each query, and each server only need to answer 1 query.
   Updated the doc for more explaination

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message