Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 2.08 KB

File metadata and controls

50 lines (39 loc) · 2.08 KB

Envoy as an Inter DC Traffic Manager [Blog Resource]

This repo contains resources that can be used to setup a mock environment for testing Envoy as an inter Data Center traffic manager. It has links to docker images of dummy apps that are used in the setup. It also provides kubernetes resources used for deploying these apps along with envoy to mock 2 differnt DCs, in a k8s cluster.

Design

Mock Environment

External Resources

Dummy REST App
Dummy gRPC App
REST App Docker Image
gRPC App Docker Image

Prerequisites

  1. Local k8s cluster (Docker Desktop or Minikube), where the mock environment will be setup
  2. kubectl to create, edit and retrieve k8s resources
  3. cURL or Postman for hitting the REST endpoint
  4. grpcurl or BloomRPC for hitting the gRPC service

Setup

foo@bar:~$ git clone https://github.com/amalaruja/envoy-inter-dc-traffic-manager-blog.git
foo@bar:~$ cd envoy-inter-dc-traffic-manager-blog
foo@bar:~$ kubectl apply -f ./k8s

Test

DC 1

foo@bar:~$ curl localhost:30081/hello-rest-service/hello
Hello from DC 1!
foo@bar:~$ grpcurl --plaintext --import-path ./proto -proto hello.proto localhost:30081 HelloGrpcService/Hello
{
  "reply": "Hello from DC 1!"
}

DC 2

foo@bar:~$ curl localhost:30082/hello-rest-service/hello
Hello from DC 2!
foo@bar:~$ grpcurl --plaintext --import-path ./proto -proto hello.proto localhost:30082 HelloGrpcService/Hello
{
  "reply": "Hello from DC 2!"
}