agentsclimarketplace

Microservices patterns

Skill tranhieutt/software_development_department/.claude/skills/microservices-patterns

Provides microservices design patterns for service decomposition, API gateway, circuit breakers, saga orchestration, and inter-service communication. Use when designing or implementing microservices architecture.From its SKILL.md

Install
npx -y skills add tranhieutt/software_development_department --skill microservices-patterns

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

2.8 KB, 572 tokens by cl100k_base, as published. Nobody here has run it

Microservices Patterns

Service decomposition, communication, resilience, and orchestration patterns.

Service Decomposition

PatternDescriptionUse When
Domain-DrivenAlign services with bounded contextsComplex business domains
Data-OwnershipService owns its data storeData isolation required
Team-AlignedOne service per teamLarge organizations

Communication Patterns

Sync: HTTP/gRPC

```yaml

API Gateway routing

routes:

  • match: { prefix: /orders } route: { cluster: order-service }
  • match: { prefix: /users } route: { cluster: user-service } ```

Async: Message Queue

``` Producer → Exchange → Queue → Consumer (Topic) (DLQ on failure) ```

Use async for: event propagation, eventual consistency, load leveling.

Resilience Patterns

Circuit Breaker

```typescript // Example with opossum const breaker = new CircuitBreaker(fetchUserProfile, { timeout: 3000, errorThresholdPercentage: 50, resetTimeout: 30000, }); ```

Retry with Backoff

```typescript async function retryWithBackoff(fn, maxRetries = 3) { for (let i = 0; i < maxRetries; i++) { try { return await fn(); } catch (e) { await sleep(Math.pow(2, i) * 1000); } } throw new Error('Max retries exceeded'); } ```

Data Patterns

PatternConsistencyComplexityUse When
Saga (orchestration)EventualHighComplex multi-service transactions
Saga (choreography)EventualMediumSimple event chains
Event sourcingEventualHighAudit trail, time travel
Shared databaseStrongLowAnti-pattern, avoid

API Gateway

Tools: Kong, AWS API Gateway, Envoy, NGINX.

Responsibilities: routing, auth, rate limiting, request transformation, load balancing.

Observability Stack

  • Distributed tracing: Jaeger / Tempo
  • Metrics: Prometheus + Grafana
  • Logs: ELK / Loki
  • Service mesh: Istio / Linkerd (adds mTLS, traffic management)

Related Skills

  • backend-architect — single-service architecture
  • event-sourcing-architect — event sourcing patterns
  • kubernetes-architect — deployment patterns
  • deployment-engineer — CI/CD for microservices

What ships with it: 1 file

17.6 KB alongside SKILL.md

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.