自建私有云与公有云托管对比

tech2022-09-12  117

自建私有云与公有云托管对比

This article is part of a series created in partnership with SiteGround. Thank you for supporting the partners who make SitePoint possible.

本文是与SiteGround合作创建的系列文章的一部分。 感谢您支持使SitePoint成为可能的合作伙伴。

We’ve recently discussed two types of hosting service:

我们最近讨论了两种类型的托管服务:

Dedicated Servers

专用服务器

You own/rent one or more servers at your host’s data center for your sole use.

您在主机的数据中心拥有/租用一台或多台服务器,仅供您自己使用。

Shared Servers

共享服务器

You rent space and processing capacity on a server which may also be used by many other companies and websites.

您在服务器上租用空间和处理能力,许多其他公司和网站也可能会使用它。

In general, a dedicated server is normally more flexible and you can configure it as you wish. A shared server may offer fewer options but is easier to manage and normally costs less.

通常,专用服务器通常更灵活,您可以根据需要对其进行配置。 共享服务器可能提供更少的选项,但更易于管理,并且通常成本更低。

Cloud hosting can be a good compromise between the two and brings other benefits. Let’s discuss the terminology and concepts before we go any further.

云托管可以很好地兼顾两者,并带来其他好处。 在进一步讨论之前,让我们讨论一下术语和概念。

什么是云? (What is the Cloud?)

The “cloud” and “cloud computing” are marketing buzzwords for the web. That’s it. Rather than buying software and storing data on your PC’s hard disk, you use an online application. That typically runs and stores data on a web server while displaying the interface within a web browser. In other words, you’re accessing software on-demand and sharing computing resources with others.

“云”和“云计算”是网络营销的流行语。 而已。 您可以使用在线应用程序,而不是购买软件并将数据存储在PC的硬盘上。 它通常在Web浏览器中显示界面的同时在Web服务器上运行并存储数据。 换句话说,您正在按需访问软件并与他人共享计算资源。

A web application can be hosted on a shared or dedicated server but scaling may become difficult. Perhaps the application works well with fifty concurrent users, but how does it cope with 1,000? How quickly could you migrate to a better service or server? What if user demand returned to normal levels after a few hours?

Web应用程序可以托管在共享或专用服务器上,但扩展可能会变得困难。 也许该应用程序可以与五十个并发用户一起很好地工作,但是如何应付1,000个呢? 您多快可以迁移到更好的服务或服务器? 如果几个小时后用户需求恢复正常水平该怎么办?

什么是云托管? (What is Cloud Hosting?)

Cloud hosting allows resources to be rapidly provisioned on demand. You can quickly add further processors, RAM or disk capacity and hosts such as SiteGround can automatically scale according to peaks in traffic.

云托管允许按需快速配置资源。 您可以快速添加更多处理器,RAM或磁盘容量, SiteGround之类的主机可以根据流量高峰自动扩展。

Auto-scaling is a great option for short-term campaigns when you know you’ll have huge traffic while a particular event takes place. In these situations, additional resources will be automatically added when the traffic kicks in, so you won’t have to worry about it.

当您知道某个特定事件发生时会产生大量流量时,自动调整比例是短期广告系列的绝佳选择。 在这些情况下,当流量增加时,将自动添加其他资源,因此您不必担心。

Technologies differ but most cloud hosts depend on virtual machines.

技术有所不同,但是大多数云主机都依赖于虚拟机。

什么是虚拟机? (What is a Virtual Machine?)

You have probably encountered emulators which recreate one computing device on another. For example, the Internet Archive allows you to play old arcade games, run Windows 3.1 or an Apple Macintosh from your browser.

您可能已经遇到了在另一台计算机上重新创建一个计算设备的仿真器。 例如, Internet存档允许您玩旧的街机游戏 ,从浏览器运行Windows 3.1或Apple Macintosh 。

It’s important to understand these are the original systems obtained from old disks and ROM chips — they are not faithful recreations. The hardware is being emulated. The legacy software may be saying “put this image on screen” — in the examples above, that instruction is intercepted by JavaScript, translated to HTML5 canvas code, and an appropriate response is returned. The software thinks it’s running on a compatible device.

重要的是要了解这些是从旧磁盘和ROM芯片获得的原始系统-它们不是忠实的娱乐活动。 硬件正在被仿真。 旧版软件可能会说“将该图像显示在屏幕上”-在上面的示例中,该指令被JavaScript拦截,转换为HTML5 canvas代码,并返回适当的响应。 该软件认为它正在兼容设备上运行。

A Virtual Machine (VM) is a similar concept. Software such as VWware, VirtualBox and Hyper-V emulate a PC on a PC using software-driven recreations of standard hardware. You can therefore run any guest operating system “within” any other operating system.

虚拟机(VM)是类似的概念。 VWware , VirtualBox和Hyper-V之类的软件使用软件驱动的标准硬件复制在PC上模拟PC。 因此,您可以在任何其他操作系统内“运行”任何来宾操作系统。

Cloud hosts can therefore provide a virtual machine which is functionally identical to a dedicated server. However, they are simply data files emulating a real server so there are several practical implications:

因此,云主机可以提供功能上与专用服务器相同的虚拟机。 但是,它们只是模拟真实服务器的数据文件,因此存在一些实际含义:

A virtual server can be created, installed and configured within seconds.

可以在几秒钟内创建,安装和配置虚拟服务器。 The virtual server is just data. It can easily be cloned, backed-up, rolled-back, or moved elsewhere.

虚拟服务器只是数据。 它可以轻松地克隆,备份,回滚或移到其他位置。 Development and deployment is simplified. Developers, staging and production environments can use identical images. It’s easy to test and undo alternative configurations.

开发和部署得到简化。 开发人员,暂存和生产环境可以使用相同的图像。 测试和撤消其他配置很容易。 A web application can run within it’s own virtual OS image. A second application can use another virtual machine; there is no risk of clashing or difficulties with differing technology stacks.

Web应用程序可以在其自己的虚拟OS映像中运行。 第二个应用程序可以使用另一个虚拟机。 对于不同的技术堆栈,没有冲突或遇到困难的风险。 Processing, RAM and storage are no longer tied to a real device. The VM can be deployed to a server farm which can automatically allocate resources as required.

处理,RAM和存储不再绑定到真实设备。 可以将VM部署到服务器场,该服务器场可以根据需要自动分配资源。 The risk of failure is greatly reduced because the OS is not running on real hardware.

由于操作系统不在实际硬件上运行,因此大大降低了失败的风险。

所有云主机都以相同的方式工作吗? (Do All Cloud Hosts Work in the Same Way?)

No. Most cloud hosts use some sort of Virtual Machine architecture but services can differ. For example:

否。大多数云主机使用某种虚拟机架构,但服务可能有所不同。 例如:

Infrastructure as a Service (IaaS)

基础架构即服务(IaaS)

Perhaps the closest to dedicated hosting, IaaS provides virtualization facilities but you choose your OS, install your software stack and keep it updated.

IaaS也许是最接近专用主机的一种,它提供虚拟化功能,但您可以选择操作系统,安装软件堆栈并保持更新。

Platform as a Service (PaaS)

平台即服务(PaaS)

Perhaps the closest to shared hosting, PaaS provides a specific platform for running particular types of application.

PaaS也许是最接近共享托管的平台,它为运行特定类型的应用程序提供了特定的平台。

Software as a Service (SaaS)

软件即服务(SaaS)

Typically on-demand software. For example, you could use a third-party service to store data rather than maintain your own MySQL installation.

通常是按需软件。 例如,您可以使用第三方服务来存储数据,而不是维护自己MySQL安装。

Serverless or Functions as a Service (FaaS)

无服务器或功能即服务(FaaS)

An abstracted application environment which manages logic and state. You write functions or micro-services which use that architecture without having to worry about the underlying software.

管理逻辑和状态的抽象应用程序环境。 您编写使用该体系结构的功能或微服务,而不必担心基础软件。

Not all services fit neatly into one of these categories!

并非所有服务都完全适合这些类别之一!

云托管的利与弊 (Cloud Hosting Pros and Cons)

My previous articles examined ease of use, flexibility, capabilities, safety and security when comparing dedicated servers with shared servers. These are less relevant to cloud hosting because the service will determine those factors. For example, cloud hosting can be as difficult as an unmanaged dedicated server or easier as the simplest shared server solution. It’s up to you.

我以前的文章在比较专用服务器和共享服务器时检查了易用性,灵活性,功能,安全性和安全性。 这些与云托管无关,因为服务将确定这些因素。 例如,云托管可能像非托管专用服务器一样困难,或者像最简单的共享服务器解决方案一样容易。 由你决定。

This leaves us with three other metrics…

这给我们留下了另外三个指标……

性能 (Performance)

A cloud host can automatically allocate resources as traffic increases although it will depend on your host and service plan. Some may apply specific limits although it is usually possible to upgrade the number of CPUs, RAM and disk space. Hosts such as SiteGround can apply new limits without a reboot.

云主机可以随着流量的增加自动分配资源,尽管这将取决于您的主机和服务计划。 尽管通常可以升级CPU,RAM和磁盘空间的数量,但有些可能会应用特定的限制。 诸如SiteGround的主机可以应用新的限制而无需重新启动。

可靠性 (Reliability)

Dedicated and shared servers fail. Hosts take precautions to minimize risk but an overheating CPU or disk corruption can bring the system down. Cloud services have less dependency on real hardware. Processing can be shared across multiple servers; failures still occur but your website or application remains active.

专用服务器和共享服务器失败。 主机采取预防措施以最大程度地降低风险,但是CPU过热或磁盘损坏会导致系统崩溃。 云服务对真实硬件的依赖性较小。 可以在多个服务器之间共享处理; 仍然会发生故障,但是您的网站或应用程序仍处于活动状态。

成本 (Cost)

Cloud hosting is often compared to a utility such as gas, electricity or water: you pay for what you use. The reality is usually more complex and pricing incurs a mixture of fixed and variable-rate charges. Your monthly payment could differ considerably from month to month.

通常将云托管与诸如天然气,电力或水之类的实用工具进行比较:您为使用的东西付费。 现实通常更为复杂,定价会同时产生固定费用和浮动费用。 您每个月的月付款可能会相差很大。

谁应该选择云托管? (Who Should Choose Cloud Hosting?)

Long term, I suspect cloud hosting will replace both shared and dedicated server plans. Everyone will use a cloud service whether they’re aware of it or not.

长期来看,我怀疑云托管将取代共享和专用服务器计划。 每个人都将使用云服务,无论他们是否意识到。

That said, the cloud hosting industry is in its infancy. The variety of services is growing exponentially and the market changes on a daily basis. Choosing the right plan for your business can be difficult when services are not directly comparable and costs are unknown until you start hosting.

也就是说,云托管行业尚处于起步阶段。 服务的种类呈指数增长,市场每天都在变化。 如果无法直接比较服务并且在开始托管之前费用未知,则为您的业务选择正确的计划可能会很困难。

Some hosts pitch cloud services mid-way between shared and dedicated hosting plans. Perhaps that’s the best option at the current time. Consider a cloud service as you move beyond the limits of shared hosting.

一些主机将云服务置于共享和专用主机计划之间。 也许这是当前最好的选择。 当您超越共享托管的限制时,请考虑使用云服务。

翻译自: https://www.sitepoint.com/cloud-hosting-pros-cons/

自建私有云与公有云托管对比

最新回复(0)