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