In microservice architecture, service discovery is an essential component. When using etcd for service registration and discovery, service registration across multiple frameworks, multiple languages, and different network environments becomes repetitive and inefficient development.
The proposal is to introduce OpenResty as a proxy web frontend, using OpenResty’s timer to monitor backend HTTP services (and various network services), then collect information and send unified service registration and heartbeat requests to the etcd server.
Diagram
Project at: https://github.com/xiaocang/lua-resty-etcd-discovery-client