微服务概论(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 迁移至微服务
相关推荐
姚不倒10 分钟前
etcd 学习系列(二):集群架构 —— 3 节点是如何工作的
运维·架构·etcd
Dawson Zhu28 分钟前
从单体到联邦:多Agent架构的必要性与设计哲学
人工智能·语言模型·架构·aigc·agi
千里马-horse28 分钟前
第 60 章 模拟器架构
架构·aosp
水巷石子1 小时前
备考系统架构设计师第一天
学习·架构·软考·设计·考试
武子康2 小时前
商业比较词进入 AI Overview:Semrush 60 万关键词研究能说明什么
人工智能·ai·架构·agent·claude·codex·semrush
m0_587383002 小时前
全民健身解决方案软件开发实战:从架构设计到落地指南
java·spring boot·spring·架构·需求分析
沪上企服通3 小时前
数电发票全生命周期下的企业财税中台:从“开票工具“到“实时风控“的架构跃迁
架构
lytao1236 小时前
单体、微服务、Serverless:架构要匹配问题
微服务·架构·serverless·软件工程
javaDocker6 小时前
金融级 AIOps 架构跃迁(从“1-5-10“快恢目标到 AI Agent 告警收敛的完整技术实践)
人工智能·金融·架构
数字孪生视频孪生7 小时前
三维实时重构异构底座 核工危化无感定位跨境轨迹一屏统揽
大数据·运维·人工智能·重构·架构