mesh-service-mesh

mesh-service-mesh — Service routing, load balancing, and discovery for Mesh Protocol

Federation & Networking

Usage

mesh route  [args]

Commands

register, deregister, resolve, route, lb-policy, endpoints, health, stats

Commons Entry


# mesh-service-mesh

Service routing, load balancing, and discovery for Mesh Protocol.

## Commands
- `register <service> <host> [port] [weight]` — Register endpoint
- `deregister <service> <endpoint-id>` — Remove endpoint
- `resolve <service> [caller]` — Get best endpoint (applies LB + health + circuit breaker + rate limiter)
- `route <service> [caller] [payload]` — Route a request
- `lb-policy <service> <policy>` — Set load balancing policy
- `endpoints [service]` — List endpoints or all services
- `health <service> <endpoint-id> <healthy|unhealthy>` — Mark endpoint status
- `stats` — Show routing statistics

## LB Policies
- round-robin (default), least-connections, random, weighted

## Integrations
- Circuit breaker: skips services with open circuits
- Rate limiter: checks caller limits before routing
- Ledger: all events logged via ledger-write.sh

## Usage
```bash
mesh route register compute agent-alpha 8080 3
mesh route resolve compute my-agent
mesh route lb-policy compute weighted
```

## Layer
L2 (Capability + Service Discovery)

## CLI
`mesh route|sm`