Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 949 Bytes

readme.md

File metadata and controls

27 lines (18 loc) · 949 Bytes

Summary

This is an example of two python microservices communicating with each other via gRPC using Consul as service registry.

Features

  • Service registration
  • gRPC health checking
  • HTTP or DNS service names resolution

Prerequisites

Setup

  1. Compile protobuf services definitions: python -m grpc_tools.protoc --proto_path=. --python_out=. --grpc_python_out=. todolist.proto
  2. Run Consul binary: consul agent -dev -enable-script-checks -config-dir=./consul.d
  3. Run calculator service: python todolist_service.py
  4. Run calculator client: python web_server.py [--resolver {dns,http,grpc-dns}]

Usage

  • Access http://localhost:50052 from your browser and have fun!
  • Monitor services from Consul UI running athttp://localhost:8500