Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)41k · #6639

microservices-patterns

Skill này làm gì

Công cụ này giúp lên kế hoạch và xây dựng các hệ thống phần mềm phức tạp được chia thành các phần nhỏ hơn (microservices). Nó hướng dẫn cách các phần này giao tiếp, quản lý dữ liệu và phục hồi sau lỗi.

Khi nào nên dùng

  • ✓Khi chuyển đổi một chương trình lớn thành các phần nhỏ hơn.
  • ✓Khi thiết kế cách các phần khác nhau của hệ thống trao đổi với nhau.
  • ✓Khi bạn muốn hệ thống chịu lỗi tốt hơn.

Liên kết skill

https://github.com/wshobson/agents/blob/main/plugins/backend-development/skills/microservices-patterns/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/wshobson/agents/blob/main/plugins/backend-development/skills/microservices-patterns/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm thế nào để chia một ứng dụng cửa hàng trực tuyến thành các microservices?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ dùng ví dụ và giải thích về các mẫu thiết kế microservice. Nó chỉ cách tổ chức các phần, cách chúng trao đổi thông tin và cách xử lý sự cố.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Microservices Patterns

Master microservices architecture patterns including service boundaries, inter-service communication, data management, and resilience patterns for building distributed systems.

When to Use This Skill

  • Decomposing monoliths into microservices
  • Designing service boundaries and contracts
  • Implementing inter-service communication
  • Managing distributed data and transactions
  • Building resilient distributed systems
  • Implementing service discovery and load balancing
  • Designing event-driven architectures

Core Concepts

1. Service Decomposition Strategies

By Business Capability

  • Organize services around business functions
  • Each service owns its domain
  • Example: OrderService, PaymentService, InventoryService

By Subdomain (DDD)

  • Core domain, supporting subdomains
  • Bounded contexts map to services
  • Clear ownership and responsibility

Strangler Fig Pattern

  • Gradually extract from monolith
  • New functionality as microservices
  • Proxy routes to old/new systems

2. Communication Patterns

Synchronous (Request/Response)

  • REST APIs
  • gRPC
  • GraphQL

Asynchronous (Events/Messages)

  • Event streaming (Kafka)
  • Message queues (RabbitMQ, SQS)
  • Pub/Sub patterns

3. Data Management

Database Per Service

  • Each service owns its data
  • No shared databases
  • Loose coupling

Saga Pattern

  • Distributed transactions
  • Compensating actions
  • Eventual consistency

4. Resilience Patterns

Circuit Breaker

  • Fail fast on repeated errors
  • Prevent cascade failures

Retry with Backoff

  • Transient fault handling
  • Exponential backoff

Bulkhead

  • Isolate resources
  • Limit impact of failures

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Câu hỏi thường gặp

Microservices là gì?

Đây là các phần nhỏ, độc lập của một phần mềm lớn hơn, mỗi phần có một chức năng cụ thể.

“Asynchronous communication” là gì?

Đó là khi các phần của phần mềm gửi tin nhắn cho nhau mà không chờ phản hồi ngay, giống như gửi một email.

Mẫu “Circuit Breaker” là gì?

Đây là kỹ thuật ngăn lỗi ở một phần của hệ thống gây ra chuỗi lỗi lan sang các phần khác.

Chi tiết

Mô tả gốc của tác giả

Design microservices architectures with service boundaries, event-driven communication, and resilience patterns. Use when building distributed systems, decomposing monoliths, or implementing microservices.

repo: wshobson/agents

Độ phổ biến

Sao GitHub
41k
Vị trí xếp hạng
#6639
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự