Adding Cache Servers in Openshift at Runtime
NCache has a scalable architecture and can very easily enhance your application's capacity and functionality by letting you add servers to your cache at runtime. In OpenShift you can scale your application by adding pods to your cluster.
This can be also done using both web portal and command line tool.
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 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
replicas
under thespec
tag, mention the number of replicas according to the requirement.Run the following command after modifying the YAML file.
oc apply -f ncache.yaml
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 NCache Management Center or Monitor.
See Also
Create New Project in Openshift
Create Cache Discovery Service in Openshift
Add Server Node
Remove Cache Servers in Openshift