微服务概论(https://microservices.io/)

What are microservices?

Microservices - also known as the microservice architecture - is an architectural style that structures an application as a collection of two or more services that are:

Independently deployable

Loosely coupled

Services are typically organized around business capabilities. Each service is often owned by a single, small team.

微服务只是一种架构风格,它把单体服务拆分成子服务,子服务的特点:

  • 独立开发和部署
  • 松耦合
  • 按照业务能力拆分(DDD)
  • 自治的团队

微服务架构是典型的分治思想。通过对服务的拆分来管理复杂度。避免单体服务的膨胀。

Microservices enable fast flow

微服务通过自治的团队和自动化devops(CI/CD)来实现快速的更新和部署。要实现微服务必须要有对应的组织架构调整(自治的小团队)和基础设施条件。

Design microservices using Assemblage

The key challenge when using microservices is designing a good service architecture.

If you get it wrong you risk creating a distributed monolith, which will slow down software delivery.

Assemblage is an architecture definition process for grouping subdomains/bounded contexts into services.

需要有一套方法来拆分微服务,不然做不到高内聚低耦合,尤其是服务之间以来太强,变成了一个分布式的单体服务

Dark energy and dark matter shape the architecture

Assemblage uses the dark energy and dark matter forces to shape the service architecture.

Dark energy forces encourage decomposition into smaller services. Dark matter forces resist decomposition.

The balance between these forces shapes the service architecture.

基本就是高内聚低耦合的思想。同一领域的业务逻辑应该在一个服务内。subdomain之间的依赖关系最好是单向的。

The pattern language is your guide

The microservices pattern language is your guide when designing an architecture: service collaboration, testing, deployment, common crosscutting concerns and more. It's a collection of patterns that help you make decisions when designing and evolving an architecture.

微服务专业术语使沟通更为便捷

Incrementally refactor a monolith to microservices

The monolithic architecture is not an anti-pattern. It's a good choice for small teams and small projects.

But if you outgrow your monolithic architecture, you need to refactor it to services using the Strangler Fig pattern.

由单体服务过渡到微服务,最重要的是平滑过度。

  • 剥离核心功能
  • 微服务实现核心功能
  • data & api 迁移至微服务
相关推荐
-dcr5 分钟前
52.kubernetes基础
运维·云原生·kubernetes
We....10 分钟前
SpringBoot 微服务拦截器与负载均衡实践
java·spring boot·微服务·负载均衡
小程同学>o<15 分钟前
嵌入式之ARM体系与架构面试题(三)ARM中断与异常
arm开发·架构·异常·嵌入式软件·中断
Leon-zy18 分钟前
Redis7.4.5集群部署3主3从
redis·分布式·缓存·云原生
沛沛老爹20 分钟前
从Web到AI:Agent Skills CI/CD流水线集成实战指南
java·前端·人工智能·ci/cd·架构·llama·rag
牛奶咖啡1328 分钟前
Prometheus+Grafana构建云原生分布式监控系统(一)
云原生·devops·分布式系统·sre·监控方法论·需监控哪些指标·监控与可观测性
檐下翻书17331 分钟前
HR人力资源管理流程图在线绘制方法
大数据·人工智能·架构·流程图·论文笔记
小程同学>o<44 分钟前
嵌入式之ARM体系与架构面试题(二)ARM处理器篇
arm开发·面试·架构·嵌入式软件·嵌入式面试·嵌入式面试资料
代码游侠1 小时前
学习笔记——ARM Cortex-A 裸机开发体系架构
arm开发·笔记·嵌入式硬件·学习·架构
向量引擎1 小时前
2026年AI架构实战:彻底解决OpenAI接口超时与封号,Python调用GPT-5.2/Sora2企业级架构详解(附源码+压测报告)
人工智能·python·架构