容器服务器

What’s the job of a developer? Writing software, of course. But that wasn’t always the case.

开发人员的工作是什么? 当然,编写软件。 但这并非总是如此。

Back in the days, each application had its own server. And as each server has a finite amount of resources, developers constantly had to think about not overloading the server’s capacities. If an application was needed to run from a different server, the whole thing had to be set up again.

过去,每个应用程序都有自己的服务器。 而且,由于每台服务器都有有限的资源,因此开发人员必须不断考虑不要使服务器的容量过载。 如果需要从其他服务器运行应用程序,则必须重新设置整个过程。

Enterprises soon realized that this was rather inefficient: on the one hand, developers weren’t happy because they had to worry about other things than their code. On the other hand, plenty of compute resources were going unused whenever an application didn’t take up 100 percent of the server’s capacity.

企业很快意识到这效率很低:一方面,开发人员不满意,因为他们不得不担心代码以外的其他事情。 另一方面,只要应用程序不占用服务器容量的100%,大量的计算资源就会被闲置。

Fast-forward to today: when was the last time you worried about some server architecture? Probably a while back.

快进到今天:您上一次担心某些服务器体系结构是什么时候? 大概一会儿。

That doesn’t mean that we gotten rid of all considerations regarding memory, RAM, storage, and so on. Even though developers are getting liberated of such issues more and more, the process is far from over.

这并不意味着我们摆脱了有关内存,RAM,存储等的所有注意事项。 即使开发人员越来越多地从此类问题中解放出来,但这个过程还远远没有结束。

As of now, we’re not at the end of the road of virtualization and never worrying about servers again. And it’s not clear yet which technology will be the winner of it all. Will it be virtual machines? Containers? Or serverless computing? It’s an ongoing debate, and one that is worth studying in detail.

到目前为止,我们还没有走在虚拟化道路的尽头,也再也不必担心服务器。 目前尚不清楚哪种技术将成为所有技术的赢家。 会是虚拟机吗? 容器? 还是无服务器计算? 这是一个持续不断的辩论,值得详细研究。

虚拟机的出现 (The advent of virtual machines)

Enter the 1960s, when virtual machines (VMs) were first invented. Instead of using bare-metal servers for one single application at a time, people started thinking about spinning up multiple operating systems (OS) on one server. This would allow multiple applications to run separately, each on its own OS.

进入1960年代, 第一次发明虚拟机(VM)。 人们不再考虑一次将裸机服务器用于一个应用程序,而是开始考虑在一个服务器上扩展多个操作系统(OS)。 这将允许多个应用程序分别运行在各自的操作系统上。

At IBM and other companies, they achieved just that: they emulate the physical server, i.e., they make virtual representations of it. A so-called hypervisor is in charge of allocating compute resources to the VMs and making sure that the VMs don’t interfere with one another.

在IBM和其他公司,他们只是实现了这一点 :他们模拟物理服务器,即,对其进行虚拟表示。 所谓的虚拟机管理程序负责将计算资源分配给VM,并确保VM不会相互干扰。

Not only are compute resources of one server used more efficiently this way. You can also run an application on many different servers without having to reconfigure it each time. And if a server doesn’t have a VM with the right OS, you can just clone another VM.

这样,不仅一台服务器的计算资源得到了更有效的利用。 您也可以在许多不同的服务器上运行应用程序,而不必每次都重新配置它。 如果服务器没有具有正确操作系统的VM,则可以克隆另一个VM。

In addition to all that, VMs can make servers more secure because you can scan them for malicious software. If you find some, you can just restore the VM in an earlier version, which essentially erases the malware.

除此之外,VM可以使服务器更安全,因为您可以扫描它们以查找恶意软件。 如果找到某些虚拟机,则可以将其还原为早期版本,从而从本质上清除恶意软件。

With these advantages in mind, it’s no wonder that VMs dominate the space, and bare-metal applications are pretty rare. Linux and Ubuntu are often-seen guests in many VMs. Java and Python run on stripped-down versions of VMs, which enables developers to execute their code on any machine.

考虑到这些优势,难怪VM占据了整个空间,而裸机应用程序却很少。 Linux和Ubuntu在许多VM中经常出现。 Java和Python在简化的VM版本上运行,这使开发人员可以在任何计算机上执行其代码。

Three men working on stacks of servers
Python and Java wouldn’t be deployable from anywhere without VMs. Photo by Science in HD on Unsplash
没有VM,就无法在任何地方部署Python和Java。 高清照片由Science 拍摄于Unsplash

战地1:虚拟机与容器 (Battlefield 1: VMs versus containers)

A virtual machine emulates the hardware it runs on. In contrast, a container just emulates an OS, usually Linux. That’s why it doesn’t contain a virtual copy of the hardware it’s running on.

虚拟机模拟其运行的硬件。 相反, 容器只是模拟一个操作系统,通常是Linux。 这就是为什么它不包含所运行硬件的虚拟副本的原因。

Like VMs, containers can’t go without an OS, an application and its libraries and dependencies. But letting go of the hardware emulation results in the fact that containers are even more lightweight, fast, and portable. That’s why containers only take seconds to start, while VMs usually need a few minutes.

像VM一样,容器离不开OS,应用程序及其库和依赖项。 但是放开硬件仿真会导致这样一个事实,即容器更加轻巧,快速且可移植。 这就是为什么容器仅需要几秒钟即可启动,而VM通常需要几分钟的时间。

On the other hand, containers aren’t always as secure as VMs. If malevolent software gets onto a containerized system and makes it through to the OS, it can potentially hijack the whole machine.

另一方面,容器并不总是像VM一样安全 。 如果恶意软件进入容器化系统并进入操作系统,它可能会劫持整个计算机。

In contrast, VMs keep different operating systems separate from one another. So even if malware gets through to the OS of a VM, all other VMs on the machine remain untouched from the attack. This adds an extra level of security that can be crucial when dealing with confidential data, for example.

相反,VM将不同的操作系统彼此分开。 因此,即使恶意软件进入了虚拟机的操作系统,该计算机上的所有其他虚拟机也不会受到攻击。 例如,这增加了额外的安全级别,这在处理机密数据时可能至关重要。

Another advantage of VMs over containers is that you can use different operating systems. This is more work, of course, because you might need to implement bug fixes on each OS separately. But if you have an application that ought to run on anything else than Linux, containers aren’t the way to go.

与容器相比,VM的另一个优点是您可以使用不同的操作系统。 当然,这是更多的工作,因为您可能需要分别在每个OS上实现错误修复。 但是,如果您的应用程序可以在Linux以外的任何其他设备上运行,那么容器就不是路要走。

On the other hand, containers are great for anything with a microservice architecture, i.e., where a single application is composed of many smaller services that are only loosely coupled and can be executed independently. Each individual service can be put in its own container. Then, the only thing that developers need to watch out for is that the containers communicate properly among each other.

另一方面,容器非常适合具有微服务架构的任何应用程序,即单个应用程序由许多较小的服务组成,这些服务仅是松散耦合的,并且可以独立执行。 每个单独的服务都可以放在自己的容器中。 然后,开发人员唯一需要注意的是容器之间的正确通信。

战地风云2:Docker与Kubernetes (Battlefield 2: Docker versus Kubernetes)

There’s one technology that’s synonymous with container engines: Docker. But there’s another technology that’s often mentioned in the same sentence: Kubernetes. So what’s going on — are Docker and Kubernetes friends or foes?

有一种与容器引擎同义的技术: Docker 。 但是同一句话中经常提到另一种技术: Kubernetes 。 那么,发生了什么— Docker和Kubernetes是朋友还是敌人?

As Microsoft puts it, comparing Docker and Kubernetes is a bit like comparing apples to apple pie. Docker is a file format for containers and open-source technology to run applications from anywhere. Kubernetes coordinates and schedules many containers, and ensures that they communicate properly with each other.

正如微软所说,比较Docker和Kubernetes有点像比较苹果和苹果派。 Docker是一种用于容器和开源技术的文件格式,可以在任何地方运行应用程序。 Kubernetes协调和调度许多容器,并确保它们彼此之间正确通信。

Docker has its own container orchestration service, Docker Swarm. Here, however, the winner is clear: Kubernetes is way more extensive than Docker Swarm. Kubernetes can run across an entire cluster of machines, whereas Docker Swarm runs on a single node only.

Docker拥有自己的容器编排服务Docker Swarm。 然而,在这里,赢家是显而易见的:Kubernetes比Docker Swarm的应用范围更广。 Kubernetes可以在整个机器集群上运行,而Docker Swarm仅在单个节点上运行。

So unless you’re deploying containers on a single node, or otherwise have no need for the sophistication that Kubernetes brings, there’s no need to give Docker Swarm a second thought. If you think container orchestration, think Kubernetes.

因此,除非您在单个节点上部署容器,否则不需要Kubernetes带来的复杂性,就无需再考虑Docker Swarm了。 如果您考虑容器编排,请考虑使用Kubernetes。

On top of managing containers, Kubernetes allows you to orchestrate a cluster of VMs — yes, VMs — and schedule containers to run on seletcted VMs, based on the available compute resources and the requirements of each container.

除了管理容器外,Kubernetes还允许您根据可用的计算资源和每个容器的需求来编排VM集群(是的,VM),并安排容器在选择的VM上运行。

You heard that right: VMs, Docker, and Kubernetes in one workflow. So far, this sounds less like a battle and more like a symphony. But wait, because there’s one more to come.

您没听错:一个工作流程中的VM,Docker和Kubernetes。 到目前为止,这听起来不像是一场战斗,而更像是一部交响曲。 但是,请稍等,因为还有更多。

People with laptops at table in conference room
The debate about VMs, containers, and serverless is far from over. Photo by Christina @ wocintechchat.com on Unsplash
关于虚拟机,容器和无服务器的争论还没有结束。 克里斯蒂娜(Christina)@ wocintechchat.com在Unsplash上的照片

战地3:容器与无服务器 (Battlefield 3: containers versus serverless)

If VMs took physical hardware off a developer’s plate, and containers stripped away any worries about operating systems (I’m talking containers like Docker plus optionally Kubernetes), serverless takes this journey another leap forward.

如果虚拟机从开发人员手中夺走了物理硬件,并且容器消除了对操作系统的任何担忧(我说的是诸如Docker以及可选的Kubernetes之类的容器),那么无服务器将使这一旅程又向前飞跃。

You can see this visualized in the figure below: With serverless, developers don’t even have to worry about when and how their application gets executed, which containers they ought to put it in, or how many compute resources it will consume. They still need to write the applications, of course, but after they’ve uploaded it to their AWS Lambda, Aurora, or CloudFront service, they can call it a day.

您可以在下图中直观地看到这一点:使用无服务器,开发人员甚至不必担心应用程序的执行时间和方式,应将其放入哪个容器或将消耗多少计算资源。 当然,他们仍然需要编写应用程序,但是在将其上传到其AWS Lambda,Aurora或CloudFront服务之后,他们可以每天进行调用。

Their code will then lie dormant until it gets executed. You only pay for the machine-time that you really used, which makes the whole thing pretty economic. In contrast, you need to pay a monthly fee for Docker, and a per-cluster-per-hour fee for Kubernetes, regardless of how much you use it.

然后,他们的代码将处于Hibernate状态,直到被执行。 您只需要为您真正使用的机器时间付费,就可以使整个过程变得非常经济。 相比之下,无论使用多少,您都需要为Docker每月支付费用,为Kubernetes每小时按群集支付费用。

That doesn’t mean, however, that serverless is king. It’s a fairly new technology, and at the moments there still are limits wherever you go.

但这并不意味着无服务器才是王道。 这是一项相当新的技术,目前无论您走到哪里,都仍然有局限性。

For example, at the moment it’s quite difficult to pull off A/B testing on serverless, or make other sophisticated deployment options work. Also, serverless needs some time to get code initialized. So if you need your application to be very fast, you should use containers instead.

例如,目前很难在无服务器上进行A / B测试 ,或者使其他复杂的部署选项正常工作。 另外,无服务器需要一些时间来初始化代码。 因此,如果您需要应用程序非常快,则应改用容器。

In addition, serverless comes with restrictions regarding compute resources. So if you have a task that takes rather a lot of RAM or runs for a long time, you’d be better off using containers.

此外,无服务器还带有有关计算资源的限制。 因此,如果您的任务需要占用大量RAM或长时间运行,那么最好使用容器。

Schematic showing the difference between VMs, containers, and serverless computing.
DigitalCloud.DigitalCloud拍摄 。

未来是什么样子的 (What the future holds)

All these limitations to serverless aren’t innate, so we can expect serverless to win more ground over containers in the years to come. It’s also gaining traction because it’s more beginner-friendly than container orchestrations, scales very easily and is very flexible and cost-effective regarding workloads.

无服务器的所有这些限制并不是天生的,因此我们可以预期,无服务器在未来几年会在容器上赢得更多的市场。 它也吸引了人们的注意,因为它比容器编排更适合初学者,可轻松扩展,并且在工作负载方面非常灵活且具有成本效益。

It’s therefore no wonder that the serverless architecture market is projected to triple in the next few years, grossing more than $21 billion by 2025. But that doesn’t mean that VMs and containers will die out.

因此,也难怪,在无服务器架构市场预计到三倍,在未来的几年中,2025年票房收入超过十亿$ 21但并不意味着虚拟机和容器将消亡。

It’s quite unlikely that we’ll only see serverless technologies in a decade or so. Just look at VMs, which have been around for half a century and are still very much in use. Instead, we’re quite likely going to see more symbioses of containers with serverless, just like containers and VMs work pretty well together. Services like AWS Fargate let you combine containers with serverless pretty seamlessly already.

我们几乎不可能在十年左右的时间里看到无服务器技术。 仅看一下已经存在了半个世纪并且仍在使用中的VM。 相反,我们很可能会看到更多带有无服务器的容器共生体,就像容器和VM可以很好地协同工作一样。 诸如AWS Fargate之类的服务使您已经可以无缝地将容器与无服务器相结合。

All these solutions — VMs, containers, and serverless — are good solutions and come with their specific strengths and weaknesses. Even though they’re sometimes competing on overlapping spaces, the good news is that you can mix-and-match them to suit your needs.

所有这些解决方案(VM,容器和无服务器)都是很好的解决方案,并具有各自的优点和缺点。 即使它们有时在重叠的空间上竞争,但好消息是您可以根据需要混合和匹配它们。

Big tech’s journey with virtualization is far from over. Except for increasing developer efficiency, we don’t even know what the destination will look like. But all the signs speak for an interesting, fascinating, and quite lucrative path looking forward.

大型技术在虚拟化方面的旅程还没有结束。 除了提高开发人员效率外,我们什至不知道目的地会是什么样。 但是所有的迹象都代表着一条有趣,引人入胜,利润丰厚的道路。

For all we know, serverless might not be the last step. Who knows, really, what technologies we’ll be playing with in the future?

就我们所知,无服务器可能不是最后一步。 谁真的知道,我们将来会使用什么技术?

翻译自: https://towardsdatascience.com/theres-an-ongoing-war-between-containers-and-serverless-computing-f2ba5379ae26

容器服务器

http://www.taodudu.cc/news/show-5570195.html

相关文章:

  • ntdll.dll故障(资源管理器无法打开)
  • 零知识证明学习笔记:背景与起源
  • 【自动驾驶轨迹规划之安全行驶走廊】
  • 【自动驾驶轨迹规划之最优控制】
  • 自动驾驶路径规划——路径规划入门须知
  • 定位当前位置(坐标点)到 附近多个位置(坐标点)最短路径动态规划(汉密尔顿回路算法整合百度地图API)
  • 安装完Office(2016专业加强版)后,再安装Visio(2016专业版),右键新建没有Visio选项
  • 报错 Building for , but the linked and embedded framework was built for iOS + iOS Simulator
  • IOS一些框架
  • iOS matrix
  • iOS16.3.1 续航时间实测,6款iPhone升级前后对比,结果如何
  • iOS 设备跟踪 GPU 使用率
  • iOS App崩溃日志分析
  • iOS系统分享
  • iOS定时器的应用
  • 【iOS开发】—— iOS内存管理
  • iOS-- MVC模式
  • iOS的签名机制
  • iOS开发前景怎么样
  • 中国国内ios软件开发前景到底是怎样的呢
  • IOS开发者就业前景怎么样?还在学习IOS开发的你们知道吗?
  • Android开发中无法获取VIVO/IQOO手机Log日志的问题(不显示Log)
  • vivox9usb调试Android,vivo X9S Plus的usb调试模式在哪里,打开vivo X9S Plususb调试模式的步骤...
  • vivo X9 Plus的USB调试模式在哪里,打开vivo X9 PlusUSB调试模式的流程
  • 电量优化-应用待机模式(实验)
  • 魅蓝和vivo怎么打开开发者选项或者打开usb调试(设置~关于本机~连续点击7次版本)
  • android气泡组件,气泡  |  Android 开发者  |  Android Developers
  • vivo y913 手机 进入开发者选项
  • 宇视服务器常用linux命令
  • 用requests+tkinter实现小型翻译器

容器服务器_容器与无服务器计算之间正在进行一场战争相关推荐

  1. 构建服务器_如何使用无服务器构建完整的后端系统

    构建服务器 This article will teach you how to build and deploy everything you need to be able to build a ...

  2. 服务器控件的优点和缺点_什么是无服务器架构? 它的优点和缺点是什么?

    服务器控件的优点和缺点 Serverless, the new buzzword in town has been gaining a lot of attention from the pros a ...

  3. 微服务架构 性能提升_如何通过无服务器架构提高性能

    微服务架构 性能提升 by Domenico Angilletta 通过多梅尼科·安吉列塔(Domenico Angilletta) 如何通过无服务器架构提高性能 (How to boost your ...

  4. 饥荒联机云服务器_饥荒联机独立服务器搭建教程(三):配置篇

    早在 2015 年底,Klei 就将整个饥荒的配置系统都换了,所以之前写的配置方法算是老古董没法用了,于是这不,博主更新了最新的配置方法. 说起来真是残念,在 2016 年 5 月初,我就差不多把整个 ...

  5. 对象容器设计模式_容器对象模式。 一种新的测试模式。

    对象容器设计模式 如果您搜索什么是页面对象的描述,您会发现页面对象模式为我们提供了一种以可重用和可维护的方式对内容建模的常识方法. 还要指出:在Web应用程序的UI中,您的测试与某些区域交互. Pag ...

  6. pause容器作用_容器编排之战(四)连载

    Master Master主要负责资源调度,控制副本,和提供统一访问集群的入口.--核心节点也是管理节点 Node Node是Kubernetes集群架构中运行Pod的服务节点(亦叫agent或min ...

  7. dell poweredge服务器_这款AMD服务器不简单

    在数据中心场,英特尔一直难有对手,尤其是老牌对手AMD疲软后,英特尔在数据中心市场更是毫无压力. 2017年,AMD卷土重来,携全新"Zen"架构的第一代EYPC服务器处理器重回服 ...

  8. 华为无线4g无服务器,手机可用wifi 无服务器

    手机可用wifi 无服务器 内容精选 换一换 华为云存储容灾服务(简称SDRS)提供了虚拟机级别的容灾保护,当主站点故障的时候,虚拟机可以在备站点迅速恢复,以确保业务的联系性 来自:产品 云手游服务器 ...

  9. 华为无线wifi无服务器,手机可用wifi 无服务器

    手机可用wifi 无服务器 内容精选 换一换 云手游服务器通过GPU硬件加速与图形接口支持,实现手游在云端运行效果,适用于手机游戏试玩推广.游戏智能辅助等场景.云手游服务器的CPU分为两类:Hi161 ...

最新文章

  1. OpenCV | OpenCV:sift,SURF 特征提取
  2. Scala代码案例:100以内的数求和,求出当和第一次大于20的当前数(循环中断机制)
  3. Oracle学习笔记(三)----------执行计划
  4. SpringMVC图片上传与显示
  5. HALCON 21.11:深度学习笔记---设置超参数(5)
  6. 云南省电子计算机高级,计算机基础知识-云南省电子信息高级技工学校.ppt
  7. CheerpJ相当于一个容器,效果类似Applet
  8. windows配置pip加速器
  9. iPhone手机上最不起眼的5款APP,用过的人都赞不绝口!
  10. 硬盘属于计算机的主存吗,.硬盘装在主机箱内,因此硬盘属于主存对吗
  11. 华为手机主界面的返回键怎么调出来_华为手机没有返回键怎么调出来
  12. 铺地毯(NOIP真题)
  13. 常见却可能无意间伤人的 8 句话
  14. 3D MAX 安装中的一些问题 一直初始化、闪退
  15. Java网课简易飞机大战
  16. Layui使用中遇到的问题
  17. android加载网页pdf,android 一行代码搞定加载网络 pdf 文件
  18. 风控策略和模型的区别_风控策略
  19. 将时谐电磁场引入工程电磁场的意义_工程电磁场教案-国家精品课华北电力学院崔翔-第4章(倪光正主编教材)...
  20. jasperReport 交叉表使用示例

热门文章

  1. java 文件遍历排序_Java的二叉树排序以及遍历文件展示文本格式的文件树
  2. friends迷必须知道的114件事
  3. 高频通信综合实训系统实验
  4. SwiftUI + RealityKit 实现简单AR测距
  5. coreldraw做生化标志_CorelDraw绘制炫酷的中文立体字海报
  6. python hashlib函数_python模块——hashlib
  7. 2021年安全员-A证(江苏省)考试平台及安全员-A证(江苏省)
  8. 增强 Wi-Fi 信号的 9 种最佳方法
  9. 基于Vue+SpringCloudAlibaba微服务电商项目实战-构建会员服务-011:基于Vue快速整合会员服务接口
  10. 达梦逻辑备份还原:dimp和dexp