https://github.com/dntam00/grpc-loadbalancing
gRPC load balancing technique
https://github.com/dntam00/grpc-loadbalancing
grpc grpc-load-balancing
Last synced: 6 months ago
JSON representation
gRPC load balancing technique
- Host: GitHub
- URL: https://github.com/dntam00/grpc-loadbalancing
- Owner: dntam00
- Created: 2024-12-25T14:37:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-18T06:39:07.000Z (10 months ago)
- Last Synced: 2025-07-06T09:57:16.174Z (9 months ago)
- Topics: grpc, grpc-load-balancing
- Language: Go
- Homepage:
- Size: 92.8 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## gRPC load balancing
This repository includes demo source code and testing for series gRPC load balancing in this blog: https://notes-ngtam.pages.dev/posts/grpc-load-balancer
- HAProxy as load balancer.
- Service mesh in K8s with Istio and Envoy.
- Lookaside load balancing with xDS Envoy.
- Lookaside load balancing with Consul.
- Headless service in K8s.
### k3d
I use [k3d](https://k3d.io/stable/) to run k3s in local machine.
Please refer to readme file in folder [`k3d`](./k3d) for details setup.
After running, verify cluster with command `k3d cluster list`
```
NAME SERVERS AGENTS LOADBALANCER
local 1/1 2/2 true
```
If you have multiple cluster, you could switch between them with command `kubectl config use-context k3d-`, and verify by `kubectl config current-context`.
k3d run a container as docker registry, so please make sure the port mapping to host machine is correct.
### go task
I use [go task](https://taskfile.dev/#/) to group multiple commands in one alias.
### proto buf
Run command to generate gRPC code
```bash
protoc --go_out=. --go-grpc_out=. ./model/service.proto
```