kubeRPC is a Kubernetes-native remote procedure call (RPC) framework designed to enable seamless and low-latency communication between microservices deployed within the same Kubernetes cluster or namespace.
One of the challenges when transitioning from a monolithic architecture to microservices is latency. In a monolith, methods (e.g., generateInvoice
) can be called directly with negligible overhead. In contrast, microservices require exposing APIs (HTTP, GraphQL, SOAP, etc.) that add significant latency and complexity to method calls.
kubeRPC solves this problem by enabling microservices to directly invoke each other's methods without relying on traditional API endpoints. This dramatically reduces latency, simplifies communication, and preserves the speed of direct method calls.
- kubeRPC deploys a core service within your Kubernetes cluster (written in Go) that acts as the central orchestrator.
- kubeRPC watches for all services in the namespace and automatically registers their DNS names and other relevant metadata.
- Microservices can register callable methods with the kubeRPC core service.
- Other microservices can invoke these methods using the kubeRPC SDK, eliminating the need for HTTP or similar overhead.
- A Kubernetes cluster (any version compatible with Helm).
- Helm installed on your local machine.
kubeRPC can be deployed using a Helm chart.
helm install kuberpc-core https://github.com/darksuei/kubeRPC/raw/main/helm_chart/kuberpc-core-0.1.0.tgz --namespace <your-namespace> -f /path/to/custom-values.yaml
Once installed, kubeRPC will:
- Monitor all services in the namespace.
- Register their DNS names and metadata for service-to-service communication.
To register methods, services must interact with the kubeRPC core using the kubeRPC SDK.
Once methods are registered, other services can directly invoke these methods using the SDK.
Currently, a TypeScript SDK is available:
- TypeScript SDK: Source code | NPM
We welcome contributions for SDKs in other programming languages!
We encourage developers to contribute by:
- Building SDKs for other languages.
- Reporting bugs or requesting features via GitHub issues.
- Submitting pull requests to improve the core or SDKs.
Check out the Contribution Guide for more details.