yonatankarp/software-design-skills

arch-microservices

Use when designing or reviewing a microservices architecture — phrases like "microservices", "should we split this service", "service boundaries", "bounded context per service", "API gateway", "backend for frontend", "BFF", "service mesh", "microservices vs…

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/yonatankarp/software-design-skills --skill arch-microservices

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

One-line summary

Decompose the system into independently deployable services, each owning its data and aligned with a business capability. Communicate over the network. Pay the operational tax in exchange for autonomy and independent scaling.

When to use this skill

  • Multiple teams stepping on each other in a single codebase / deployment.
  • Different parts of the system need independent scaling characteristics (one is CPU-bound, another I/O-bound, a third bursty).
  • Different parts have different release cadences and one team's deploy must not block another's.
  • Different parts have different reliability profiles (a critical payment path; a non-critical analytics dashboard).

When NOT to use this skill

  • One team, one product, no scaling pressure — you don't have the problems microservices solve. Keep the monolith.
  • Domain not understood well enough to draw service boundaries — premature splits are very expensive to reverse.
  • No operational maturity (no CI/CD, no observability, no on-call) — microservices amplify operational pain.
  • Resume-driven development. Stop.

Core content

Service boundaries follow business capabilities, not technical layers. A customer-service, orders-service, pricing-service is correct. A database-service, api-service, cache-service is anti-pattern. Boundaries are typically aligned with DDD bounded contexts (see ddd-bounded-context).

Each service owns its data. No shared database. If service B needs data from service A, B either calls A's API or A publishes events that B subscribes to. Sharing a database underneath two "microservices" makes them a distributed monolith — the worst of both worlds.

Communication patterns.

  • Synchronous (REST, gRPC). Direct, easy to reason about, latency-coupled. Use for query-heavy patterns where the caller needs an immediate answer.
  • Asynchronous (events, see `arch-event-driven`). Decoupled in time, eventually consistent. Use for workflows that span services.

Most production systems mix both.

Edge patterns.

  • API gateway — single entry point for external clients; handles auth, rate-limiting, routing, response composition. Decouples clients from internal service topology.
  • Backend for Frontend (BFF) — a gateway tailored per client type (mobile, web, partner API). Avoids the "one gateway must satisfy every client" trap.
  • Service mesh (Istio, Linkerd) — sidecar proxies handling traffic, mTLS, retries, observability. Moves cross-cutting infrastructure out of services. Justified at scale; overkill below ~10 services.

Anti-pattern alert: distributed monolith. Services deployed independently but coupled tightly (shared database, synchronous chains, lock-step releases). Carries all the operational cost of microservices with none of the autonomy benefit. Hardest to escape.

Decision heuristics

  • Default to monolith. Microservices solve specific problems (team autonomy, independent scaling, fault isolation). If you don't have those problems, you don't need this style.
  • Service boundaries align with bounded contexts. Use ddd-bounded-context first; let the contexts inform the splits, not the other way around.
  • A service that owns no data of its own is a smell — usually it's an adapter or a coordinator that should live elsewhere.
  • Synchronous chains of more than 2-3 services for a single user request indicate broken decomposition. Reach for events or rethink the boundary.
  • BFF when client types diverge significantly; gateway with content negotiation when they don't.

Anti-patterns

  • Distributed monolith. Services that must release together. Worst of both worlds.
  • Nanoservices. Services so small they ship per-class. Coordination cost exceeds any decomposition benefit.
  • Shared database. Two services reading and writing the same tables — they're not separate.
  • Synchronous chains. Service A calls B calls C calls D for one user request. Each adds latency and failure surface; the chain fails when any link does.
  • Choosing microservices because Netflix does — Netflix solved Netflix's problems; your problems are different.

See also

  • ddd-bounded-context — service boundaries should follow bounded contexts.
  • arch-event-driven — the standard async communication style.
  • arch-saga — coordinating distributed transactions.
  • arch-circuit-breaker — failure isolation between services.
  • arch-strangler-fig — migrating from monolith to microservices.

References

  • Richards & Ford, Fundamentals of Software Architecture, Ch. 17 (Microservices).
  • Sam Newman, Building Microservices (O'Reilly).
  • Sam Newman, Monolith to Microservices (O'Reilly).
  • Khononov, Learning DDD, Ch. 14 (Microservices).

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
yonatankarp
커뮤니티

arch-adr

Use when recording an architectural decision so future maintainers know why — phrases like "ADR", "architecture decision record", "why did we pick X", "lightweight architecture documentation", "decision log", "should this be an ADR", "tribal knowledge", "we chose this two years ago and now nobody remembers why". Defines the ADR as a short, structured document capturing what was decided, why, alternatives considered, and consequences — written at the time of the decision and kept in the repo.

설치 수
2
GitHub Stars
1
업데이트
5월 19일
yonatankarp
커뮤니티

arch-fitness-functions

Use when enforcing architectural characteristics through automation — phrases like "architecture fitness function", "evolutionary architecture", "architecture tests", "ArchUnit", "dependency rules in CI", "automated architecture checks", "guardrails", "drift detection". Defines fitness functions as automated checks that verify architectural characteristics on every change, catching drift before it accumulates.

설치 수
2
GitHub Stars
1
업데이트
5월 19일
yonatankarp
커뮤니티

arch-strangler-fig

Use when migrating a legacy system incrementally — phrases like "strangler fig", "strangler pattern", "incremental migration", "monolith to microservices", "rewrite without big bang", "replace legacy in place", "facade in front of the legacy system", "anticorruption layer". Defines Fowler's Strangler Fig as the migration discipline of gradually replacing legacy functionality behind a stable facade, never doing a big-bang rewrite.

설치 수
2
GitHub Stars
1
업데이트
5월 19일
yonatankarp
커뮤니티

ddd-aggregate

Use when designing or critiquing aggregate boundaries — phrases like "aggregate", "aggregate root", "should these be one entity or two", "consistency boundary", "transactional consistency", "this aggregate is huge", "should I reference by ID or by object". Defines aggregates as transactional consistency boundaries and the rules for entity references within and across them.

설치 수
2
GitHub Stars
1
업데이트
5월 19일