Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a CISCO hardware load balancer with two web servers behind it. We'd like to force some URLs to only be served by one of the machines.

Firstly, is the job of the load balancer? or would a better approach be create a subdomain such as http://assets.example.com which would be automatically be routed to one of the servers?

share|improve this question
    
loadbalancer model would help, cisco's got a pretty big product line –  cagenut Jun 10 '10 at 15:46
add comment

3 Answers

up vote 1 down vote accepted

Yeah, you can do that if you want, although if you're certain you want to do that then why not just assign the DNS entry to the specific server IP rather than the cluster VIP?

share|improve this answer
    
Will the server behind the Load Balancer also have a public IP, or does this depend entirely on the setup? –  Tom Jun 11 '10 at 16:04
    
The way I'd do it would require a public address yes. –  Chopper3 Jun 11 '10 at 16:19
add comment

without specific model information, yes the loadbalancer can take specific server in and out of service gracefully. That is one of the reasons to use a loadbalancer. Load balancers are reverse proxies (in the simplest form), but usually add additional functionality (layer 7 routing, health checks etc). It's usualy very simple to take a server out of service with a loadbalancer.

share|improve this answer
add comment

This is generally the job of a reverse proxy if you don't use a separate domain, and I am not sure if that CISCO hardware balancer does that. Apache and Nginx can be used as reverse proxies, and you would have regex rules that redirect things that match to specific servers.

I would recommend the other domain (assets.example.com) assuming you are talking about static content. That happens to be what stackoverflow does with their static content using sstatic.net.

Some advantages of the second domain:

  • You don't need to use the cookies on the domain for static content, and that saves some overhead (Yahoo blurb about this here, Google blurb here) . From sstatic.net:

    If your domain is www.example.org, you can host your static components on static.example.org. However, if you've already set cookies on the top-level domain example.org as opposed to www.example.org, then all the requests to static.example.org will include those cookies. In this case, you can buy a whole new domain, host your static components there, and keep this domain cookie-free. Yahoo! uses yimg.com, YouTube uses ytimg.com, Amazon uses images-amazon.com and so on.

  • I would also think that if you architect for the second domain, if you ever decide to move to a CDN everything will be pretty much in place for that. The second domain, to me, feels more modular and I modularity is generally a good thing.

share|improve this answer
    
Yep another domain such as examplecdn.com would be a smart idea, thanks –  Tom Jun 11 '10 at 16:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.