Setting Up Ncache (Distributed?/Shared)

395 views Asked by At

I have two servers, where I will be deploying the same application. Basically these two servers will handle work from a common Web API, the work that handed out will be transformed and go through some logic and loaded into DB. I want to cache the data the get loaded/update or deleted in the database, so that when the same data is referenced i can get it from the Cache (Kind of explained the cache mechanism). Now I am using Ncache and it working perfectly fine within one application. I am trying have kind of a shared cache, so that both my application can have access to. How do i go about doing it?

2

There are 2 answers

0
dove On

NCache is a distributed cache so you can continue to use that.

There is good general documentation available and very good getting started material that walks you through all the steps required.

In essence you install NCache on both the servers and then reference both servers in your client configuration (%NCHOME%\config\client.ncconf)

0
Shoeb Lodhi On

In cluster caches, a single logical cache instance is distributed over multiple server nodes and because the cache process is running outside the application address space, multiple applications can share and see the same exact cache data change in terms of addition, removal and update of the cache content.

Local out-proc caches are limited to one server node but as they are outside the application address space, they also support sharing of data between applications.

In fact, besides allowing multiple applications to share data, NCache supports a pub/sub infrastructure to allow for multiple applications to actually communicate with each other. This allows NCache to play a key part in setting up a fast and reliable microservices environment wherein all the participating services send messages to each other through the NCache platform.

See the link below where they have shared information about NCache topologies http://www.alachisoft.com/resources/docs/ncache/admin-guide/cache-topologies.html

http://www.alachisoft.com/resources/videos/five-steps-getting-started.html