Hi David,
I have a production env like this one :
5 web servers running the same java web app, behind a load balancer.
2 database servers
Currently, the database servers are running in a fail over
configuration : only a single
server is used, the other is just there is something wrong happens.
Because we will migrate this to a master-master (mysql) replication
design, I will need
to load balance the queries on the two instances.
If you really want to use MySQL multimaster replication (NDB tables I
suppose), then you could maybe just use a smart connection pool on the
app. side (would just provide connection balancing not query level, but
that might be enough on a 2 nodes system).
How can I achieve this with Sequoia ? I've read a kind of
configuration, called
ParallelDB exists but is not well tested and there is no example in
the sequoia
distribution of this (only singleDB).
Yes, you can achieve this with ParallelDB. As the consistency is ensured
by the database, you don't need any recovery log or group communication
for the controllers. The configuration is really similar to SingleDB
except that the load balancer is called ParallelDB. I'll try to add an
example for the next release.
My questions are :
- is parallelDB strong enough to be used in a quite heavily stressed
production env ?
The code is really straightforward so that should not be a big issue.
However you might want to evaluate the benefits of the load balancing
against the overhead induced by going through the controller.
- is there any example of this kind of configuration ?
I did not see any in the doc/examples directory but it is easy to build
one from the other configurations. Just use a RequestManager definition
like:
<RequestManager>
<RequestScheduler>
<SingleDBScheduler level="passThrough"/>
</RequestScheduler>
... cache definitions if you need some here ...
<LoadBalancer>
<ParallelDB>
<ParallelDB-LeastPendingRequestsFirst/>
<ParallelDB/>
</LoadBalancer>
- do I miss something that can be used to solve my problem (any other
way to do this) ?
You could use Sequoia with RAIDb-1 on top of regular MySQL backends (no
need to switch to NDB). Sequoia would provide you with the multimaster
replication.
Just to understand a little bit well how Sequoia can be used, let's
imagine this architecture :
2 servers running each one a read only DB instance (which can be a
slave in a replication
scheme).
Is it possible in this particular condition (2 read only instances,
no sequoia
replication, just LB) to use only the load balancing feature
(parallelDB) this way :
A controller (Ca), managing the two instances, is deployed on server
A
Another controller (Cb) is deployed on server B, managing the same
two instances
Ca and Cb are redundant and the controller layer isn't a single point
of failure.
If you use ParallelDB, you can collocate a controller instance with each
web server if you wish. Note that you can also only have 2 controllers
and let the Sequoia driver perform transparent failover between these
instances in case of failures.
Hope this helps,
Emmanuel
--
Emmanuel Cecchet
Chief Scientific Officer, Continuent
Blog: http://emanux.blogspot.com/
Open source: http://www.continuent.org
Corporate: http://www.continuent.com
Skype: emmanuel_cecchet
Cell: +33 687 342 685
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia