2

I am in the process of setting up a network of web servers on Rackspace. I am looking to do 4 servers in groups of two. See diagram below.

enter image description here

My question is, if I have server A and server B as a mirror of A behind the load balancer I know I can get this working. My question is, if I have a second set of two servers hosting different websites, can I have the servers behind the same load balancer? Currently the LB is set up to do round robin, and when I do try to do this when I hit the site abc.com sometimes it will just show the default webpage from one of the servers C or D.

4
  • Is your load balancer a layer 4 or layer 7 load balancer?
    – krowe
    Sep 19, 2013 at 14:14
  • @krowe - I think it is Layer 7. Im not sure though. It is a rackspace cloud load balancer.
    – bretterer
    Sep 19, 2013 at 14:17
  • 1
    @bretterer I'm going to spin up a few servers and LBs and see if I can figure out the proper config for you. Sep 19, 2013 at 16:42
  • We run two load balancers (redundant failovers to avoid single point of failure). Then we just assign several Virtual IP addresses to balance between servers. If you only have one IP address for your lb... you must do layer 7 LB and SSL gets tricky. With that said, our load balancers are homegrown... so we have some flexibility. a simple linux vps with LVS or HAProxy could be fine for a load balancer. Sep 19, 2013 at 22:58

2 Answers 2

2

I confirmed that Rackspace's Cloud Load Balancer does not currently support the idea of multiple services behind 1 instance (routing based on host header). You'd either need:

  1. all nodes to serve up all websites
  2. separate LB instances for each pool of applications/sites
2

it all depends on the type of the load balancer. but in general yes - it's doable.

for instance nginx can handle multiple vhosts and have separate configurations for each of them. keep one thing in mind - if both sites will require https [not just http] - you'll need separate ip address for each of the ssl-enabled sites. otherwise single ip for multiple sites will work just fine [as long as the requests can be routed based on different dns names].

you can find nginx-specific example for multiple vhosts here, and for load balancing - here.

even more complicated load balancing scenarios are possible. for instance one where the balancer routes the traffic so server a handles abc.com, def.com, server b - abc.com, def.com, uvw.com, c - uvw.com, xyz.com and so on.

1
  • OP is asking about Rackspace Cloud Load Balancers, not LBs in general. Sep 19, 2013 at 21:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .