service-discovery

Register microservice instances with health checks and TTL pruning.

31|8|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/itallstartedwithaidea/agent-skills --skill service-discovery-itallstartedwithaidea
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: service-discovery
Source: https://github.com/itallstartedwithaidea/agent-skills/tree/main/skills/infrastructure/service-discovery
Command: npx skills add https://github.com/itallstartedwithaidea/agent-skills --skill service-discovery-itallstartedwithaidea

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Service Discovery eliminates brittle, hardcoded service-to-service URLs by keeping a live registry of available instances with health status, so consumers can reliably route requests even as services scale, deploy, or fail.

Core Features & Use Cases

  • Self-registration & deregistration: services announce themselves on startup and remove themselves on shutdown, keeping the registry accurate.
  • Health-check monitoring: periodic liveness checks update instance health (healthy/degraded/unhealthy) and prune stale instances via heartbeat TTL.
  • Client-side discovery & load balancing: consumers query by service name and select an appropriate instance using weighted strategies (e.g., prioritize healthy, deprioritize degraded).

Use cases: zero-downtime deployments (blue/green/canary), multi-region routing with region/capability metadata, and resilient microservice architectures where instances are ephemeral.

Quick Start

Use the service-discovery skill to design a service registry and client discovery flow for microservices, including self-registration, periodic health checking with TTL-based pruning, and a weighted instance selection strategy.

Frequently Asked Questions about service-discovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I eliminate hardcoded URLs for microservice communication?

Service discovery replaces hardcoded URLs by maintaining a live registry of available instances with health status, allowing consumers to dynamically route requests to healthy services as they scale, deploy, or fail.

How does health-aware service registration handle stale instances?

Health-aware service registration uses periodic liveness checks and heartbeat TTL pruning to automatically update instance health states—healthy, degraded, or unhealthy—and remove stale instances from the service registry.

What is the best way to route traffic during zero-downtime deployments?

Zero-downtime deployments use service discovery with self-registration, deregistration, and client-side load balancing to dynamically select healthy instances, ensuring reliable routing during blue/green or canary releases.

Can I apply multi-region routing with instance metadata for microservices?

Multi-region routing applies to service discovery by storing region and capability metadata in the service registry, enabling consumers to select appropriate healthy instances based on weighted strategies across distributed architectures.

How does client-side load balancing select healthy service instances?

Client-side load balancing queries the service registry by service name and applies weighted selection strategies—prioritizing healthy instances and deprioritizing degraded ones—to choose an appropriate instance for routing requests.

When should I use a service registry instead of static configuration?

A service registry is needed when microservice instances are ephemeral, requiring automatic failover, dynamic scaling, and health-aware routing that static configuration cannot reliably provide across resilient architectures.