Skip to content

minhthong582000/SOA-101-service-mesh

Repository files navigation

SOA-101-service-mesh

Consul Reference Architecture

architecture

Connect-Native App Integration

Service mesh using Consul Connect-Native

Service Mesh - Connect-Native App Integration

Service Mesh - Connect Configuration

Service Mesh - Connect-Native App Integration With Go

DNS Interface

Consul service discovery DNS

DNS Interface

Demo

Create counting services, increments counter each time the API is called.

Run:

make run

Test API:

# Send get request to counting client
$ curl localhost:8081/
{"count":2,"hostname":"4b2a8b9fd305"}

# Query server address
$ curl localhost:8081/query
192.168.208.7:8080

deploy

Intentions

Service Mesh - Intentions

Test intentions Client --x--> Server:

intentions

Test API:

# Send get request to counting client
$ curl localhost:8081/
Connect to server failed: Get "https://server.service.dc1.consul/count": 
remote error: tls: bad certificate

Key/Value Store

Centralized configuration.

Example 1

Go to Consul UI:

kv

Test API:

# Send get request to counting client
$ curl localhost:8081/kv?token=wassup/bro
wassup/bro: {
  "sup": "bruh"
}

$ curl localhost:8081/kv?token=not/exist
Value not found for key: not/exist

Example 2

Go to Consul UI:

kv2

Test API

# Send get request to counting client
$ curl localhost:8081/
{"count":5,"hostname":"4b2a8b9fd305","language":"ENG"}

TODO

  • gRPC
  • Broker/Message Queue
  • Service mesh using Envoy
  • Service mesh in kubernetes
  • API Gateway
  • Monitoring

About

Service mesh example application using Hashicorp Consul

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published