将 Azure Service Fabric 群集与 Windows Server 和 Linux 上的独立 Service Fabric 群集进行比较Comparing Azure and standalone Service Fabric clusters on Windows Server and Linux

Service Fabric 群集是通过网络连接在一起的一组虚拟机或物理机,可在其中部署和管理微服务。A Service Fabric cluster is a network-connected set of virtual or physical machines into which your microservices are deployed and managed. 群集中的计算机或 VM 称为群集节点。A machine or VM that is part of a cluster is called a cluster node. 群集可以扩展到数千个节点。Clusters can scale to thousands of nodes. 如果向群集添加新节点,Service Fabric 会在新增加的节点间重新平衡服务分区副本和实例。If you add new nodes to the cluster, Service Fabric rebalances the service partition replicas and instances across the increased number of nodes. 应用程序总体性能提高,访问内存的争用减少。Overall application performance improves and contention for access to memory decreases. 如果没有高效使用群集中的节点,可以减少群集中节点的数量。If the nodes in the cluster are not being used efficiently, you can decrease the number of nodes in the cluster. Service Fabric 会再次在减少的节点间重新平衡分区副本和实例以更加充分利用每个节点上的硬件。Service Fabric again rebalances the partition replicas and instances across the decreased number of nodes to make better use of the hardware on each node.

使用 Service Fabric 可在运行 Windows Server 或 Linux 的任何 VM 或计算机上创建 Service Fabric 群集。Service Fabric allows for the creation of Service Fabric clusters on any VMs or computers running Windows Server or Linux. 这意味着,可以在包含一组互连 Windows Server 或 Linux 计算机(无论是本地计算机、Azure 计算机还是任何云提供商的计算机)的任何环境中部署和运行 Service Fabric 应用程序。This means you are able to deploy and run Service Fabric applications in any environment where you have a set of Windows Server or Linux computers that are interconnected, be it on-premises, Azure or with any cloud provider.

在 Azure 上创建 Service Fabric 群集Create Service Fabric clusters on Azure

通过资源模型模板或 Azure 门户在 Azure 上创建群集。Creating a cluster on Azure is done either via a Resource Model template or the Azure portal. 有关详细信息,请参阅使用资源管理器模板创建 Service Fabric 群集在 Azure 门户中创建 Service Fabric 群集Read Create a Service Fabric cluster by using a Resource Manager template or Create a Service Fabric cluster from the Azure portal for more information.

Azure 上支持的群集操作系统Supported operating systems for clusters on Azure

可以在运行以下操作系统的虚拟机上创建群集:You are able to create clusters on virtual machines running these operating systems:

  • Windows Server 2012 R2Windows Server 2012 R2
  • Windows Server 2016Windows Server 2016
  • Windows Server 1709Windows Server 1709
  • Windows Server 1803Windows Server 1803
  • Linux Ubuntu 16.04Linux Ubuntu 16.04

Note

如果决定要在 Windows Server 1709 上部署 Service Fabric,请注意,(1) 它不是长期服务分支,因此你可能必须在将来迁移版本 (2) 如果部署容器,基于 Windows Server 2016 构建的容器不适用于 Windows Server 1709,反之亦然(你必须重新生成它们才能对其进行部署)。If you decide to deploy Service Fabric on Windows Server 1709, please note that (1) it is not a long term servicing branch, so you may have to move versions in the future, and (2) if you deploy containers, containers built on Windows Server 2016 do not work on Windows Server 1709, and vice versa (you will have to rebuild them to deploy them).

在本地或者通过任何云提供商创建 Service Fabric 独立群集Create Service Fabric standalone clusters on-premises or with any cloud provider

Service Fabric 提供一个安装包,用于在本地或者与任何云提供商合作创建独立的 Service Fabric 群集。Service Fabric provides an install package for you to create standalone Service Fabric clusters on-premises or on any cloud provider.

有关在 Windows Server 上设置独立 Service Fabric 群集的详细信息,请参阅创建适用于 Windows Server 的 Service Fabric 群集For more information on setting up standalone Service Fabric clusters on Windows Server, read Service Fabric cluster creation for Windows Server

Note

Linux 目前不支持独立群集。Standalone clusters currently aren't supported for Linux. 开发单机和 Azure Linux 多机群集支持 Linux。Linux is supported on one-box for development and Azure Linux multi-machine clusters.

任何云部署与本地部署Any cloud deployments vs. on-premises deployments

用于在本地创建 Service Fabric 群集的过程类似于在具有一组 VM 的任何所选云上创建群集的过程。The process for creating a Service Fabric cluster on-premises is similar to the process of creating a cluster on any cloud of your choice with a set of VMs. 预配 VM 的初始步骤由所使用的云提供程序或本地环境进行控制。The initial steps to provision the VMs are governed by the cloud provider or on-premises environment that you are using. 具有一组在它们之间启用了网络连接的 VM 之后,随后用于设置 Service Fabric 包、编辑群集设置以及运行群集创建和管理脚本的步骤相同。Once you have a set of VMs with network connectivity enabled between them, then the steps to set up the Service Fabric package, edit the cluster settings, and run the cluster creation and management scripts are identical. 这可以在选择面向新宿主环境时,确保操作和管理 Service Fabric 群集的知识和经验可以转移。This ensures that your knowledge and experience of operating and managing Service Fabric clusters is transferable when you choose to target new hosting environments.

创建独立 Service Fabric 群集的优点Benefits of creating standalone Service Fabric clusters

  • 可以自由选择任何云提供商来托管群集。You are free to choose any cloud provider to host your cluster.
  • Service Fabric 应用程序在编写之后,可以在多个宿主环境中运行,只需进行最小程度的更改,甚至无需更改。Service Fabric applications, once written, can be run in multiple hosting environments with minimal to no changes.
  • 构建 Service Fabric 应用程序的知识可从一个宿主环境转移到另一个环境。Knowledge of building Service Fabric applications carries over from one hosting environment to another.
  • 运行和管理 Service Fabric 群集的操作经验可从一个环境转移到另一个环境。Operational experience of running and managing Service Fabric clusters carries over from one environment to another.
  • 广泛的客户范围不会受宿主环境约束的限制。Broad customer reach is unbounded by hosting environment constraints.
  • 存在针对大范围中断的额外一层可靠性和保护,因为可以在数据中心或云提供商中断时将服务转移到其他部署环境。An extra layer of reliability and protection against widespread outages exists because you can move the services over to another deployment environment if a data center or cloud provider has a blackout.

独立群集支持的操作系统Supported operating systems for standalone clusters

可以在运行以下操作系统的 VM 或计算机上创建群集(目前尚不支持 Linux):You are able to create clusters on VMs or computers running these operating systems (Linux is not yet supported):

  • Windows Server 2012 R2Windows Server 2012 R2
  • Windows Server 2016Windows Server 2016

与在本地创建的独立 Service Fabric 群集相比 Azure 上的 Service Fabric 群集的优势Advantages of Service Fabric clusters on Azure over standalone Service Fabric clusters created on-premises

在 Azure 上运行 Service Fabric 群集相对于本地运行具有一些优势,因此,如果对于群集的运行位置没有特定需求,则我们建议在 Azure 上运行它们。Running Service Fabric clusters on Azure provides advantages over the on-premises option, so if you don't have specific needs for where you run your clusters, then we suggest that you run them on Azure. 在 Azure 上,我们提供与其他 Azure 功能和服务的集成,这样可使群集的操作和管理更容易且更可靠。On Azure, we provide integration with other Azure features and services, which makes operations and management of the cluster easier and more reliable.

  • Azure 门户: Azure 门户使群集易于创建和管理。Azure portal: Azure portal makes it easy to create and manage clusters.
  • Azure 资源管理器: 使用 Azure 资源管理器可以单元的形式方便地管理群集使用的所有资源,并简化了成本跟踪和计费。Azure Resource Manager: Use of Azure Resource Manager allows easy management of all resources used by the cluster as a unit and simplifies cost tracking and billing.
  • 用作 Azure 资源的 Service Fabric 群集 Service Fabric 群集是一种 Azure 资源,因此可以像在 Azure 中对其他资源建模一样为它建模。Service Fabric Cluster as an Azure Resource A Service Fabric cluster is an Azure resource, so you can model it like you do other resources in Azure.
  • 与 Azure 基础结构集成 Service Fabric 与适用于 OS、网络和其他升级的 Azure 基础结构相协调,以提高应用程序的可用性与可靠性。Integration with Azure Infrastructure Service Fabric coordinates with the underlying Azure infrastructure for OS, network, and other upgrades to improve availability and reliability of your applications.
  • 诊断: 在 Azure 中,我们提供与 Azure 诊断和 Log Analytics 的集成。Diagnostics: On Azure, we provide integration with Azure diagnostics and Log Analytics.
  • 自动缩放: 对于 Azure 上的群集,我们借助虚拟机缩放集提供内置自动缩放功能。Auto-scaling: For clusters on Azure, we provide built-in auto-scaling functionality due to Virtual Machine scale-sets. 在本地和其他云环境中,必须构建自己的自动调整规模功能或使用 Service Fabric 为调整群集规模而公开的 API 来手动调整规模。In on-premises and other cloud environments, you have to build your own auto-scaling feature or scale manually using the APIs that Service Fabric exposes for scaling clusters.

后续步骤Next steps