NCache is an extremely fast and scalable In-Memory Distributed Cache for .NET and also supports Java, Node.js, Python, and Scala clients. It lets you remove bottlenecks related to database and data storage and linearly scale your applications.
Kubernetes is a container orchestration system for automating application deployment, scaling and management. It lets you maintain container-based infrastructure in production environment and scale containerized applications. There is a large number of Kubernetes platforms such as Azure Kubernetes Service (AKS), AWS Elastic Kubernetes Service (EKS), and Red Hat OpenShift.
NCache lets you fit your caching solution inside or outside the Kubernetes cluster on any of these Kubernetes platforms.
The following diagram shows the deployment of NCache in a Kubernetes Cluster. This picture is the same on Azure Kubernetes Service, Amazon Elastic Kubernetes Service, Red Hat OpenShift, or any other Kubernetes environment.
You can connect your cloud applications with NCache from within the Kubernetes cluster. All the pods and applications are a part of your Kubernetes cluster and your applications establish the connection with NCache through the following components.
NCache cache discovery service is a headless service which allows the communication between the clients and the pods deployed inside the cache cluster. The purpose of this service is to access the IP addresses of NCache pods to communicate with NCache as the pods’ IPs are dynamically assigned at runtime.
A gateway service is required to manage and monitor NCache within the Kubernetes cluster. All the management/monitoring operations are routed through this gateway to the NCache pods.
NCache provides an operator which deploys all the required Kubernetes resources to run and manage the NCache cluster in the Kubernetes environment. Operator holds the responsibility of ensuring high availability of NCache by creating a maximum of one NCache pod on one node.
The NCache activation process is wholly operator’s responsibility and on machine stopped or removed for any reason, NCache operators automatically deactivates the unavailable machine to make room for the new machine having NCache activated on it. The operator also has the responsibility to start the cache discovery service and handling the scaling up and down of the cluster through the configurations provided.
Applications in Kubernetes are stateless and do not maintain their state so NCache can also be accessed from outside the Kubernetes cluster. NCache can be installed on your virtual machines and your microservices applications can connect with these machines through their IP addresses. On getting the IP addresses of the virtual machines, the client applications can connect with NCache using the CacheConnectionOptions method provided by NCache or through client.ncconf with correct IPs of NCache cluster.
Azure Kubernetes Service is managed container orchestration service based on Kubernetes. Azure Kubernetes Service is used to deploy, scale and manage container-based applications across a cluster.
NCache can be deployed in the Azure Kubernetes cluster within the applications and also from outside the applications. NCache uses a headless cache discovery service which allows the communication between the clients and the pods running inside the cache service.
Amazon Elastic Kubernetes Service (EKS) is a managed service that lets you run Kubernetes on Amazon Web Services for deployment, management and scaling of your containerized applications. Applications running on Amazon EKS are fully compatible with applications running on any standard Kubernetes environment, whether running in on-premises data centers or public cloud platforms.
Red Hat OpenShift is a container platform by Red Hat that provides an auto-scaling cloud application platform. It is built around application containers that are powered by Docker and the orchestration and management services are provided by Kubernetes.
NCache is deployed inside the OpenShift Kubernetes cluster with containerized applications. The applications are connected to Cache Discovery service, a headless service which is responsible for managing the routing and allocation of resources that are a part of NCache.