microservices-patterns

Design microservices architectures with service decomposition, event-driven communication, and resilience patterns.

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/SanketAdlak/PDMProjectDesign --skill microservices-patterns-sanketadlak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: microservices-patterns
Source: https://github.com/SanketAdlak/PDMProjectDesign/tree/main/.agents/skills/microservices-patterns
Command: npx skills add https://github.com/SanketAdlak/PDMProjectDesign --skill microservices-patterns-sanketadlak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Designing distributed systems involves hard decisions about service boundaries, inter-service communication, distributed transactions, and failure handling. This Skill provides concrete patterns and Python implementations for decomposing monoliths, coordinating services, and preventing cascade failures. ## Core Features & Use Cases - Service Decomposition: Split monoliths by business capability or DDD subdomains, and migrate gradually using the Strangler Fig pattern. - Communication Patterns: Implement synchronous REST/gRPC calls with retries, asynchronous event-driven messaging with Kafka, and API Gateway aggregation. - Distributed Transactions & Resilience: Orchestrate Sagas with compensating actions, and apply circuit breakers, retries with backoff, and bulkheads. - Use Case: When extracting an order module from a monolith, use this Skill to define the Order, Payment, and Inventory services, wire them through Kafka events, and wrap cross-service calls in a Saga with a circuit breaker. ## Quick Start Ask the AI to design a microservices decomposition for your application with event-driven communication and circuit breaker protection.

Frequently Asked Questions about microservices-patterns

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

FAQPage Schema
How do I decompose a monolith into microservices?

Decompose by business capability or DDD subdomains so each service owns its domain and data. Use the Strangler Fig pattern to gradually extract functionality, routing traffic through a proxy to old and new systems during migration.

How do I implement the Saga pattern for distributed transactions?

Implement a Saga as an ordered list of steps, each with an action and a compensating action. Execute steps sequentially, and on failure run compensations in reverse order to restore consistency, achieving eventual consistency without distributed locks.

Should microservices communicate synchronously or asynchronously?

Use synchronous REST or gRPC for request/response queries needing immediate results, and asynchronous events via Kafka or message queues for decoupled workflows. Event-driven communication reduces temporal coupling but adds eventual consistency complexity.

How does a circuit breaker prevent cascade failures?

A circuit breaker tracks failures and opens after a threshold, rejecting calls immediately instead of waiting for timeouts. After a recovery timeout it enters half-open state to test the service, closing again after consecutive successes.

Why should each microservice have its own database?

Database per service enforces loose coupling by preventing services from bypassing APIs to access shared tables. It allows independent scaling and schema evolution, but requires patterns like Sagas to maintain consistency across services.