cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1821
Views
0
Helpful
6
Replies

ACE load balancing based on URL

ehgotz
Level 1
Level 1

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.

6 Replies 6

jbayuka
Level 5
Level 5

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

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
Level 1
Level 1

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*

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

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

Thanks - I ended up opening a case and was provided this link:

http://cisco.com/en/US/products/hw/modules/ps2706/products_configuration_example09186a00809c3048.shtml

The document has a few flaws like making sure you filter on /.* and not /*

I did try this and it works - this tied it altogether were other docs kept it to separate to understand.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: