Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Nov 21, 2013 5:06 pm 
Offline
Newbie

Joined: Thu Nov 21, 2013 4:53 pm
Posts: 4
Is does not seem possible to configure the NodeBalancer to forward to different servers based on URL path. This would be a super-convenient feature. I know you can create different balancing rules based on port, but I'd like to also setup different balancers on the same domain name based on URL path.

For example, I'd like to be able to use the nodebalancer to send traffic from www.example.com/blog to one set of internal servers and traffic to www.example.com/app to another set of servers.

Any chance we could set that up? Alternatively I'd have to setup and maintain my own balancer.

Thanks


Top
   
PostPosted: Thu Nov 21, 2013 5:36 pm 
Offline
Senior Member
User avatar

Joined: Thu Feb 16, 2012 9:01 pm
Posts: 52
for a loadbalancer to distribute load it actually shouldn't incur too much load itself. Adding features like this and ssl just make a shared nodebalancer do more and therefore reduces their capacity.

Perhaps you should use all your servers for app and blog. It will give you better fault tolerance anyway.

Alternately you can use different domains and use two nodebalancers, but I assume you knew that already.

Hey just my thoughts. no need to give them any serious consideration :-)


Top
   
PostPosted: Thu Nov 21, 2013 5:40 pm 
Offline
Junior Member

Joined: Sun Jun 24, 2012 4:27 pm
Posts: 29
You could achieve the same effect by using subdomains.


Top
   
PostPosted: Thu Nov 21, 2013 5:41 pm 
Offline
Newbie

Joined: Thu Nov 21, 2013 4:53 pm
Posts: 4
Routing by URL isn't really that much work and tools like haproxy, nginx and apache have no problem balancing by URL. I assume Linode is using something like those tools under the covers, so it shouldn't be impossible to add that feature.

For SEO purposes I specifically want to use a single domain. The two backend servers make up a single application from the user's perspective.


Top
   
PostPosted: Thu Nov 21, 2013 5:46 pm 
Offline
Junior Member

Joined: Sun Jun 24, 2012 4:27 pm
Posts: 29
Search engines are intelligent enough to recognise that blog.example.com and app.example.com are a part of the same domain. From an SEO perspective, there's virtually no difference.


Top
   
PostPosted: Thu Nov 21, 2013 6:27 pm 
Offline
Newbie

Joined: Thu Nov 21, 2013 4:53 pm
Posts: 4
@bacon: that's not quite true, and it doesn't matter for this conversation. Its a feature request and there are legitimate reasons to want to do it.


Top
   
PostPosted: Thu Nov 21, 2013 7:45 pm 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
jpollak_al wrote:
Routing by URL isn't really that much work and tools like haproxy, nginx and apache have no problem balancing by URL. I assume Linode is using something like those tools under the covers, so it shouldn't be impossible to add that feature


I wouldn't assume that at all. I've always guessed hardware load balancer, which may or may not be able to do that kind of thing.


Top
   
PostPosted: Thu Nov 21, 2013 8:07 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
jpollak_al wrote:
For example, I'd like to be able to use the nodebalancer to send traffic from http://www.example.com/blog to one set of internal servers and traffic to http://www.example.com/app to another set of servers.

How is that NODE balancing? Subdomains were invented for just that purpose.

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
PostPosted: Fri Nov 22, 2013 12:14 pm 
Offline
Newbie

Joined: Thu Nov 21, 2013 4:53 pm
Posts: 4
glg wrote:
jpollak_al wrote:
Routing by URL isn't really that much work and tools like haproxy, nginx and apache have no problem balancing by URL. I assume Linode is using something like those tools under the covers, so it shouldn't be impossible to add that feature


I wouldn't assume that at all. I've always guessed hardware load balancer, which may or may not be able to do that kind of thing.


You may be right, in which case this request would be difficult to fulfill.

vonskippy wrote:
jpollak_al wrote:
For example, I'd like to be able to use the nodebalancer to send traffic from http://www.example.com/blog to one set of internal servers and traffic to http://www.example.com/app to another set of servers.

How is that NODE balancing? Subdomains were invented for just that purpose.


You can node balance /blog to servers A and B, and node balance /app to servers C and D. A single Linode node balancer lets you balance port 80 to servers A and B and port 81 to servers C and D, I'm just requesting the same operation with subdirectories.

Re: subdomains, I refer you back to my previous answers. I suggest you search for "subdomains vs subdirectories" online and come to your own conclusion. I've read a lot and I don't have a definitive answer on the technical merits since there isn't one, but I know what I'd like my user's experience to be.


Top
   
PostPosted: Sat Dec 14, 2013 10:39 pm 
Offline
Junior Member

Joined: Sat Mar 21, 2009 3:45 am
Posts: 48
I think it is a perfectly valid requirement. Why should the interface presented to users be dictated by lazy sysadmins?

That said, there are other ways of making this work.

How I approached this in the past:

Node Balancer sending all requests to one VM running nginx and using nginx to distributed load against other app servers using whatever policy I wanted. If that VM died, all my other app servers were running nginx with the same config, so the node balancer would steer traffic to another box and carry on as usual. The load from nginx proxying/load balancing requests was never enough of an issue to do anything differently, but if it got to be a problem, I figured I'd just migrate that function to a couple of dedicated VMs


Top
   
PostPosted: Sun Dec 15, 2013 9:20 am 
Offline
Senior Member

Joined: Mon Jan 02, 2012 12:45 pm
Posts: 365
This isn't a permanent solution, but it is a workaround that will allow you to redirect traffic to different servers based on subdirectories.

- set up your DNS to use subdomains (just like vonskippy suggested).
- set up mod_alias or mod_rewrite on each server to check for a specific subdirectory (eg, yourdomain.com/send-to-a) and redirect it to a.yourdomain.com.
- if you want you can have your vhost file on server A point to a folder named yourdomain.com (if you don't want your target folders named differently, such as a.yourdomain.com, b.yourdomain.com, etc).
- you can also use mod_alias or mod_rewrite on the target server (in this case it would be server A) to map a.yourdomain.com to yourdomain.com/a (maintaing the same code base on all servers would allow for using the server to support other subdir/subdomain destinations in case of maintenance or downtime on the desired server).

Not a 'node balancer' based solution, but it will redirect things to where you want them to go based on a subdirectory or subdomain.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group