Configure GSLB service selection using content switching 编辑

September 21, 2020 Contributed by:  S

Configure GSLB service selection using content switching

In a typical GSLB deployment, you can prioritize the selection of a set of GSLB services bound to a GSLB virtual server, but you cannot do the following:

  • Restrict the selection of a GSLB service from a subset of GSLB services bound to a GSLB virtual server for the given domain.
  • Apply different load balancing methods on the different subsets of GSLB services in the deployment.
  • Apply spillover policies on a subset of GSLB services, and you cannot have a backup for a subset of GSLB services.
  • Configure a subset of GSLB services to serve different content. That is, you cannot content switch between servers in different GSLB sites. The GSLB configuration assumes that the servers contain the same content.
  • Define a subset GSLB service with different priorities and specify an order in which the services in the subset are applied to a request.

You can now configure a content switching (CS) policy to customize the GSLB deployment. First configure a set of GSLB services and bind it to a GSLB virtual server. Then, configure a CS virtual server of target type GSLB, define a CS policy and action with the GSLB virtual server as target virtual server, and bind the CS policy to CS virtual server.

Important

  • Only CS policies with DNS based expressions can be bound to a CS virtual server of target type GSLB.
  • If a GLSB service is bound to a CS virtual server through a GSLB virtual server, you cannot bind another GSLB virtual server bound with the same GSLB service to the CS virtual server.

ExampleConsider a GLSB deployment that includes two GSLB sites. At each site, four GSLB services (S-1, S-2, S-3, and S-4) are bound to GSLB virtual server VS-1. You can configure a content switching (CS) virtual server of target type GSLB and define a CS policy and action with VS-1 as the target virtual server, so that requests for content in English are served only by S-1 and S-2, and requests for content in the local language are served only by S-3 and S-4.

You can give S-1 priority by configuring a backup virtual server to VS-1 and binding S-2 to the backup virtual server. S-1 serves the client requests. If the server S-1 represents goes down, S-2 serves the requests. If both S-1 and S-2 are down, clients receive an empty response.

To configure GSLB Service Selection using Content Switching:

  1. Configure GSLB. For instructions, see Configuring Global Server Load Balancing
    .
  2. Configure a Content Switching (CS) virtual server of target type GSLB. For more information, see Creating Content Switching Virtual Servers
    .
  3. Configure Content Switching (CS) policies. For more information, see Configuring Content Switching Policies
    .
  4. Configure CS actions that designate a GSLB virtual server as the target virtual server. For more information, see Configuring a Content Switching Action
    .
  5. Bind the CS policies to the CS virtual server. For more information, see Binding Policies to a Content Switching Virtual Server
    .
  6. Bind the domain to the CS virtual server instead of the GSLB virtual server.


Sample Configuration

The following sample configuration sends requests from the client with IP address 5.5.5.5 to SERVICE_GSLB1 and SERVICE_GSLB2. SERVICE_GSLB1 has a higher priority than SERVICE_GSLB2, and SERVICE_GSLB2 serves the client requests only when SERVICE_GSLB1 is down. If both SERVICE_GSLB1 and SERVICE_GSLB2 are down, SERVICE_GSLB3 and service-GSLB4 are not considered, and a blank response is sent to the client.

add cs vs CSVSERVER_GSLB http –targettype GSLBDoneadd gslb vs VSERVER_GSLB1 httpDoneadd gslb vs VSERVER_GSLB2 httpDoneadd gslb vs VSERVER_GSLB_BACKUP1 httpDoneset gslb vs VSERVER_GSLB1 -backupvserver VSERVER_GSLB_BACKUP1Doneadd gslb service SERVICE_GSLB1 1.1.1.1 HTTP 80 -sitename site1Doneadd gslb service SERVICE_GSLB2 1.1.1.2 HTTP 80 -sitename site1Doneadd gslb service SERVICE_GSLB3 1.1.1.3 HTTP 80 -sitename site2Doneadd gslb service SERVICE_GSLB4 1.1.1.4 HTTP 80 -sitename site2Donebind gslb vs VSERVER_GSLB1 -servicename SERVICE_GSLB1Donebind gslb vs VSERVER_GSLB_BACKUP1 -servicename SERVICE_GSLB2Donebind gslb vs VSERVER_GSLB2 -servicename SERVICE_GSLB3Donebind gslb vs VSERVER_GSLB2 -servicename SERVICE_GSLB4Doneadd cs action a1 -targetvserver VSERVER_GSLB1Doneadd cs policy p1 -rule "CLIENT.IP.SRC.EQ(5.5.5.5)" -action a1Donebind cs vs CSVSERVER_GSLB -domainName www.abc.comDonebind cs vs CSVSERVER_GSLB -policyname p1 -priority 1Doneadd cs action a2 -targetvserver VSERVER_GSLB2Doneadd cs policy p2 -rule "CLIENT.IP.SRC.EQ(6.6.6.6)" -action a2Donebind cs vs CSVSERVER_GSLB -policyname p2 -priority 2Done<!--NeedCopy-->


Associate a target virtual server expression to a GSLB content switching action

You can now associate a target virtual server expression to a GSLB content switching action. This allows GSLB content switching virtual server to use policy expressions to compose the target GSLB virtual server name while processing the DNS requests.

To configure a content switching action that specifies an expression by using the CLI

At the command prompt, type the following command to configure the content switching action to retrieve the HTTP callout response.

add cs action <name> -targetVserverExpr <expression><!--NeedCopy-->

Example:

add cs action csact_GSLB_VServer -targetVserverExpr "SYS.HTTP_CALLOUT(GSLB_Method_API)"<!--NeedCopy-->

To configure a content switching action that specifies an expression by using the GUI

  1. Navigate to Traffic Management > Content Switching > Actions.
  2. Configure a content switching action, and specify an Expression that dynamically computes the name of the target load balancing virtual server.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:65 次

字数:7019

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文