管理 Azure 流量管理器配置文件Manage an Azure Traffic Manager profile

流量管理器配置文件使用流量路由方法控制云服务或网站终结点的流量分布。Traffic Manager profiles use traffic-routing methods to control the distribution of traffic to your cloud services or website endpoints. 本文介绍如何创建和管理这些配置文件。This article explains how to create and manage these profiles.

创建流量管理器配置文件Create a Traffic Manager profile

可以使用 Azure 门户创建流量管理器配置文件。You can create a Traffic Manager profile by using the Azure portal. 在创建配置文件后,可以在 Azure 门户中配置终结点、监视以及其他设置。After creating your profile, you can configure endpoints, monitoring, and other settings in the Azure portal. 流量管理器支持每个配置文件最多 200 个终结点。Traffic Manager supports up to 200 endpoints per profile. 但是,大多数使用方案只需要少量的终结点。However, most usage scenarios require only a few of endpoints.

创建流量管理器配置文件To create a Traffic Manager profile

  1. 在浏览器中,登录 Azure 门户From a browser, sign in to the Azure portal. 如果还没有帐户,可注册 1 个月期限的试用版If you don't already have an account, you can sign up for a one-month trial.

  2. 单击“创建资源” > “网络” > “全部查看” > “流量管理器配置文件” > “创建” 。Click Create a resource > Networking > See All > Traffic Manager profile > Create.

  3. 在“创建流量管理器配置文件” 中,按如下所示完成操作:In the Create Traffic Manager profile, complete as follows:

    1. 名称中,提供配置文件的名称。In Name, provide a name for your profile. 此名称必须在 trafficmanager.cn 区域中唯一,并会生成 DNS 名称 (<name>,trafficmanager.cn),该名称用于访问流量管理器配置文件。This name needs to be unique within the trafficmanager.cn zone and results in the DNS name <name>, trafficmanager.cn, that is used to access your Traffic Manager profile.
    2. 路由方法中,选择“优先级” 路由方法。In Routing method, select the Priority routing method.
    3. 订阅中,选择要创建此配置文件的订阅In Subscription, select the subscription you want to create this profile under
    4. 资源组中,创建新的资源组,以在其下放置此配置文件。In Resource Group, create a new resource group to place this profile under.
    5. 资源组位置中,选择资源组的位置。In Resource group location, select the location of the resource group. 此设置指的是资源组的位置,对将全局部署的流量管理器配置文件没有影响。This setting refers to the location of the resource group, and has no impact on the Traffic Manager profile that will be deployed globally.
    6. 单击“创建”。 Click Create.
    7. 流量管理器配置文件的全局部署完成后,它会在相应的资源组中作为资源之一列出。When the global deployment of your Traffic Manager profile is complete, it is listed in respective resource group as one of the resources.

禁用、启用或删除配置文件Disable, enable, or delete a profile

可以禁用现有的配置文件,使流量管理器不会将用户请求路由到配置的终结点。You can disable an existing profile so that Traffic Manager does not refer user requests to the configured endpoints. 禁用流量管理器配置文件后,配置文件及其中包含的信息将保持不变,并且可以在流量管理器界面中进行编辑。When you disable a Traffic Manager profile, the profile and the information contained in the profile remain intact and can be edited in the Traffic Manager interface. 重新启用配置文件时,路由会恢复。Referrals resume when you re-enable the profile. 在 Azure 门户中创建流量管理器配置文件时,会自动启用该配置文件。When you create a Traffic Manager profile in the Azure portal, it's automatically enabled. 如果确定不再需要某个配置文件,可以将其删除。If you decide a profile is no longer necessary, you can delete it.

禁用配置文件To disable a profile

  1. 如果使用自定义域名,请更改 Internet DNS 服务器上的 CNAME 记录,使它不再指向流量管理器配置文件。If you are using a custom domain name, change the CNAME record on your Internet DNS server so that it no longer points to your Traffic Manager profile.
  2. 流量不再通过流量管理器配置文件设置定向到终结点。Traffic stops being directed to the endpoints through the Traffic Manager profile settings.
  3. 在浏览器中,登录 Azure 门户From a browser, sign in to the Azure portal.
  4. 在门户的搜索栏中,搜索要修改的流量管理器配置文件 名称,并在显示的结果中单击该流量管理器配置文件。In the portal's search bar, search for the Traffic Manager profile name that you want to modify, and then click the Traffic Manager profile in the results that the displayed.
  5. 单击“概览” > “禁用”。Click Overview > Disable.
  6. 确认禁用流量管理器配置文件。Confirm to disable the Traffic Manager profile.

启用配置文件To enable a profile

  1. 在浏览器中,登录 Azure 门户From a browser, sign in to the Azure portal.
  2. 在门户的搜索栏中,搜索要修改的流量管理器配置文件 名称,并在显示的结果中单击该流量管理器配置文件。In the portal's search bar, search for the Traffic Manager profile name that you want to modify, and then click the Traffic Manager profile in the results that the displayed.
  3. 单击“概览” > “启用”。Click Overview > Enable.
  4. 如果使用自定义域名,请在 Internet DNS 服务器上创建一条指向流量管理器配置文件域名的 CNAME 资源记录。If you are using a custom domain name, create a CNAME resource record on your Internet DNS server to point to the domain name of your Traffic Manager profile.
  5. 然后,流量将再次定向到终结点。Traffic is directed to the endpoints again.

删除配置文件To delete a profile

  1. 确保 Internet DNS 服务器上的 DNS 资源记录不再使用指向流量管理器配置文件域名的 CNAME 资源记录。Ensure that the DNS resource record on your Internet DNS server no longer uses a CNAME resource record that points to the domain name of your Traffic Manager profile.
  2. 在门户的搜索栏中,搜索要修改的流量管理器配置文件 名称,并在显示的结果中单击该流量管理器配置文件。In the portal's search bar, search for the Traffic Manager profile name that you want to modify, and then click the Traffic Manager profile in the results that the displayed.
  3. 单击“概览” > “删除”。Click Overview > Delete.
  4. 确认删除流量管理器配置文件。Confirm to delete the Traffic Manager profile.

后续步骤Next steps