[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"很难理解"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"信息或代码不正确"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"没有我需要的信息/示例"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
为外部 HTTP(S) 负载平衡器设置流量管理
外部 HTTP(S) 负载平衡支持多种类型的流量管理,例如网址重定向和重写。本文档展示了针对某些特定用例使用流量管理的示例。其他用例也是可行的。
- 网址重定向。网址重定向(有时称为网址转发)会将您域名的访问者重定向到其他网址。例如,您可以使用指示将客户端转换为 HTTPS 请求的响应来应答所有传入 HTTP 请求。重定向使用 HTTP 状态代码,例如 301 和 302。
- 网址重写。通过网址重写,用户和搜索引擎可以使用更容易记住和查找的网址。例如,即使实际内容托管在
www.myorigin.com/august_snapshot/images/
上,您也可以允许用户使用类似 www.mydomain.com/static/images/
的网址。
- 基于标头和基于查询参数的路由。通过基于标头和基于查询参数的路由,您的负载平衡器可以根据 HTTP 标头和请求网址参数智能地路由流量。
如需了解 HTTP(S) 负载平衡的流量管理工作原理,请参阅流量管理概览。
如需详细示例,请参阅以下指南:
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"很难理解"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"信息或代码不正确"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"没有我需要的信息/示例"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-01-18 UTC.