You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/04/14 17:38:46 UTC

[GitHub] [druid] wjhypo commented on pull request #11114: Add a query context param allowedServerKeyword to optionally get partial results from a subset of data servers whose hostname matches a given keyword

wjhypo commented on pull request #11114:
URL: https://github.com/apache/druid/pull/11114#issuecomment-819696765


   @a2l007 Thanks for the idea! I think we can probably add a param to the `pick` function in `ServerSelectorStrategy` to push down the filtering logic to `ServerSelectorStrategy` to filter on the results of either `random` or `connectionCount` or other future extensions which seems cleaner than the current approach but not able to achieve the purpose through adding a new `ServerSelectorStrategy` because for the same tier of servers, the hostnames usually have the same convention, e.g., data-`server-memory-abc`, `data-server-memory-def`, and let's say there are 2 replicas for the same segment A on these 2 servers, if using `random`, either of them will be picked; if using `connectionCount`, the server with less connections will be picked; however, if we create a new `ServerSelectorStrategy` called `HostnameServerSelectorStrategy`, unless we specify the full host name in query context, e.g., `data-server-memory-abc` which is rare, if we just specify `data-server-memory`, we will get m
 ultiple candidates and need to fallback to use a sorting mechanism again such us `random` or `connectionCount` to order and pick one. Let me know if you have better ideas, thanks!
   
   
   
   
   


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org