Replication working on a Network Load Balance(NLB)

Topics: Developer Forum, Project Management Forum, User Forum
Jun 25, 2008 at 7:52 PM
Hi,

I am trying to use, Indexus Shared Cache in my network load balance scenario. I have 4 servers, each one must have the cache installed. For users, they just see one ip, por example, 10.10.10.2( NLB IP), so, cache client has just this IP registered. The NLB is responsable to redirect the request for one server, that means, i don't know what server will receive the request. Each server must be able to replicate cache for other tree. Is it possible? How can i do that? In my tests i just got replicate cache from a eligeable "Master" server to other tree.

Thanks
Fábio Margarito(Brazil)
Jun 26, 2008 at 1:55 PM

hi fabio,

thanks for posting your question. please have a look at the following location where
i tried to explain how you can configure replicated caching: http://www.sharedcache.com/cms/replicated_caching.aspx

Hopefully I understood your question correclty and you have an environment as I tried
to paint at the following location:  http://www.sharedcache.com/cms/nlb_sample.aspx

If we assume that your server A is receiving the client and you have added within
your configuration servers: B, C & D data will be replicated automatically to those
nodes. In case you define only B & C you will have your data on this 2 nodes but
not within node D. If you define within C the node D even then the data will not be
published to server D because its received as replicated data and not primary data.

So lets say we have configured everything correclty you will have the data always
on all nodes doesn't matter to which server the client request will arrive.

i hope this helps.

regards,
roni

Jun 26, 2008 at 3:34 PM
Hi, ronischuetz,thanks for replying!

I follwed instrutions to configure my enviroment. To simulate, i got 2 server(Servers config attached), but when is tested it i have been an intermittent problem. When my client input a data in Server 1, the data is correctly replicated to Server 2, however, whether client input data in server 2 the data doens't replicates to Server 1. Sometimes, the effect is opposed, that means, the server 1 doesn't replicates data to server 2, but server 2 gets. I didn't get perceiving a default behavior to this kind of thing  happening!

Could you help me?Did you have some tip ou trick?

Config Server 1(server config)
===================================================================================================
 <replicatedSharedCache defaultProvider="ServerSharedCacheProvider">
  <serverSetting
    ServiceCacheIpAddress="127.0.0.1"
    ServiceCacheIpPort="48888"
    SharedCacheVersionNumber="2.0.3.270"
    LoggingEnable="1"
    ServiceFamilyMode="1"
    CacheAmountOfObjects="200"
    CacheAmountFillFactorInPercentage="90"
    ServiceCacheCleanup="LRU"
    ServiceCacheCleanupThreadJob="1200000"
    TcpServerMaxThreadToSet="-1"
    TcpServerMinThreadToSet="-1"
   />
  <replicatedServers>
        <add key="SERVER2" ipaddress="10.175.162.244" port="48888" />          
 </replicatedServers>

Config Server 2(bba.fwk.cache.server.exe.config)
===================================================================================================  <replicatedSharedCache defaultProvider="ServerSharedCacheProvider">
    <serverSetting
    ServiceCacheIpAddress="127.0.0.1"
    ServiceCacheIpPort="48888"
    SharedCacheVersionNumber="2.0.3.270"
    LoggingEnable="1"
    ServiceFamilyMode="1"
    CacheAmountOfObjects="200"
    CacheAmountFillFactorInPercentage="90"
    ServiceCacheCleanup="LRU"
    ServiceCacheCleanupThreadJob="1200000"
    TcpServerMaxThreadToSet="-1"
    TcpServerMinThreadToSet="-1"
   />
    <replicatedServers>
  <add key="SERVER 1"  ipaddress="10.175.159.189"  port="48888" />
    </replicatedServers>

regards,
Fábio Margarito




Jun 26, 2008 at 7:06 PM
Edited Jun 26, 2008 at 7:28 PM
I was about to create a post with the same replication problem. Have two servers and replication sometimes work from one side but not the other (and sometimes the other way around)

I have downloaded all the latest code available and get the behavior.
Jun 26, 2008 at 8:16 PM
I don't know if helps, but testing again, i realize that the cache service which inicialize latest, is the server  able to replicate data to other.
Jun 26, 2008 at 11:07 PM
@ecalderon, do you use also 2 different ip ranges in your configuration? 

10.175.159.189
10.175.162.244


i'm working on a setup to test this, because so far its hard to try to reproduce it so it would be intersting what kind of config do you use. thanks in advance for your reply.    
Jun 26, 2008 at 11:21 PM

Hello ronischeutz

For one of the servers I had this configuration:
<configSections>
        <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
        <section name="replicatedSharedCache"
                         type="    MergeSystem.Indexus.WinServiceCommon.Configuration.Server.IndexusServerProviderSection,
                                        MergeSystem.Indexus.WinServiceCommon"/>
    </configSections>
    <appSettings />       
    <replicatedSharedCache defaultProvider="ServerSharedCacheProvider">
        <serverSetting
                ServiceCacheIpAddress="127.0.0.1"
                ServiceCacheIpPort="48888"
                SharedCacheVersionNumber="2.0.4.273"
                LoggingEnable="1"
                ServiceFamilyMode="1"
                CacheAmountOfObjects="-1"
                CacheAmountFillFactorInPercentage="90"
                ServiceCacheCleanup="LRU"
                ServiceCacheCleanupThreadJob="3600000"
                TcpServerMaxThreadToSet="-1"
                TcpServerMinThreadToSet="-1"
            />
        <replicatedServers>
                <add key="SrvZh02"        ipaddress="10.101.1.10" port="48888" />
            <!-- DO NOT DEFINE THE INSTANCE ITSELF !!! IT WILL BE AUTOMATICALLY REMOVED BY RUNTIME -->
            <!--
                ONLY CONFIGURE THIS IF YOU SET FAMILY MODE TO 1
                <add key="SrvZh02"        ipaddress="10.101.1.50" port="48888" />
                <add key="SrvZh03"        ipaddress="127.0.0.1" port="48888" />
                <add key="SrvZh02"        ipaddress="192.168.212.37" port="48888" />
                <add key="SrvZh04"        ipaddress="192.168.212.11" port="48888" />
                <add key="SrvZh05db"  ipaddress="192.168.212.12" port="48888" />
            -->
        </replicatedServers>
        <providers>
            <add name="ServerSharedCacheProvider"
        type="MergeSystem.Indexus.WinServiceCommon.Provider.Server.IndexusServerSharedCacheProvider, MergeSystem.Indexus.WinServiceCommon">
            </add>
        </providers>
    </replicatedSharedCache>

And the second server had this one:

<configSections>
        <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
        <section name="replicatedSharedCache"
                         type="    MergeSystem.Indexus.WinServiceCommon.Configuration.Server.IndexusServerProviderSection,
                                        MergeSystem.Indexus.WinServiceCommon"/>
    </configSections>
    <appSettings />       
    <replicatedSharedCache defaultProvider="ServerSharedCacheProvider">
        <serverSetting
                ServiceCacheIpAddress="127.0.0.1"
                ServiceCacheIpPort="48888"
                SharedCacheVersionNumber="2.0.4.273"
                LoggingEnable="1"
                ServiceFamilyMode="1"
                CacheAmountOfObjects="-1"
                CacheAmountFillFactorInPercentage="90"
                ServiceCacheCleanup="LRU"
                ServiceCacheCleanupThreadJob="3600000"
                TcpServerMaxThreadToSet="-1"
                TcpServerMinThreadToSet="-1"
            />
        <replicatedServers>
                <add key="SrvZh02"        ipaddress="10.101.1.69" port="48888" />
            <!-- DO NOT DEFINE THE INSTANCE ITSELF !!! IT WILL BE AUTOMATICALLY REMOVED BY RUNTIME -->
            <!--
                ONLY CONFIGURE THIS IF YOU SET FAMILY MODE TO 1
                <add key="SrvZh02"        ipaddress="10.101.1.50" port="48888" />
                <add key="SrvZh03"        ipaddress="127.0.0.1" port="48888" />
                <add key="SrvZh02"        ipaddress="192.168.212.37" port="48888" />
                <add key="SrvZh04"        ipaddress="192.168.212.11" port="48888" />
                <add key="SrvZh05db"  ipaddress="192.168.212.12" port="48888" />
            -->
        </replicatedServers>
        <providers>
            <add name="ServerSharedCacheProvider"
        type="MergeSystem.Indexus.WinServiceCommon.Provider.Server.IndexusServerSharedCacheProvider, MergeSystem.Indexus.WinServiceCommon">
            </add>
        </providers>
    </replicatedSharedCache>

I hope this helps
Jun 27, 2008 at 1:03 PM
Edited Jun 27, 2008 at 1:03 PM
hi fabio & ecalderon,

can you make me a zip of your client & server Log files and send them to SharedCache [at] indeXus [dot] Net?

@ecalderon, thanks for the posting your config.

regards,
roni