How to Take Down a Cache Server for Maintenance
Assumption: You have multiple caches running in your environment on multiple cache servers. These steps should be followed on each cache server in your environment that you want to take down for maintenance.
Stopping All Caches:
1. Stop one of the caches on your cache server
- Using NCache Manager: Right-click on IP-address of the node in NCache Manager shown under “Server Nodes” for a cache and then choose Stop
- Using Command line tool: Run stopcache command line tool on the cache server (locally) as follows
C:\Program Files\NCache\bin\tools>stopcache CacheName
2. Wait for state transfer process to complete:
State transfer process starts as soon as a cache node leaves or joins a cache cluster. You should wait at least 30 seconds or so for its completion and then move on to next cache.
3. Remove this node from cache
- Using NCache Manager: Right click on IP address of the node in NCache Manager under your cache name and choose Remove
- Using Command line tool: Run removeNode command line tool on the cache server (locally) as follows
C:\Program Files\NCache\bin\tools>removenode.exe CacheName
4. Follow Steps 1 to 3 above for stopping all caches on this cache server one by one
5. This server will be ready for maintenance once all caches are stopped.
Performing Maintenance on downed cache server:
1. Stop NCache services on the downed cache server
- (NCache installs two windows services NCache and NCache Bridge service on a cache server box. It is required that both NCache services are stopped on this node.)
2. Perform maintenance on this cache server as needed
3. Reboot this cache server after maintenance
4. Start both NCache and NCache Bridge services on this node
Starting back all Caches:
1. Add this node back to one of your caches
- Using NCache Manager: Right click on Server Nodes (under your cache name in NCache Manager) and then choose Add Node. This will open another window where you can provide IP address/Machine name of this node to add it back to your cache cluster.
- Using Command line tool: Run addNode command line tool (locally) on the cache server.
In example below, local server IP address is 18.104.22.168 specified with /n switch (new server) and it is being added to a cache which already exists on another server 22.214.171.124 specified with /e (existing server) switch
C:\Program Files\NCache\bin\tools>addnode.exe cacheName /e 126.96.36.199 /n 188.8.131.52
2. Start the cache on your cache server
- Using NCache Manager: Right click on IP address of the Server node in NCache Manager under your cache name and choose Start. This will start the cache on this node and would join it back to cache cluster.
- Using Command line tool: Run startCache command line tool on the cache server (locally) as follows
C:\Program Files\NCache\bin\tools>startcache.exe CacheName
3. Wait for 30 seconds for state transfer to complete
- You should wait at least 30 seconds for completion of state transfer process and thenmove on to next cache.
4. Verify cache cluster connectivity
- Right click on your cache name in NCache Manager and then choose View cluster connectivity option. Make sure that cluster shows Fully Connected status.
5. Follow Steps 3 to 4 above for starting all caches one by one on your cache server
What to Do Next?