Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: NodeBalancer Private IPs
PostPosted: Fri Aug 19, 2011 1:15 pm 
Offline
Junior Member

Joined: Wed Jul 27, 2011 8:34 pm
Posts: 31
Website: http://eschercms.org
The new NodeBalancer service looks great, but I need to balance internal services (eg., database reads) in addition to public services (eg. http).

If I still have to set up my own load balancing for internal services, then NodeBalancers aren't really worth using because they don't reduce complexity significantly.

If NodeBalancers were to support private IPs and balancing of internal services, then I could eliminate all custom load balancing and do it all with NodeBalancers - and pay Linode more money! ;)

Please add private IP support to NodeBalancers.

_________________
Got Escher? | @artagesw


Top
   
 Post subject:
PostPosted: Fri Aug 19, 2011 7:09 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
This is off-topic, but how are you handling this now? I've been thinking of doing something more intelligent than random.choice(), but I apparently forgot that database connections are TCP-based and can be load-balanced. Durp.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Fri Aug 19, 2011 7:16 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
For the meantime, you can configure your services via IPv6 and you'll get the same effect.

EDIT: Actually, I take that back. IPv6 on the back-end isn't implemented yet. Nevermind me! We'll be discussing this next week - thanks :)

-Chris


Top
   
 Post subject:
PostPosted: Fri Aug 19, 2011 9:16 pm 
Offline
Junior Member

Joined: Wed Jul 27, 2011 8:34 pm
Posts: 31
Website: http://eschercms.org
Thanks Chris!

_________________
Got Escher? | @artagesw


Top
   
 Post subject:
PostPosted: Wed Sep 14, 2011 10:13 am 
Offline
Newbie

Joined: Wed Sep 14, 2011 10:05 am
Posts: 2
Any update on private IPs for NodeBalancers? I'm hoping to load balance MySQL Cluster front-ends, and while this can be done with the public IP and firewalls, won't the traffic count toward bandwidth usage?

Thanks!


Top
   
 Post subject:
PostPosted: Wed Sep 14, 2011 12:57 pm 
Offline
Newbie

Joined: Wed Sep 14, 2011 10:05 am
Posts: 2
Just realized the NodeBalancer has an IPv6 address...


Top
   
PostPosted: Thu Sep 22, 2011 9:31 am 
Offline
Senior Newbie

Joined: Thu Sep 22, 2011 9:30 am
Posts: 6
Website: http://www.brianparsons.net
AOL: mediaserf
I second the request for this feature, it would help me also!

Brian


Top
   
 Post subject:
PostPosted: Fri Sep 30, 2011 6:57 am 
Offline
Newbie

Joined: Fri Sep 30, 2011 6:54 am
Posts: 2
I triple the request. Private IPs would be great.


Top
   
 Post subject:
PostPosted: Fri Sep 30, 2011 7:21 am 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
Stupid question I guess, but, how are Linode balancers supposed to balance stateful connections like databases? You can't just round-robin via port forwarding... the "balancing" requires high-level context meaningful only for particular applications...

When you have replication, the balancing is much more complex than just deciding which channel is the "request" sent to, because there is no "request" in the http sense. Evenmoreso with ACID compliant machinery, single master, multimaster replication, statement-level replication, etc...

I don't know about MySQL, but with PostgreSQL we have WAL streaming replication and pg-pool statement-level (which in combination works wonders for fully ACID single-master writes / balanced reads), but that has to be configured on individual machines, you can't automate that via some "generic" third party node.

Or am I missing something here?


Top
   
 Post subject:
PostPosted: Fri Sep 30, 2011 7:38 am 
Offline
Newbie

Joined: Fri Sep 30, 2011 6:54 am
Posts: 2
Well, I personally won't be using NodeBalancer to balance db traffic, but I think there is a feature called session stickiness which would solve such issues.

Take a look, will you?
http://library.linode.com/linode-platfo ... stickiness


Top
   
 Post subject:
PostPosted: Fri Sep 30, 2011 7:55 am 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
jmike wrote:
Well, I personally won't be using NodeBalancer to balance db traffic, but I think there is a feature called session stickiness which would solve such issues.


That works for HTTP only because it is stateless (one request-response is independent of another at the http level), so the balancer can "stick" the client to a particular backend node because all the data to complete the request is contained in the request itself. Not so with databases.

With databases the balancer would have to:

1. Talk specific DB connection protocol
2. Know the concept of replication and how it is done for specific database software (where to send writes and where to read from, and in what conditions to replicate writes and how)
3. Be agnostic to any application-asserted sharding (which is theoretically impossible)

For example, to "loadbalance" PostgreSQL, it would basically have to be pg-pool running on a Linode, but for reads only (unless you want non-transactional writes). For transactional writes the database nodes would have to be configured for WAL streaming which can't go through a "loadbalancer", in short configuring it for individual machines renders the third party db loadbalancing redundant in this case


Top
   
 Post subject:
PostPosted: Fri Sep 30, 2011 4:52 pm 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
Azathoth wrote:
jmike wrote:
Well, I personally won't be using NodeBalancer to balance db traffic, but I think there is a feature called session stickiness which would solve such issues.


That works for HTTP only because it is stateless (one request-response is independent of another at the http level), so the balancer can "stick" the client to a particular backend node because all the data to complete the request is contained in the request itself. Not so with databases.

With databases the balancer would have to:


Why? The table stickiness in nodebalancer (the guys at my work refer to a similar thing as source IP stickiness) means that a particular source IP will always be sent to the same host.


Top
   
 Post subject:
PostPosted: Fri Sep 30, 2011 6:26 pm 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
glg wrote:
Why? The table stickiness in nodebalancer (the guys at my work refer to a similar thing as source IP stickiness) means that a particular source IP will always be sent to the same host.


So with IP's being static on LAN, how's that load balancing? One app server will always talk to the same database server? You need a load balancer to point your requests to single server?


Top
   
 Post subject:
PostPosted: Sat Oct 01, 2011 9:50 am 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
Azathoth wrote:
So with IP's being static on LAN, how's that load balancing? One app server will always talk to the same database server? You need a load balancer to point your requests to single server?


Doh, good point.

Wait, OP said database *reads*, so you wouldn't need to worry about session with that.


Top
   
 Post subject:
PostPosted: Sat Oct 01, 2011 10:06 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Hrmm... I figure that if your application can handle two database servers (a master for writes, a slave for reads), it can probably handle more than two by randomly selecting one.

If your application cannot handle the separation of writes and reads, you've got a problem. Master-master replication is OK up to a point, but scaling that up to master-master-master is not going to be happy when one of the masters breaks.

_________________
Code:
/* TODO: need to add signature to posts */


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


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
RSS

Powered by phpBB® Forum Software © phpBB Group