Help on config between "Replicated Caching" and "Distributed Caching"

Topics: User Forum
Mar 8, 2008 at 11:53 AM
Hello,
What's are differences in configuration between "Replicated Caching" and "Distributed Caching" ?

Is it that for "Distributed Caching" the Client config has all servers in its replicatedSharedCache/replicatedServers section and only on for "Replicated Caching" ?

Is that ?
Thanks
Cyrille
Mar 8, 2008 at 8:00 PM
Edited Mar 8, 2008 at 8:01 PM
Hi Cyrille,

please have a look on the samples for distributed or replicated caching

Replicated Caching Configuration


let say we have 3 server and we would like to configure them for replication:

- Server no. 1: Name: SrvZh02; IP: 192.168.212.37
- Server no. 2: Name: SrvZh03; IP: 192.168.212.21
- Server no. 3: Name: SrvZh04; IP: 192.168.212.12

Configuration for Server No. 1 will contain the following information:

Server

With this setting we enable Replication:
 ServiceFamilyMode="1"
And now we have to define to which servers we would like to replicate the information:
<replicatedServers>
	<!-- 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="SrvZh03"	     ipaddress="192.168.212.21" port="48888" />
	<add key="SrvZh04"	     ipaddress="192.168.212.12" port="48888" />
</replicatedServers>

Client:

The client on Server No.1 would look like this:
<servers>
	<!-- here you define your main instance -->
	<add key="SrvZh02" ipaddress="192.168.212.37" port="48888" />
</servers>
<replicatedServers>
	<add key="SrvZh04"	ipaddress="192.168.212.11" port="48888" />
	<add key="SrvZh03"	ipaddress="192.168.212.21" port="48888" />
</replicatedServers>
The client has an automatic fallback, if the server 192.168.212.37 is not available it will get information from the replicatedServers config.

Distributed Caching Configuration

lets configure same servers for Distributed caching:

- Server no. 1: Name: SrvZh02; IP: 192.168.212.37
- Server no. 2: Name: SrvZh03; IP: 192.168.212.21
- Server no. 3: Name: SrvZh04; IP: 192.168.212.12

Server

Do not load the ReplicatedServer Module:
 ServiceFamilyMode="0"
We dont need to configure here anything, since there will be no server to server communication.
	<!-- leave this section empty -->
	<replicatedServers />
			

client

now we need to add all 3 instances:
<servers>
	<add key="SrvZh02"	ipaddress="192.168.212.37" port="48888" />
	<add key="SrvZh03"	ipaddress="192.168.212.21" port="48888" />
	<add key="SrvZh04"	ipaddress="192.168.212.12" port="48888" />
</servers>
<!-- here we dont add any of the servers the failover also dont work for distributed caching since the item is located only on one single instance -->
<replicatedServers />