microservices-patterns

Guide microservices architecture design with decomposition, communication, and resilience patterns.

1|Updated Jun 18, 2025
One-click install
npx skills add https://github.com/knopki/dotfiles --skill microservices-patterns-knopki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: microservices-patterns
Source: https://github.com/knopki/dotfiles/tree/main/home/private_dot_config/opencode/skills/microservices-patterns
Command: npx skills add https://github.com/knopki/dotfiles --skill microservices-patterns-knopki

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps developers design and implement microservices architectures by providing guidance on service decomposition, communication, data management, and resilience patterns, enabling the creation of scalable and maintainable distributed systems.

Core Features & Use Cases

  • Service Decomposition: Strategies like business capability and subdomain-based decomposition.
  • Communication Patterns: Implementing synchronous (REST, gRPC) and asynchronous (event-driven) communication.
  • Data Management: Patterns like Database Per Service and Saga for distributed transactions.
  • Resilience Patterns: Applying Circuit Breaker, Retry, and Bulkhead to build fault-tolerant systems.
  • Use Case: When decomposing a monolithic e-commerce application, use this Skill to define service boundaries for Order, Payment, and Inventory services and establish event-driven communication between them.

Quick Start

Use the microservices-patterns skill to design a service boundary for an e-commerce order service.

Frequently Asked Questions about microservices-patterns

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

FAQPage Schema
How do I design microservices architecture for decomposing a monolithic application?

Microservices architecture design uses service decomposition strategies based on business capabilities or subdomains to break down monoliths. This approach establishes clear service boundaries for distinct distributed components, enabling independent scalability and maintainability across complex software systems.

What is the Saga pattern for distributed transactions in microservices?

The Saga pattern is a data management technique for handling distributed transactions in microservices architectures. It provides a sequence of local transactions where each updates the database and publishes an event or message to trigger the next step, ensuring data consistency without two-phase commits.

How do I implement event-driven communication between microservices?

Implement event-driven communication by using asynchronous messaging patterns, often leveraging event streaming platforms like Kafka. This decouples services by having them publish and subscribe to events rather than using synchronous REST or gRPC calls, which improves system resilience and scalability.

What are the best resilience patterns for building fault-tolerant distributed systems?

The best resilience patterns for distributed systems include Circuit Breaker, Retry, and Bulkhead. Applying these patterns prevents cascading failures, controls resource allocation during peak loads, and builds fault-tolerant systems capable of handling network timeouts and service unavailability.

Does this microservices guidance cover API Gateway and Strangler Fig patterns?

Yes, this microservices guidance covers both API Gateway and Strangler Fig patterns. The Strangler Fig pattern is specifically useful for gradually migrating a monolithic application to a microservices architecture by routing specific requests to new services while legacy components remain active.

When should I not use asynchronous event-driven communication in microservices?

You should avoid asynchronous event-driven communication when immediate consistency or real-time synchronous responses are required. In these scenarios, synchronous communication patterns like REST or gRPC are more appropriate, as event-driven architectures inherently favor eventual consistency and decoupled operations.