添加、禁用、启用或删除终结点Add, disable, enable, or delete endpoints

无论网站模式如何,Azure 应用服务中的 Web 应用功能都已针对数据中心内的网站提供了故障转移和轮循机制流量路由功能。The Web Apps feature in Azure App Service already provides failover and round-robin traffic routing functionality for websites within a datacenter, regardless of the website mode. 可以使用 Azure 流量管理器为不同数据中心内的网站和云服务指定故障转移和轮询机制流量路由。Azure Traffic Manager allows you to specify failover and round-robin traffic routing for websites and cloud services in different datacenters. 提供该功能所需的第一个步骤是将云服务或网站终结点添加到流量管理器中。The first step necessary to provide that functionality is to add the cloud service or website endpoint to Traffic Manager.

还可以禁用属于流量管理器配置文件的一部分的个体终结点。You can also disable individual endpoints that are part of a Traffic Manager profile. 禁用某个终结点会将其保留为配置文件的一部分,但是配置文件的行为就如同其中不包括该终结点一样。Disabling an endpoint leaves it as part of the profile, but the profile acts as if the endpoint is not included in it. 此操作对于临时删除处于维护模式或正在重新部署的终结点十分有用。This action is useful for temporarily removing an endpoint that is in maintenance mode or being redeployed. 终结点再次运行后,可以启用它。Once the endpoint is up and running again, it can be enabled.

备注

禁用某个终结点对其在 Azure 中的部署状态没有任何影响。Disabling an endpoint has nothing to do with its deployment state in Azure. 正常的终结点保持运行并能够接收流量,即使在流量管理器中已将其禁用也是如此。A healthy endpoint remains up and able to receive traffic even when disabled in Traffic Manager. 此外,在一个配置文件中禁用某个终结点不会影响它在其他配置文件中的状态。Additionally, disabling an endpoint in one profile does not affect its status in another profile.

将云服务或应用服务终结点添加到流量管理器配置文件To add a cloud service or an App service endpoint to a Traffic Manager 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. 在“流量管理器配置文件” 边栏选项卡的“设置” 部分中,单击“终结点” 。In the Traffic Manager profile blade, in the Settings section, click Endpoints.
  4. 在显示的“终结点” 边栏选项卡中,单击“添加” 。In the Endpoints blade that is displayed, click Add.
  5. 在“添加终结点” 边栏选项卡中,按如下所示完成输入:In the Add endpoint blade, complete as follows:
    1. 对于类型,单击“Azure 终结点” 。For Type, click Azure endpoint.
    2. 提供要用于识别此终结点的名称Provide a Name by which you want to recognize this endpoint.
    3. 从下拉列表中选择适当的资源类型作为“目标资源类型” 。For Target resource type, from the drop-down, choose the appropriate resource type.
    4. 如需目标资源,请单击“选择...”选择器,在“资源”边栏选项卡中列出同一订阅下的资源。 For Target resource, click the Choose... selector to list resources under the same subscription in the Resources blade. 在显示的“资源” 边栏选项卡中,选取要添加为第一个终结点的服务。In the Resource blade that is displayed, pick the service that you want to add as the first endpoint.
    5. 对于优先级,选为 1For Priority, select as 1. 如果此终结点处于正常状态,这会导致所有流量转到此终结点。This results in all traffic going to this endpoint if it is healthy.
    6. 使“添加为已禁用” 保持未选中状态。Keep Add as disabled unchecked.
    7. 单击 “确定”Click OK
  6. 重复步骤 4 和 5,添加下一个 Azure 终结点。Repeat steps 4 and 5 to add the next Azure endpoint. 确保添加该终结点时将其优先级值设为 2Make sure to add it with its Priority value set at 2.
  7. 添加完这两个终结点后,这两个终结点会显示在“流量管理器配置文件” 边栏选项卡中,并且其监视状态为“联机” 。When the addition of both endpoints is complete, they are displayed in the Traffic Manager profile blade along with their monitoring status as Online.

备注

使用“故障转移” 流量路由方法在配置文件中添加或删除终结点后,故障转移优先级列表可能不会按所需的顺序列出。After you add or remove an endpoint from a profile using the Failover traffic routing method, the failover priority list may not be ordered the way you want. 可以在“配置”页上调整故障转移优先级列表的顺序。You can adjust the order of the Failover Priority List on the Configuration page. 有关详细信息,请参阅配置故障转移流量路由For more information, see Configure Failover traffic routing.

禁用终结点To disable an endpoint

  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 are displayed.
  3. 在“流量管理器配置文件” 边栏选项卡的“设置” 部分中,单击“终结点” 。In the Traffic Manager profile blade, in the Settings section, click Endpoints.
  4. 单击要禁用的终结点。Click the endpoint that you want to disable.
  5. 在“终结点”边栏选项卡中,将终结点的状态更改为“已禁用”,然后单击“保存”。 In the Endpoint blade, change the endpoint status to Disabled, and then click Save.
  6. 在生存时间 (TTL) 的持续时间内,客户端会继续将流量发送到终结点。Clients continue to send traffic to the endpoint for the duration of Time-to-Live (TTL). 可以在流量管理器配置文件的“配置”页上更改 TTL。You can change the TTL on the Configuration page of the Traffic Manager profile.

启用终结点To enable an endpoint

  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 are displayed.
  3. 在“流量管理器配置文件” 边栏选项卡的“设置” 部分中,单击“终结点” 。In the Traffic Manager profile blade, in the Settings section, click Endpoints.
  4. 单击要启用的终结点。Click the endpoint that you want to enable.
  5. 在“终结点”边栏选项卡中,将终结点的状态更改为“已启用”,然后单击“保存”。 In the Endpoint blade, change the endpoint status to Enabled, and then click Save.
  6. 在生存时间 (TTL) 的持续时间内,客户端会继续将流量发送到终结点。Clients continue to send traffic to the endpoint for the duration of Time-to-Live (TTL). 可以在流量管理器配置文件的“配置”页上更改 TTL。You can change the TTL on the Configuration page of the Traffic Manager profile.

删除终结点To delete an endpoint

  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 are displayed.
  3. 在“流量管理器配置文件” 边栏选项卡的“设置” 部分中,单击“终结点” 。In the Traffic Manager profile blade, in the Settings section, click Endpoints.
  4. 单击要删除的终结点。Click the endpoint that you want to delete.
  5. 在“终结点”边栏选项卡中,单击“删除” In the Endpoint blade, click Delete

后续步骤Next steps