ServMesh provides lightweight service discovery, client-side load balancing, automatic retries, and circuit breaking for the Serv ecosystem.
- Dynamic Service Registry: Control plane for registering active service instances.
- Client-Side Load Balancing: Round-robin distribution of requests to healthy backends.
- Circuit Breaking: Transitions states (
Closed,Open,Half-Open) to avoid cascading failures. - Automatic Retries: Backoff policies on transient timeouts.
- OTel Trace Propagation: Automatically forwards parent trace headers (
traceparent) to downstreams.
To launch the central service registry on port 8089:
go run main.go --port 8089 --ttl 10sPOST /api/register- Registers a new instancePOST /api/heartbeat- Refreshes instance TTLGET /api/resolve/{service_name}- Resolves a service to healthy endpoints
POST /api/lock/acquire- Acquires a TTL lock for an ownerPOST /api/lock/release- Releases a held lockPOST /api/lock/extend- Extends the TTL of a held lockGET /api/lock/status?key=...- Returns the status of a lockGET /api/lock/list- Returns all active locks