Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Target Server by Environment

Hi,

I'm hoping this is a fairly quick question - I have 2 backends for my non-prod environments which we use Target Servers to specify the target endpoint:

 

    <LoadBalancer>
      <Algorithm>RoundRobin</Algorithm>
      <Server name="servera"/>
      <Server name="serverb"/>     
    </LoadBalancer>

 

However for the prod environment I want to have additional backend "servers" e.g. "serverc".
If I want a proxy identical over environments, how can I go about overriding/dynamically setting the target servers based on the environment, to utilise additional backends in one environment only?

I cant see anyway of overriding the target servers available to the environment, without setting them in the "LoadBalancer" element.. 
Thanks!
 
Solved Solved
0 1 31
1 ACCEPTED SOLUTION

For reference, I've solved this with the CICD pipeline, using a variable in a target proxy template which gets replaced at build with the actual target servers and creates the TargetEndpoint dynamically into the actual default.xml

default.xml.template

 

 

    <LoadBalancer>
      <Algorithm>RoundRobin</Algorithm>
    $LOADBALANCER_SERVERS
    </LoadBalancer>​

 

View solution in original post

1 REPLY 1

For reference, I've solved this with the CICD pipeline, using a variable in a target proxy template which gets replaced at build with the actual target servers and creates the TargetEndpoint dynamically into the actual default.xml

default.xml.template

 

 

    <LoadBalancer>
      <Algorithm>RoundRobin</Algorithm>
    $LOADBALANCER_SERVERS
    </LoadBalancer>​