1
Vote

Fast Server cache doesnt help in Load Balanced Environment - ESPSearchManager

description

We are seeing that ESPSearch webpart caches the server name of the FAST search engine server it connects to the first time and connects to the same server till an app pool recycle or IIS reset is made. This means there is no automatic failover in load balanced environment.
 
In the Class called ESPSearchmanager.cs 
 we see following code 
 
public static IESPSearchManager GetInstance(string espConnection)
    {
        if (!searchManagerDict.ContainsKey(espConnection))
        {
 
            lock (searchManagerLock)
            {
                if (!searchManagerDict.ContainsKey(espConnection))
                {
                    searchManagerDict.Add(espConnection, new ESPSearchManager(espConnection));
                                    }
            }
        }
                   return searchManagerDict[espConnection];
    }
 
In the load balanced environment, whenever there is one Fast server fails, the request should automatically redirect to second fast server which is up and running, this wont happen with the above code, as we always consider cached object.
 we are thinking of removing caching and creating instance for each request, Can any one tell us what is best way to do this. will this affect performance a lot even though Fast Instance created with singleton pattern.

comments