A simple load balancer implementation in Golang with support of config files and list of microservices.
microservices:
- service:
properties:
name: user
servers: [
"http://127.0.0.1:4000",
"http://127.0.0.1:4001",
"http://127.0.0.1:4002",
"http://127.0.0.1:4003",
]
version: 1.0
apiPrefix: users-api
healthRoute: "/"
- service:
properties:
name: auth
servers: [
"http://127.0.0.1:6000",
"http://127.0.0.1:6001",
]
version: 1.0
apiPrefix: auth-api
healthRoute: "/"
- Clone the repo
- Run
go run ./cmd
This was inspired from the video by Arjun Mahishi on creating a LB in Golang