custom header in target server of loadbalancer

babuk0930
Participant III

While configuring load balancer, how to send custom header to each of the target server.

We have loadbalancer configuration as follows

        <LoadBalancer>
            <Algorithm>RoundRobin</Algorithm>
            <Server name="server1"/>
            <Server name="server"/>
            <MaxFailures>5</MaxFailures>
        </LoadBalancer>

But for each server, we need to send a custom header which is unique for that server.

If it common header, i would have used assign message policy in previous step and add it.

Any inputs on how to send unique headers for that particular target serve

0 4 353
4 REPLIES 4

I don't believe this is possible as I don't believe you know the selected target server during the proxy flows. With that said, why are you sending a custom header that's unique per server? Is this intended to be for security purposes? If that's the case, why not use out of the box capabilities such as 2 way SSL?

Our backend is bluemix host.

And the target servers are

http://custom-domain.us-south.cf.cloud.ibm.com/
http://custom-domain.us-east.cf.cloud.ibm.com


And bluemix routes to specific application based on host header.

since it is cloud they cant have the same host name in two regions, if we want to route.


we can create target servers with region specific host names.

But having multiple applications on ibmcloud, we don’t want to keep on creating the target servers

sjm2000-1
Participant I

Maybe you can do out of apigee.

I mean to say let the loadbalancing be done in a dedicated blueblmix dedicated loadbalacer. The traffic to be forwarded to loadbalancer.

Example if you have f5, forward traffic to f5 and you can achieve via something called irule . Same with most load balancer.

Not applicable

You can use javascript or javacallout policy to configure the targeturl and header with roundrobin algortithm.