微服务概论(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 迁移至微服务
相关推荐
岁岁种桃花儿2 小时前
SpringCloud从入门到上天:分布式和微服务基础
分布式·spring cloud·微服务
java干货7 小时前
<span class=“js_title_inner“>微服务:把一个简单的问题,拆成 100 个网络问题</span>
微服务·云原生·架构
成茂峰8 小时前
软考高级·系统架构设计师 | 一、绪论
架构·系统架构·软考高级·系统架构设计师
传感器与混合集成电路9 小时前
210℃与175℃高温存储器选型研究:LHM256MB与LDMF4GA-H架构与可靠性对比(下)
架构
铁蛋AI编程实战9 小时前
大模型本地轻量化微调+端侧部署实战(免高端GPU/16G PC可运行)
人工智能·架构·开源
Warren2Lynch10 小时前
2026年专业软件工程与企业架构的智能化演进
人工智能·架构·软件工程
vx-bot55566612 小时前
企业微信接口在边缘计算场景下的协同处理架构
架构·企业微信·边缘计算
Spring_java_gg13 小时前
<span class=“js_title_inner“>面向云原生时代的 LLM 推理|Kthena入局了!!!</span>
云原生
橙露13 小时前
NNG通信框架:现代分布式系统的通信解决方案与应用场景深度分析
运维·网络·tcp/ip·react.js·架构
TracyCoder12316 小时前
解读华为云Redis Proxy集群规格:架构、规格与带宽性能
redis·架构·华为云