anatollupacescu / kong-grpc-lb

Kong based gRPC load balancing of Go based services backed by MongoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample gRPC project

Description

Go grpc service with mongo persistence running in a docker compose environment with Kong based load balancing.

1.Build the image (linux, amd64):

make build

2.Start the containers (2 by default)

make compose

3.Provision the load balancer

make provision

4.Open your grpc client and point it to 127.0.0.1:9080 (no TLS) and import the product.proto descriptor file

Testing

To load a demo list of products issues the follwing request:

{
  "url": "http://csvhosting:8080/mockdata.csv"
}

To list by name:

{
  "sortBy": "Name",
  "sortDesc": false,
  "page": 3,
  "limit": 10
}

or by update count:

To list by name:

{
  "sortBy": "UpdateCount",
  "sortDesc": true,
  "page": 0,
  "limit": 3
}

About

Kong based gRPC load balancing of Go based services backed by MongoDB


Languages

Language:Go 85.1%Language:Shell 6.2%Language:Dockerfile 5.1%Language:Makefile 3.6%