cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
667
Views
0
Helpful
1
Replies

load balance based on OS

huangedmc
Level 3
Level 3

Is it possible to load balance incoming requests based on client's operating system on ACE?

For example, we have different web pages specifically for Blackberry or iPhones.

Instead of having multiple URL's & VIP's, we'd like to have a single VIP, but load balance traffic to different serverfarms based on client's OS.

1 Accepted Solution

Accepted Solutions

litrenta
Level 3
Level 3

You can loadbalance based on User-Agent header, first you need to quantify what Iphone and blackberry use for user-agent for instance from a regular browser you might see:

User-AgentT=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)

from an iphone you will typically see:

User-Agent=Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en)
AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C25 Safari/419.3

you can go to http://www.user-agents.org to find out what strings are used

That being the case you can make classes on the header to match for loadbalancing decisions:

class-map type http loadbalance match-any mobile

2 match http header User-Agent header-value .*iphone

4 match http header Uswer-Agent header-value .*blackberry

then in LB policy say we want to go to farmA for mobile and farmB for pc's

policy-map type loadbalance first-match L7POLICY

   class mobile

     serverfarm farmA

    class class-default

    serverfarm farmB

see:

http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/ace/v3.00_A2/configuration/slb/guide/classlb.html#wp1021388

View solution in original post

1 Reply 1

litrenta
Level 3
Level 3

You can loadbalance based on User-Agent header, first you need to quantify what Iphone and blackberry use for user-agent for instance from a regular browser you might see:

User-AgentT=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)

from an iphone you will typically see:

User-Agent=Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en)
AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C25 Safari/419.3

you can go to http://www.user-agents.org to find out what strings are used

That being the case you can make classes on the header to match for loadbalancing decisions:

class-map type http loadbalance match-any mobile

2 match http header User-Agent header-value .*iphone

4 match http header Uswer-Agent header-value .*blackberry

then in LB policy say we want to go to farmA for mobile and farmB for pc's

policy-map type loadbalance first-match L7POLICY

   class mobile

     serverfarm farmA

    class class-default

    serverfarm farmB

see:

http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/ace/v3.00_A2/configuration/slb/guide/classlb.html#wp1021388

Review Cisco Networking for a $25 gift card