SpringBoot時代背景

微服務

James Lewis Martin Fowler 2014年提出微服務完整概念,//martinfowler.com/microservices/

In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.
— James Lewis and Martin Fowler (2014)

簡而言之,微服務體系結構風格是一種將單個應用程序開發為一組小服務的方法,每個小服務都在自己的進程中運行,並使用輕量級機制(通常是HTTP資源API)進行通信。這些服務是圍繞業務功能構建的,可以通過完全自動化的部署機制獨立部署。這些服務的集中管理是最低限度的,可以用不同的編程語言編寫,並使用不同的數據存儲技術。
——詹姆斯·劉易斯和馬丁·福勒(2014)

  • 微服務是一種架構風格

  • 一個應用拆分為一組小型服務

  • 每個服務運行在自己的進程內,也就是可獨立部署和升級

  • 服務之間使用輕量級HTTP交互

  • 服務圍繞業務功能拆分

  • 可以由全自動部署機制獨立部署

  • 去中心化,服務自治,服務可以使用不同的語言,不同的存儲技術

分佈式

分佈式的困難

  • 遠程調用

  • 服務發現

  • 負載均衡

  • 服務容錯

  • 配置管理

  • 服務監控

  • 鏈路追蹤

  • 日誌管理

  • 任務調度

  • ……

分佈式解決

  • SpringBoot+SpringCloud

雲原生

  原生應用如何上雲,Cloud Native

上雲的困難

  • 服務自愈
  • 彈性伸縮
  • 自動化部署
  • 灰度發佈
  • 流量治理
  • ……