directing traffic to specific server based on URL

Unanswered Question
Mar 22nd, 2010

I've got 2 servers in a server farm on round robin load balancing set up. Right now, it load balances requests to I would like all requests for to go to server A all the time. What's the best way of accomplishing this? I've tried setting up stickiness with no luck so I'm not sure if that's the right approach. Thanks.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Miroslaw Burnejko Mon, 03/22/2010 - 12:56

First create class-map with your url:

class-map type http loadbalance match-any ABC
  3 match http url /admin.*

Next create new server-farm with only one server:

serverfarm host SERVERFARM.SERVER1
  rserver RSERVER.ONE 80
    probe PROBE.ONE

Next modify your policy-map type load-balance:

policy-map type loadbalance first-match POLICY.LB
  class ABC
    serverfarm SERVERFARM.SERVER1
  class class-default
    sticky-serverfarm STICKY.SERVERFARM.ONE

Everything what is matched by Class-map will be forwarded to Serverfarm. Simple and very scalable.


This Discussion