|
From: Michael P. <mic...@gm...> - 2012-10-25 00:21:32
|
On Thu, Oct 25, 2012 at 6:40 AM, Paulo Pires <pj...@ub...> wrote: > Hi, > > Summing, I've found Postgres-XC to be quite easy to install and > configure in a 3 coordinators + 3 data-nodes (GTM all over them and > GTM-Proxy handling HA). A little Google and command-line did the trick > in *a couple hours*! > > Now, the only downside for me is that Postgres-XC doesn't have a > built-in way of load-balancing between coordinators. If the coordinator > your app is pointing to goes down, your app goes down - your application > can target all of them, but in my experience, your application will > *always* target a host. So, ATM my solution is: > 1) Define a DNS FQDN like coordinator.mydomain pointing to an IP > (i.e., 10.0.0.1) > 2) Point my app to work with that FQDN > 3) On every coordinator, configure keepalived with one shared-IP > (10.0.0.1) > 4) Install haproxy in every coordinator and have it load-balance with > the other coordinators > > This way, keep-alived will always choose the first coordinator (based on > its priority) and then haproxy (running on that machine) will > load-balance with others. If this coordinator goes down, the second host > in keepalived priority list will replace it and not only is it a valid > coordinator, but also it will be able to load-balance with other > coordinators. > This looks like a possible solution trying to achieve load balancing easily at Coordinator level. You could also publish a small utility for the XC community based in your experience. That is only a suggestion to help community, please understand that I do not force you publishing anything of course. > My only doubt is, if you get a data-node offline and then bring it up, > will the data in that data-node be synchronized? > If the Datanode becomes offline for a certain reason, all the transactions that should have run on it will fail at Coordinator level, so there is no worries here about data synchronization normally. It is btw recommended to have a standby node behing the one that failed if the Datanode that failed cannot be recovered for a reason or another. > And that's it. I'm in now way a DB-expert and I felt quite confused by > reading the previous thread. But as a developer, Postgres-XC has been a > huge upgrade for me. (Now, if only RETURN ID was to be implemented, mr. > Abbas ;-)). > +1. Looking forward to seeing this feature ;-o > Sorry for being a little off-topic, but wanted to share my _little_ > experience with this wonderful piece of software. > Thanks, I am convinced it is helpful for a lot of people -- Michael Paquier http://michael.otacoo.com |