TransportClient design for Multiple Clusters

Hi ES experts,

For a system that you anticipate there will grow in # of clusters, how will you design it in a Machine learning way, that it knows the # of clusters has increased and it will create an additional transport client?

Here is my 1st attempt:

void config(){
      //create placeholders for setting and transportclient
      List<Setting> = new ArrayList<Setting>();
      List<TransportClient> = new ArrayList<TransportClient>();
      
      //retrieve properties value from config.properties
         PropertiesConfiguration prop = new PropertiesConfiguration("config.properties");
        String[] clusterArray = prop.getStringArray("cluster.name");
      
    //loop through clusterArray and pass setting config to createTransportClient()
     for(String cluster: clusterArray){
         Settings settings = Settings.builder()
        .put("cluster.name", cluster).build();
        
        createTransportClient(setting);
    }
}
void createTransportClient(Setting setting){
      TransportClient client = new PreBuiltTransportClient(settings);
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.