Adding Cache Servers in OpenShift at Runtime
NCache features a scalable architecture that allows you to enhance application capacity by adding cache server pods at runtime. In Red Hat OpenShift, you can dynamically scale your cluster using the OpenShift Web Console, Command line tool, or YAML configurations. This two-step process involves increasing the pod replica count and then registering the new nodes into the cache cluster to achieve linear scalability. Following are the details:
Using OpenShift Portal
Go to the Deployments section under the Workloads tab.
From the deployments' page, which displays all the NCache deployments, click on the three dots button against the server-side deployment (which in this case is ncache).

- Click on the Edit Count button. It lets you increase the number of replica pods in your cache cluster. Click on the + button to increase the replica count.

Using Command Line Tool
In order to increase the pods' replica count through the OpenShift command line tool, run the following command:
Here the name of the server-side deployment is ncache, as created previously.
oc scale deployments/ncache --replicas number_of_increased_server_nodes
Manually Editing Configuration File
You can also edit the ncache.yaml file containing the server-side deployments.
In the YAML file, against the
replicasunder thespectag, mention the number of replicas according to the requirement.Run the following command after modifying the YAML file.
oc apply -f ncache.yaml
Important
Increasing the replica count in OpenShift only scales the underlying infrastructure; new pods do not join the cache cluster automatically and must be added via the NCache Management Center.
Add Server Nodes to Cache
However, by increasing the pod count, a pod is created but does not become a part of the cache automatically. In order to increase cache servers at runtime:
Access the NCache Management Center from the Location tab in the Routes section.
Follow the steps mentioned in Add Server Nodes in order to add server nodes at runtime.
On successful addition of cache servers, verify through the NCache Management Center or the NCache Monitor.
See Also
Create New Project in OpenShift
Create Cache Discovery Service in OpenShift
Add Server Node
Remove Cache Servers in OpenShift