NCache 4.4 - Online Documentation

NCache Memcached Gateway Approach

 
NCache provides Memcached gateway server to use NCache without any application code changes or recompilation.
 
NCache Memcached gateway is implemented based on Memcached socket protocol and acts as Memcached server for Memcached applications. It understands all Memcached clients request and send responses accordingly.
 
However, it only serves as a proxy and in fact connects to the NCache cluster. Gateway intercepts Memcached commands and then in turn executes NCache APIs equivalent to these commands on NCache distributed cache. This gives the user NCache support for any type of Memcached client regardless of which programming language it is developed in.
 
There are two deployments of NCache Memcached gateway.
 
Memcached Client Side Gateway
 
NCache gateway server is installed on the application servers. Applications talk to local gateway severs and then gateway servers act as NCache client and execute the requested commands on NCache.
 
The following diagram illustrates this deployment.
 
 
 
 
Gateway server is an intelligent NCache client that keeps record of all NCache servers in the cluster. Thus if any of the node in NCache cluster gets down, gateway starts communicating with other available NCache servers. This avoids a single point of failure for application. While using gateway, it is recommended to use NCache remote client configuration for using NCache in memcached applications.
 
Memcached Server Side Gateway
 
NCache gateway server is installed on the NCache servers. Applications talk to gateway severs running on cache servers and then gateway server talks to cache and sends response back to client.
 
The following diagram illustrates this deployment.
 
 
In the above diagram, it can be seen that the Memcached gateway server (also called Memcached Client Wrapper) runs on NCache cache servers. The Memcached client application talks to this gateway as if it is a Memcached server. And, this in turn talks to the NCache cluster using NCache API calls.
 
In this configuration when gateway server is running on one of the server nodes in the cluster, memcahed application communicates with only that server node. This produces a single point of failure risk for memcached client application. However in this configuration memcahed socket protocol messages that are more compact and less in size than NCache protocol messages will be communicated over network Memcached Client Plug-In for .NET.
 
 
See Also