ACE load balancing based on URL

Unanswered Question
Jun 17th, 2009

I am trying to send traffic to one server or another based on the URL. I want traffic to foo.com/selfserv to direct to server A and traffic to foo.com/webui to direct to server B. I found URL inspection etc but I am not sure how to apply it the scenario as I do not want the ACE to inspect all inbound HTTP requests.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
jbayuka Tue, 06/23/2009 - 07:10

The ACE performs regular expression matching against the received packet data from a particular connection based on the HTTP URL string. To configure a class map to make Layer 7 SLB decisions based on the URL name and, optionally, the HTTP method, use the match http url command in class-map HTTP load balance configuration mode.

The ACE performs regular expression matching against the received packet data from a particular connection based on the RTSP URL string. You can configure a class map to make Layer 7 SLB decisions based on the URL name and optionally, the RTSP method, by using the match rtsp url command in class-map RTSP load balance configuration mode.

Configuring Traffic Policies for Server Load Balancing:

http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/ace_appliances/vA3_1_0/configuration/slb/guide/classlb.html

sthon-dbsys Wed, 06/24/2009 - 01:33

I am also searching for a balance method based on some url parameters.

the answer of jbayuka sounds fine, but it doesn't really match the implemented url stickyness on CCS

On the CSS i configure it like:

owner test.de

content url_sticky

: : :

advanced-balance url

url "/*"

string prefix "shopId="

string eos-char "_"

: : :

so how can I configure the url stickyness from CSS on an ACE device ?

JeramyKoval Wed, 06/24/2009 - 13:48

I'm sure someone will correct me if I'm wrong. :) I am still trying to get my head around the ACE but I believe you can do this by setting up similar to this.

class-map type http loadbalance match-all FOO_A

10 match http header Host header-value foo.com

20 match http url /selfserv*

You would then apply the class-map to your policy-map and define serverfarm A.

Then basically duplicate this for /webui but configure that for serverfarm B.

class-map type http loadbalance match-all FOO_B

10 match http header Host header-value foo.com

20 match http url /webui*

sthon-dbsys Wed, 06/24/2009 - 21:17

you are rigth, but in this solution you have to configure ONE Serverfarm for EACH service.

in css solution you configure one serverfarm with all server/services.

config on css look like:

owner test.de

content url_sticky

: : :

advanced-balance url

url "/*"

string prefix "shopId="

string eos-char "_"

: : :

add service1

add service2

add service3

service service1

ip address 1.1.1.1

string service1

service service2

ip address 1.1.1.2

string service1

service service3

ip address 1.1.1.3

string service3

due to the url stickyness config

all packets will send to server 1 if in the url appears "shopId=server1_", based in the string configuration,

all packets will send to server 2 if in the url appears "shopId=server2_" and so on.

So it looks like different implementation on CSS and ACE

sthon-dbsys Thu, 06/25/2009 - 05:34

I found the correct solution.

the goal is using "http-header" stickyness.

In the http-header you find the "GET" statemant followed by the url.

now you can filter the url and assign special url characters to dedicated servers

example:

sticky http-header GET ST-URL_STICKYFARM

replicate sticky

serverfarm domain.de

8 static header-value "" rserver SERVER1

16 static header-value "" rserver SERVER2

if "urlpattern1" appears in the http-header your packets will be send to SERVER1

if "urlpattern2" appears in the http-header your packets will be send to SERVER2

details you can find at:

http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/ace/v3.00_A2/configuration/slb/guide/slbgd.pdf

page 5-52

Actions

This Discussion