微服务概论(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 迁移至微服务
相关推荐
HelloWorld0011 小时前
告警一天 800 条没人看:把 Prometheus 告警从噪音堆改成 5 条可行动的 SLO 告警
架构
微订校园外卖平台2 小时前
同城生活SaaS年费版架构评估:多商户订单状态机与结算链路拆解
架构·生活·外卖系统·本地生活·微订
Dawson Zhu2 小时前
【AI×半导体】09 虚拟量测(上):不测量,也能算出 CD 吗
人工智能·语言模型·架构·aigc·agi
小盆女神节奶粉2 小时前
03-登录与RBAC
java·架构
Eyfcom3 小时前
〖物流自动化测试 03〗Chaos Mesh 在物流微服务中的故障注入:从 Pod 宕机到业务逻辑故障的工程实践
服务器·微服务·架构·快递系统·物流自动化测试
xieliyu.3 小时前
Nacos 服务注册与发现:让报修服务找到师傅(二)
java·微服务·nacos·springcloud·服务注册发现·java后端·nacos3.x
真上帝的左手4 小时前
10. 软件设计&架构-架构师之路-102.MySQL秒级扩容
数据库·mysql·架构·系统架构·架构设计·高可扩展性
西西木科技丨Shopify开发机构4 小时前
把 $15 宠物牵引绳做成 $105 时尚套装:深度拆解 Wild One(wildone.com)的 Shopify Plus 购买动线与防呆架构
架构·shopify
kyrie_sakura4 小时前
大模型学习28 -- 模型原理2 -- LLM架构
学习·架构
haishikeji696_13 小时前
一网统飞无人机管理系统源码版|低空巡检平台私有化部署与二次开发方案
架构·无人机·低空经济·无人机管理系统·一网统飞·飞控管理平台