最小化可实行产品
最小化可实行产品(MVP,Minimum Viable Product)的概念来自于《精益创业》。简单来说就是:
开发团队通过提供最小化可行产品,获取用户反馈。并在最小化可行产品上持续地进行迭代直到产品达到一个相对稳定的状态。
什么是 Service Mesh
A service mesh is a dedicated infrastructure layer for handling service-to-service communication. It’s responsible for the reliable delivery of requests through the complex topology of services that comprise a modern, cloud native application. In practice, the service mesh is typically implemented as an array of lightweight network proxies that are deployed alongside application code, without the application needing to be aware.
解读:
- 本质:infrastructure layer
- 功能:delivery of requests
- 产品形态/部署形式:network proxies
- 特点:without the application needing to be aware (对应用透明)
产品形态
第一代 Service Mesh 指的由 Sidecar 组成的网络。第二代 Service Mesh 指的是原来的数据平面加上 控制平面,用来管理和控制整个 Sidecar 网络。
也可以说,Service Mesh 就是 Sidecar 的网络拓扑模式。
与 Kubernetes 的关系
Kubernetes
- 解决容器编排和调度问题
- 本质上是管理应用生命周期(调度器)
- 给予 Service Mesh 支持和帮助
Service Mesh
- 解决服务间网络通信问题
- 本质上是管理服务通信(代理)
Service Mesh 的发展
Envoy 流量五元组
可以将 istio 的 access log 的格式修改为 json 或 text。
出错时可以通过 access log 中的 response flag 来排查问题。
名为 mesh 的 gateway
virtual service 中的 gateway 字段,如果为 空
或者 mesh
,表示作用于网格内部。
云原生
云原生(Cloud Native),这个词可以分成两个两个部分。
- 原生(Native),就是所谓的天然的、与生俱来的。
- 云(Cloud),指云计算,云平台。
那么云原生指的是与生俱来就适合在云平台上去部署的应用。
在云原生出现之前,应用一般包含两个部分:业务需求以及非业务需求。
- 应用中除了包含业务本身的逻辑外,一般还需要包含一些公共库和开发框架来协助应用实现一些非业务的逻辑。
- 这个时期的云平台提供的能力非常弱的,基本上只是提供应用运行所需的硬件资源,也就是从硬件层面或者虚拟机层面提供实例等。
而在云原生出现之后,应用就只需要关注业务本身了。而把之前那些非业务的需求都下沉到云平台来实现。
上图展示了云平台这些年的变化,浅色表示需要应该管理的,深色表示云平台提供的功能。可以看出在云服务的变迁过程中,到现在,基本上云可以为我们提供绝大部分的能力。
云原生的定义
云原生的提出者 Pivotal 对其定义如下:
Cloud native is an approach to building and running applications that exploits the advantages of the cloud computing delivery model. Cloud native is about how applications are created and deployed, not where. While today public cloud impacts the thinking about infrastructure investment for virtually every industry, a cloud-like delivery model isn’t exclusive to public environments. It’s appropriate for both public and private clouds. Most important is the ability to offer nearly limitless computing power, on-demand, along with modern data and application services for developers.
云原生的四个要素
- DevOps
- CD
- Microservice
- Containers
CNCF 对云原生的定义如下:
“Cloud native technologies empower organizations to build and run scalable applications in modern, dynamic environments such as public, private, and hybrid clouds. Containers, service meshes, microservices, immutable infrastructure, and declarative APIs exemplify this approach.”
云原生的理念
- 应用指关注业务
- 中间件(类库、框架)下沉,成为云的一部分
- 云提供基础设施和各种能力(非业务需求)
- 解耦业务和非业务功能(分离)