NCache 4.6 - Online Documentation

Bridge Configurations

NCache Bridge provides two kinds of bridge configurations:
1. Active-Passive Configuration
This configuration is mostly used for creating backups for disaster recovery. In this configuration, there is an active site, a bridge and a passive site. Operations are replicated to the passive site from the active site through bridge. No requests are directed to the passive site. Bridge is created at the active site to reduce bridge replication cost from source to bridge.
If the active site goes down by any cause, the client requests can be transferred to passive site by making it active. The passive site will now behave as active and treat all requests without any request failures.
When the old active site is ready and restarted, reform the configurations same as before. Both sites should be active to transfer all the data from old passive to old active site. When data transfer is complete, make configurations to the passive site and redirect all requests to active site.
2. Active-Active Configuration
This configuration is used when there are active data centers in two regions and the need is to synchronize caches between those regions. The bridge has active sites on both its ends. Client requests are treated by all sites so replication is bidirectional. Operations are replicated from any one site to other site. Bridge can be created on any of the two sites since both of them are active. In most of the cases, the bridge resides in the region of that site which has higher user traffic to reduce bridge replication cost.
Since communication is between two active caches, so it is a possibility that the same cached data is updated on both sites simultaneously. This causes a conflict in the cache item’s value. To resolve this conflict, NCache provides a Conflict Resolver which resolves operation conflict on bridge time. It is quite possible that these two active sites reside in two different time zones. To address the conflict of time, both caches synchronize their time with bridge time. When an operation conflict occurs, the bridge time stamp is used to figure out which operation is the latest. By default, the latest operation wins and is applied on cache in case of a conflict. The users can also customize Conflict Resolver by providing their own implementation.
If any site goes down, then all the requests can be redirected to other active sites. When the site which was down goes up again, data is transferred from the already running site to this site and that region's requests are redirected again to this site.
Runtime Transfer Data
Data can be transferred from one site to another forcefully if there is a chance that both caches are not synchronized. For example, if a two node partitioned cluster cache is being used on both sites and at one site, one node of the cluster cache goes down, then data on that node will be lost. In such a situation, data can be forcefully transferred from the other site to this cache through bridge.
This feature can be enabled through Force State Transfer provided in NCache Manager.
Runtime Switching Between Configuration Modes
Switch can be made between active and passive mode of any site at runtime. This means that active-passive configuration can be changed to active-active configuration whenever needed without any downtime. This is useful when the load is increased on a site for some duration of time. In that duration, the user might want to use the passive site as active site for load distribution and better performance.
Connect/Disconnect Bridge Caches
The cache can be easily connected or disconnected from bridge at runtime without affecting client requests in terms of replication of data. When a cache is disconnected from bridge, then bridge does not send any operation to that cache for replication. Other active cache also does not replicate its operation to bridge. When the disconnected cache connects to the bridge again, all data replication is resumed again through bridge in the same manner as done before. Disconnecting a cache does not mean that cache is stopped. Client activity on both caches remains the same and only bridge replication is stopped.
See Also