microservices-patterns

Guide microservices architecture design with patterns for service discovery, circuit breakers, and sagas.

7|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/Jonathan0823/opencode-config --skill microservices-patterns-jonathan0823
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: microservices-patterns
Source: https://github.com/Jonathan0823/opencode-config/tree/main/skills/microservices-patterns
Command: npx skills add https://github.com/Jonathan0823/opencode-config --skill microservices-patterns-jonathan0823

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps software teams design robust, scalable, and maintainable microservice architectures by providing a curated set of patterns and practices.

Core Features & Use Cases

  • API Gateway: centralizes external access with routing, authentication, and rate limiting.
  • Circuit Breaker: isolates failures and improves resilience.
  • Service Discovery: enables dynamic topology changes and automatic registration.
  • Saga Pattern: manages distributed transactions with compensating actions.
  • Event-driven & Messaging: supports asynchronous communication, pub/sub, and CQRS projections.
  • Data Management: enforces per-service databases, data synchronization, and eventual consistency.
  • Outbox Pattern: ensures reliable event publication within transactions.
  • CQRS & Projections: provides separate read models for queries.

Quick Start

Design a new microservices architecture by applying core patterns (API Gateway, Circuit Breaker, Service Discovery, Saga) to define inter-service interactions.

Frequently Asked Questions about microservices-patterns

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

FAQPage Schema
What is the saga pattern and how does it manage distributed transactions in microservices?

The saga pattern manages distributed transactions across microservices by coordinating a sequence of local transactions with specific compensating actions. This approach ensures data consistency without relying on a monolithic two-phase commit protocol.

How do I design a resilient microservices architecture that handles service failures gracefully?

To design resilient microservices, apply the circuit breaker pattern to isolate failures and prevent cascading service outages. Combine this with service discovery for dynamic routing to maintain availability during partial topology failures.

When should I use the outbox pattern for event-driven microservices communication?

Use the outbox pattern when you need reliable event publication alongside database updates in event-driven microservices. It ensures messages are dispatched asynchronously without violating transactional integrity or losing data during crashes.

Does CQRS with separate read models work well for microservices data management?

CQRS provides separate read and write models to optimize query performance in microservices data management. By using event-driven projections, it creates eventually consistent read stores tailored to specific application query requirements.

How do I centralize external access and routing in a microservices topology?

Implement an API gateway to centralize external access in a microservices topology. It handles routing, authentication, and rate limiting to shield internal services from direct client exposure and manage traffic efficiently.

What are the limitations of event-driven communication in distributed systems?

Event-driven communication in distributed systems introduces eventual consistency, making real-time queries difficult. It requires complex orchestration for sagas and careful handling of out-of-order events or messaging failures during asynchronous processing.