Skip to main content

microservices

Service boundaries, communication patterns, event sourcing, CQRS, and distributed tracing

소스 정보

저장소
cosmicstack-labs/mercury-agent-skills
최근 소스 활동
2026년 5월 10일 06:29
감지된 SKILL.md 언어
영어
스타
476
포크
63

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
microservices
description
Service boundaries, communication patterns, event sourcing, CQRS, and distributed tracing
metadata
{"author":"cosmicstack-labs","version":"1.0.0","category":"backend","tags":["microservices","architecture","distributed-systems","event-sourcing","cqrs"]}
# Microservices Design and operate microservice architectures. ## Service Boundaries ### Bounded Context (DDD) - Each service owns a domain concept - Service has its own database (no DB sharing) - Communication via API or events - Avoid "shared" services (leads to tight coupling) ### Service Sizing - **Too small**: Nano-services — high overhead, hard to debug - **Too large**: Distributed monolith — worst of both worlds - **Right size**: Team can build, test, deploy independently ## Communication Patterns | Pattern | Type | When | |---------|------|------| | REST | Sync | Request-response, CRUD | | gRPC | Sync (fast) | Internal, high throughput | | Event | Async | Decoupled workflows | | Message Queue | Async | Buffered, reliable delivery | ### Event-Driven Communication ``` Service A → Event Bus → Service B → Service C → Service D ``` Benefits: eventual consistency, loose coupling, replayability. ## CQRS (Command Query Responsibility Segregation) - Separate read and write models - Queries go to optimized read stores (materialized views) - Commands go to write stores (normalized) - Eventually consistent between them ## Distributed Tracing - Correlation ID passed across all services - Use OpenTelemetry for instrumentation - Trace each request: Service → Queue → DB → External API - Visualize in Jaeger or Zipkin - Alert on traces that exceed latency SLOs ## Anti-Patterns to Avoid ❌ Shared database between services ❌ Sync chains (A → B → C → D blocking) ❌ Distributed monolith (microservices but deployed together) ❌ Absent monitoring ("it works in dev") ❌ Premature decomposition (start monolith, extract carefully)
GitHub에서 보기