microservices-patterns

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

Updated Jan 9, 2025
One-click install
npx skills add https://github.com/baotoq/go-shortener --skill microservices-patterns-baotoq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: microservices-patterns
Source: https://github.com/baotoq/go-shortener/tree/main/.agents/skills/microservices-patterns
Command: npx skills add https://github.com/baotoq/go-shortener --skill microservices-patterns-baotoq

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides comprehensive guidance and patterns for designing, building, and managing microservices architectures, addressing challenges in service decomposition, communication, data management, and resilience.

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 for database-per-service and distributed transactions (Saga).
  • Resilience Patterns: Applying circuit breakers, retries, and bulkheads to build fault-tolerant systems.
  • Use Case: Architecting a new e-commerce platform by breaking down a monolith into independent, scalable microservices.

Quick Start

Use the microservices-patterns skill to design a service boundary for an order management system.

Frequently Asked Questions about microservices-patterns

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

FAQPage Schema
How do I break down a monolith into microservices?

To break down a monolith, you apply business capability and subdomain-based service decomposition strategies to define independent service boundaries. This skill guides you through planning the transition, establishing communication patterns, and managing data per service.

What is the Saga pattern for distributed transactions?

The Saga pattern is a sequence of local transactions where each updates the database and publishes an event to trigger the next step. This skill details how to implement Sagas for managing distributed transactions across microservices without relying on two-phase commits.

How do I implement a circuit breaker for microservices fault tolerance?

A circuit breaker stops calls to a failing service to prevent cascading failures and allow it to recover. This skill provides implementation guidance for applying circuit breakers, retries, and bulkheads to build resilient, fault-tolerant microservices architectures.

When should I use event-driven architecture for microservices communication?

Event-driven architecture is ideal for asynchronous communication when you need to decouple services and improve scalability. This skill helps you determine when to use event-driven models versus synchronous REST or gRPC for inter-service communication.

Does this microservices architecture guidance apply to e-commerce platform design?

Yes, this skill directly supports designing e-commerce platforms by breaking down monolithic applications into independent, scalable microservices. It provides use cases like architecting an order management system using service decomposition and resilience patterns.

What is database-per-service and when is it needed?

Database-per-service is a data management pattern where each microservice owns its private database to ensure loose coupling. This skill covers when to implement this pattern alongside distributed transaction strategies like Sagas for data consistency.