Distributed caching

Topics: Developer Forum, User Forum
Sep 21, 2010 at 4:59 PM
Edited Sep 21, 2010 at 5:55 PM

Hi all,

I've got a web application in Framework 2.0 referencing SharedCache.WinServiceCommon.dll in framework 3.5 deployed on 2 servers : server1 & server2. On each server indeXus.Net Shared Cache is installed  and the service is running.

>>Here the web.config of server1:

<configSections>
    <section name="indexusNetSharedCache" type="SharedCache.WinServiceCommon.Configuration.Client.IndexusProviderSection, SharedCache.WinServiceCommon"/>
  </configSections>
  <indexusNetSharedCache defaultProvider="IndexusSharedCacheProvider">
    <clientSetting
                SharedCacheVersionNumber="3.0.5.1"
                LoggingEnable="0"
                CompressionEnabled="0"
                CompressionMinSize="1024000"
                SocketPoolMinAvailableSize="5"
                HashingAlgorithm="Hashing" />  
    <servers>
      <add key="localhost"    ipaddress="127.0.0.1" port="48888"/>     
      <add key="server2"    ipaddress="172.16.5.62" port="48888"/>
    </servers>
    <replicatedServers>     
    </replicatedServers>
    <providers>
      <add
                name="IndexusSharedCacheProvider"
                type="SharedCache.WinServiceCommon.Provider.Cache.IndexusSharedCacheProvider, SharedCache.WinServiceCommon"
           >
      </add>
    </providers>
  </indexusNetSharedCache>

 

>>Here the web.config of server2

<configSections>
    <section name="indexusNetSharedCache" type="SharedCache.WinServiceCommon.Configuration.Client.IndexusProviderSection, SharedCache.WinServiceCommon"/>
  </configSections>
  <indexusNetSharedCache defaultProvider="IndexusSharedCacheProvider">
    <clientSetting
                SharedCacheVersionNumber="3.0.5.1"
                LoggingEnable="0"
                CompressionEnabled="0"
                CompressionMinSize="1024000"
                SocketPoolMinAvailableSize="5"
                HashingAlgorithm="Hashing" />  
    <servers>
      <add key="localhost"    ipaddress="127.0.0.1" port="48888"/>     
      <add key="server1"        ipaddress="172.16.5.79" port="48888"/>
    </servers>
    <replicatedServers>     
    </replicatedServers>
    <providers>
      <add
                name="IndexusSharedCacheProvider"
                type="SharedCache.WinServiceCommon.Provider.Cache.IndexusSharedCacheProvider, SharedCache.WinServiceCommon"
           >
      </add>
    </providers>
  </indexusNetSharedCache>

 

On each servers the SharedCache.WinService.exe.config is as follows:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <configSections>       
        <section name="replicatedSharedCache" type="SharedCache.WinServiceCommon.Configuration.Server.IndexusServerProviderSection, SharedCache.WinServiceCommon" />
    </configSections>
    <appSettings>
        <add key="ClientSettingsProvider.ServiceUri" value="" />
    </appSettings>
    <replicatedSharedCache defaultProvider="ServerSharedCacheProvider">
        <serverSetting
            ServiceCacheIpAddress="127.0.0.1"
            ServiceCacheIpPort="48888"
            SharedCacheVersionNumber="3.0.5.1"
            LoggingEnable="0"
            ServiceFamilyMode="0"
            CacheAmountOfObjects="800"
            CacheAmountFillFactorInPercentage="90"
            ServiceCacheCleanup="LRU"
            ServiceCacheCleanupThreadJob="3600000"
            TcpServerMaxThreadToSet="-1"
            TcpServerMinThreadToSet="-1"
            SocketPoolMinAvailableSize="5"
            SocketPoolValidationInterval="00:02:00"
            SocketPoolTimeout="00:02:00"
        />
        <replicatedServers>     
        </replicatedServers>
        <providers>
            <add name="ServerSharedCacheProvider" type="SharedCache.WinServiceCommon.Provider.Server.IndexusServerSharedCacheProvider, SharedCache.WinServiceCommon">
            </add>
        </providers>     
    </replicatedSharedCache>
    <system.web>
        <membership defaultProvider="ClientAuthenticationMembershipProvider">
            <providers>
                <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
            </providers>
        </membership>
        <roleManager defaultProvider="ClientRoleProvider" enabled="true">
            <providers>
                <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
            </providers>
        </roleManager>
    </system.web>
</configuration>

 

I can't get distributed cache to work. Each server has its own seperated cache.

Server1 & Server2 have the same CLR version.

I tested replicated cache and it's work fine can someone help me to configure distributed cache?

 

 

 

 

 

 

Sep 30, 2010 at 4:14 PM

Up !

can someone help me !!

Sep 30, 2010 at 4:38 PM

did you consult the following page: http://www.sharedcache.com/cms/distributed_caching.aspx ??

instead of using 127.0.0.1 use the local external IP.

<add key="localhost"    ipaddress="127.0.0.1" port="48888"/>      
<add key="server1"        ipaddress="172.16.5.79" port="48888"/>

 

Sep 30, 2010 at 8:41 PM

Yes I consulted  the following page: http://www.sharedcache.com/cms/distributed_caching.aspx ??

and I tried the local external IP but I can't get distributed cache to work !

do you have others ideas?