tranngoclam / go-service-mesh

Service Mesh Experiment with Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-service-mesh

This repository contains a set of practical use cases in distributed system, microservices, service mesh.

Structure

  • Backend:
    • Gateway: an API gateway using Restful.
    • Resource: a service provides products using gRPC/Protobuf.
  • Caching: Redis.
  • Database: MariaDB.
  • Load Balancing: HAProxy / Nginx.
  • Logging: ELK (Elasticsearch, Logstash, Kibana).
  • Service Discovery: Consul.
  • Key/Value Storage: Vault.

Usage

Deploy services

make up

List services

make ps

Sample requests

curl -X GET 'http://localhost/gateway?id=3'
{"data":{},"message":"Not Found"}

curl -X GET 'http://localhost/gateway?id=1'
{"data":{"id":"1","name":"iPhone XS"},"message":"OK"}

curl -X GET 'http://localhost/gateway/health'
{"data":{},"message":"OK"}

Destroy services

make down

TODO

  • Setup basic template.
  • Configure h2 for haproxy from rest to grpc service.
  • Setup Consul server and client.
  • Configure health check in Consul.
  • Configure service discovery using Consul.
  • Experiment Consul Template.
  • Deploy services using Nomad through web ui.
  • Traffic routing and splitting.
  • Failover testing.
  • Architect to multiple zones.

About

Service Mesh Experiment with Go


Languages

Language:Go 48.5%Language:Makefile 29.5%Language:Dockerfile 22.0%