Post by account_disabled on Dec 12, 2023 11:30:26 GMT 5.5
谷歌云平台(GCP)与亚马逊网络服务和微软Azure一起成为全球最受欢迎的云计算服务提供商之一。 GCP 提供广泛的云产品,从“Compute Engine”虚拟机到托管 Kubernetes 集群,再到高级 DNS 和 CDN 服务。在本文中,我们将了解一些可以实现高性能 WordPress 网站的 GCP 最受欢迎的产品。 Kinsta 的托管基础设施由Google Cloud Platform提供支持。几年前,在测试了各种顶级云提供商后,我们转向了 GCP。对于我们来说,Google Cloud 提供了性能、安全性和功能的最佳组合。 由于 Kinsta 是托管应用程序、数据库和WordPress主机,因此我们处理所有服务器端软件更新和管理,因此客户可以使用我们的自定义 MyKinsta 仪表板专注于管理其网站。 快进到 2023 年,Kinsta 上托管的所有网站都由 GCP 最快的计算引擎虚拟机及其超快的高级层网络提供支持。 不确定那是什么意思?让我们仔细看看 Google Cloud Compute Engine! 什么是 Google 云平台计算引擎? Compute Engine 是 Google Cloud 的虚拟机 (VM) 产品。2023 年,虚拟机通常与“服务器”同义。换句话说,如果您听到有人说他们需要为他们的项目设置服务器,这通常意味着他们正在设置虚拟机。 什么是虚拟机计算引擎? 虚拟机分配计算资源,包括 CPU 核心、RAM、SSD或机械磁盘存储以及网络连接。虚拟机是物理机的分支,代表底层物理机资源的一部分。
实际上来自等顶级提供商的虚拟机提供了传统物理机无 电话号码清单 法比拟的灵活可扩展性。 为了演示这一点,假设您的 WordPress 网站允许您在餐厅预订座位。 本周该网站没有收到太多流量。周五晚上的交通量增加并持续整个周末。如果您的网站托管在物理服务器上,您将处理静态且不可扩展的资源(例如 16 个 CPU 核心、32 GB RAM、500 GB SSD 存储)。这意味着您的汽车仅在周五至周日比较方便,周一至周四则不太方便。 另一方面,Compute Engine 虚拟机允许您在一周内分配最低水平的资源(例如 4 个 CPU 核心、16 GB RAM、500 GB SSD 存储),并扩展计算资源以应对周末高峰流量的增加。在周末激增之后,我们可以缩减到初始配置。由于 Google Cloud 为开发人员提供了强大的 API,因此扩展过程甚至可以自动化! Compute Engine 机器系列 在深入研究如何使用 Compute Engine 托管 WordPress 网站之前,让我们先了解一下 Compute Engine 中可用的各种计算机系列。 E2 虚拟机 E2 VM 专为低成本的日常计算场景而设计。它们非常适合托管小型网站和应用程序、微服务和开发环境。虽然 Google 没有明确说明,但许多人认为 E2 系列机器是较旧的 N1 系列机器更快、更便宜的替代品。 E2 虚拟机使用 Intel 和 AMD 的 x86 CPU,但与其他系列的虚拟机不同,它们不允许您选择特定的芯片代。相比之下,E2 虚拟机使用专有的“资源负载平衡”技术,根据可用性动态分配 CPU。
这意味着 E2 VM 可以由各种 芯片提供支持。 得益于 Google 的负载平衡技术(包括自定义 CPU 调度程序和性能感知 CPU 迁移),E2 VM 可以保持一致的性能水平,尽管驱动 VM 的物理硬件存在变化。 虚拟机 N1 与 E2 系列虚拟机一样,N1 虚拟机是满足日常计算需求的低成本通用虚拟机。但是,它们使用较旧的 Intel 处理器,并且性价比低于 E2 VM。因此,除非您有特定原因选择 N1 VM,否则 E2 VM 可以以更低的价格实现相同水平的性能。 虚拟机 N2 N2 VM 是 N1 和 E2 VM 的更高性能替代方案。与 N1 和 E2 机器不同,N2 VM 配备了新的 Intel Cascade Lake CPU,据 Google 称,该 CPU 的性能比较低层 VM 的价格高出 20%。对于内存密集型情况,N2 VM 的每个 CPU 内存最多可增加 25%。 N2D 虚拟机 N2D VM 与 N2 VM 类似,但放弃了 Intel CPU,转而使用 AMD 芯片。与 N2 VM 相比,N2D VM 可配置多 144 个 CPU 和 256 GB RAM。因此,如果您正在寻找支持极高 CPU 核心数和内存限制的高性能通用计算机,N2D VM 是一个可靠的选择。 虚拟机 C2 C2 VM 是高性能“计算优化”机器。C2 虚拟机配备高端Intel C2 VM,专为 CPU 密集型应用程序而设计,例如电子设计自动化、游戏、某些类型的科学建模和单线程应用程序。 在 Kinsta,为了在所有支持的位置为我们的托管堆栈提供支持,我们使用 C2 虚拟机。由于 WordPress 是一款单线程应用程序(每个PHP 工作线程只能使用一个 CPU 线程),因此未缓存请求的站点性能高度依赖于 CPU 时钟速度。事实上,在将我们的基础设施从 N1 虚拟机迁移到 C2 虚拟机后,我们发现Kinsta 上托管的网站的性能提高了 200% 。
实际上来自等顶级提供商的虚拟机提供了传统物理机无 电话号码清单 法比拟的灵活可扩展性。 为了演示这一点,假设您的 WordPress 网站允许您在餐厅预订座位。 本周该网站没有收到太多流量。周五晚上的交通量增加并持续整个周末。如果您的网站托管在物理服务器上,您将处理静态且不可扩展的资源(例如 16 个 CPU 核心、32 GB RAM、500 GB SSD 存储)。这意味着您的汽车仅在周五至周日比较方便,周一至周四则不太方便。 另一方面,Compute Engine 虚拟机允许您在一周内分配最低水平的资源(例如 4 个 CPU 核心、16 GB RAM、500 GB SSD 存储),并扩展计算资源以应对周末高峰流量的增加。在周末激增之后,我们可以缩减到初始配置。由于 Google Cloud 为开发人员提供了强大的 API,因此扩展过程甚至可以自动化! Compute Engine 机器系列 在深入研究如何使用 Compute Engine 托管 WordPress 网站之前,让我们先了解一下 Compute Engine 中可用的各种计算机系列。 E2 虚拟机 E2 VM 专为低成本的日常计算场景而设计。它们非常适合托管小型网站和应用程序、微服务和开发环境。虽然 Google 没有明确说明,但许多人认为 E2 系列机器是较旧的 N1 系列机器更快、更便宜的替代品。 E2 虚拟机使用 Intel 和 AMD 的 x86 CPU,但与其他系列的虚拟机不同,它们不允许您选择特定的芯片代。相比之下,E2 虚拟机使用专有的“资源负载平衡”技术,根据可用性动态分配 CPU。
这意味着 E2 VM 可以由各种 芯片提供支持。 得益于 Google 的负载平衡技术(包括自定义 CPU 调度程序和性能感知 CPU 迁移),E2 VM 可以保持一致的性能水平,尽管驱动 VM 的物理硬件存在变化。 虚拟机 N1 与 E2 系列虚拟机一样,N1 虚拟机是满足日常计算需求的低成本通用虚拟机。但是,它们使用较旧的 Intel 处理器,并且性价比低于 E2 VM。因此,除非您有特定原因选择 N1 VM,否则 E2 VM 可以以更低的价格实现相同水平的性能。 虚拟机 N2 N2 VM 是 N1 和 E2 VM 的更高性能替代方案。与 N1 和 E2 机器不同,N2 VM 配备了新的 Intel Cascade Lake CPU,据 Google 称,该 CPU 的性能比较低层 VM 的价格高出 20%。对于内存密集型情况,N2 VM 的每个 CPU 内存最多可增加 25%。 N2D 虚拟机 N2D VM 与 N2 VM 类似,但放弃了 Intel CPU,转而使用 AMD 芯片。与 N2 VM 相比,N2D VM 可配置多 144 个 CPU 和 256 GB RAM。因此,如果您正在寻找支持极高 CPU 核心数和内存限制的高性能通用计算机,N2D VM 是一个可靠的选择。 虚拟机 C2 C2 VM 是高性能“计算优化”机器。C2 虚拟机配备高端Intel C2 VM,专为 CPU 密集型应用程序而设计,例如电子设计自动化、游戏、某些类型的科学建模和单线程应用程序。 在 Kinsta,为了在所有支持的位置为我们的托管堆栈提供支持,我们使用 C2 虚拟机。由于 WordPress 是一款单线程应用程序(每个PHP 工作线程只能使用一个 CPU 线程),因此未缓存请求的站点性能高度依赖于 CPU 时钟速度。事实上,在将我们的基础设施从 N1 虚拟机迁移到 C2 虚拟机后,我们发现Kinsta 上托管的网站的性能提高了 200% 。