Skip to content

A simple gRPC network, with envoy in the middle

Notifications You must be signed in to change notification settings

dio/simple-grpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple

An example of gRPC services setup with envoy in the middle.

features

  1. front proxy with tls.
  2. plain proxy.
  3. internal service-to-service proxy.
  4. proxy with native gRPC health-check againts upstream clusters.

setup

client <-> {plain, secure}.front (envoy) <-> greeter <-> internal (envoy) o<-> address.internal
                                                                          |
                                                                          `<-> bio.internal

setup and running

Having docker installed and running in your machine,

$ git clone git@github.com:dio/simple-grpc.git
$ cd simple-grpc
$ make

in another tab,

$ pwd
/path/to/simple-grpc
$ make call rpc=hello
name:  bar
address:  bar
$ make call rpc=hellos
secure
name:  bar
address:  bar

Note: hellos is a secure call of hello.

project structure

.
|-- api
|   |-- Dockerfile
|   |-- core
|   |   `-- basic.proto
|   |-- greeter
|   |   `-- hello.proto
|   `-- people
|       |-- address.proto
|       `-- bio.proto
|-- cert
|   |-- Dockerfile
|   `-- gen.sh
|-- client
|   |-- Dockerfile
|   |-- hello
|   |   `-- hello.go
|   |-- hellos
|   |   `-- hellos.go
|   `-- keep
|-- envoy
|   |-- front
|   |   |-- plain
|   |   |   |-- Dockerfile
|   |   |   `-- config.yaml
|   |   `-- secure
|   |       |-- Dockerfile
|   |       `-- config.yaml
|   `-- internal
|       |-- Dockerfile
|       `-- config.yaml
`-- services
    |-- address
    |   |-- Dockerfile
    |   `-- main.go
    |-- bio
    |   |-- Dockerfile
    |   `-- main.go
    `-- hello
        |-- Dockerfile
        |-- main.go
        `-- service
            `-- endpoint.go

About

A simple gRPC network, with envoy in the middle

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published