云原生(Cloud Native)和不可变基础设施的定义是什么?

发表时间: 2020-05-13 08:42

一、什么是云原生(Cloud Native)?

云原生技术有利于各组织在公有云、私有云和混合云等新型动态环境中,构建和运行可弹性扩展的应用。

云原生的代表技术包括容器、服务网格、微服务、不可变基础设施和声明式API。这些技术能够构建容错性好、易于管理和便于观察的松耦合系统。


结合可靠的自动化手段,云原生技术使工程师能够轻松对系统做出频繁和可预测的重大变更。

云原生计算基金会(CNCF)致力于培育和维护一个厂商中立的开源生态系统,来推广云原生技术。

专栏
Kubernetes 零基础轻松入门
作者:软件架构
9.8币
3人已购
查看


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. These techniques enable loosely coupled systems that are resilient, manageable, and observable.

Combined with robust automation, they allow engineers to make high-impact changes frequently and predictably with minimal toil.


The Cloud Native Computing Foundation seeks to drive adoption of this paradigm by fostering and sustaining an ecosystem of open source, vendor-neutral projects.


CNCF认为CloudNative系统需包含的属性:


(a) 容器化封装:以容器为基础,提高整体开发水平,形成代码和组件重用,简化云原生应用程序的维护。在容器中运行应用程序和进程,并作为应用程序部署的独立单元,实现高水平资源隔离。

(b) 自动化管理:统一调度和管理中心,从根本上提高系统和资源利用率,同时降低运维成本。

(c) 面向微服务:通过松耦合方式,提升应用程序的整体敏捷性和可维护性。



专栏
Spring Cloud微服务架构项目实战
作者:软件架构
33.6币
46人已购
查看


二、不可变基础设施(Immutable Infrastructure)


1. 可变基础设施

In a traditional mutable server infrastructure, servers are continually updated and modified in place. Engineers and administrators working with this kind of infrastructure can SSH into their servers, upgrade or downgrade packages manually, tweak configuration files on a server-by-server basis, and deploy new code directly onto existing servers. In other words, these servers are mutable; they can be changed after they're created. Infrastructure comprised of mutable servers can itself be called mutable, traditional, or (disparagingly) artisanal.

在传统的可变基础设施中,服务器随时可更新和修改。工程师和管理员可以SSH 登录到服务器上,手动升级或降级软件包,逐台服务器修改配置文件,直接部署新代码到现有服务器上。也就是说,这些服务器是可变的。在服务器创建完成之后,可以随时改变或者调整。包含这些可变服务器的基础设施称为可变的、传统的基础设施。



专栏
Hadoop v3.1大数据技术快速入门
作者:软件架构
33.9币
27人已购
查看


2. 不可变基础设施

An immutable infrastructure is another infrastructure paradigm in which servers are never modified after they're deployed. If something needs to be updated, fixed, or modified in any way, new servers built from a common image with the appropriate changes are provisioned to replace the old ones. After they're validated, they're put into use and the old ones are decommissioned.

不可变基础设施是另外一种情况,服务器一旦部署完成,将从不修改。

如果需要任何更新、修复或者修改,将通过已经完成相应修改的镜像构建新的服务器,替换老的服务器。

新的服务器经过验证之后,投入使用,老的服务器将下线。

The benefits of an immutable infrastructure include more consistency and reliability in your infrastructure and a simpler, more predictable deployment process. It mitigates or entirely prevents issues that are common in mutable infrastructures, like configuration drift and snowflake servers. However, using it efficiently often includes comprehensive deployment automation, fast server provisioning in a cloud computing environment, and solutions for handling stateful or ephemeral data like logs.

其实是说的容器或者Pod,每一个容器或者Pod,类似于一台虚机。在容器或者Pod 实例化后,是不能变更的,也就是 immutable infrastructure。

Immutable infrastructure (II) provides stability, efficiency, and fidelity to your applications through automation and the use of successful patterns from programming. No rigorous or standardized definition of immutable infrastructure exists yet, but the basic idea is that you create and operate your infrastructure using the programming concept of immutability: once you instantiate something, you never change it. Instead, you replace it with another instance to make changes or ensure proper behavior.


专栏
Kafka v2.3 快速入门与实践
作者:软件架构
33.9币
56人已购
查看


不可变基础设施通过自动化和使用成功的编程模型,为应用程序提供了稳定、高效和精确性。目前,还没有严格或标准的不可变基础设施的定义,但是基本思想是:使用不可变的编程概念来创建和操作你的基础设施 -- 一旦你实例化了某个东西,你就永远不会改变它。相反,你可以使用另外一个实例替换它,以寻求更改或者确保正确的行为。