https://github.com/tranngoclam/go-service-mesh
Service Mesh Experiment with Go
https://github.com/tranngoclam/go-service-mesh
cache consul consul-template go golang grpc haproxy http http2 load-balancer mariadb microservice nomad redis rest service-mesh
Last synced: 3 months ago
JSON representation
Service Mesh Experiment with Go
- Host: GitHub
- URL: https://github.com/tranngoclam/go-service-mesh
- Owner: tranngoclam
- Created: 2020-03-24T02:05:28.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-11T15:16:02.000Z (about 5 years ago)
- Last Synced: 2023-03-03T05:14:10.083Z (over 2 years ago)
- Topics: cache, consul, consul-template, go, golang, grpc, haproxy, http, http2, load-balancer, mariadb, microservice, nomad, redis, rest, service-mesh
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```bash
make up
```### List services
```bash
make ps
```### Sample requests
```bash
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
```bash
make down
```## TODO
- [x] Setup basic template.
- [x] Configure h2 for haproxy from rest to grpc service.
- [x] Setup Consul server and client.
- [x] 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.