|
From: Michael P. <mic...@gm...> - 2013-10-06 13:40:02
|
On Sun, Oct 6, 2013 at 7:45 PM, Yehezkel Horowitz <hor...@ch...> wrote: > Second, I allow myself suggest you to consider some conventions for your > mailing list (as example cUrl’s Etiquette: > http://curl.haxx.se/mail/etiquette.html) as it is quite hard to follow > threads in the archive. This is rather interesting. Thanks for pointing to that! > My goal – I have an application that needs SQL DB and must always be up (I > have a backup machine for this purpose). Have you thought about PostgreSQL itself for your solution. Is there any reason you'd need XC? Do you have an amount of data that forces you to use multi-master architecture or perhaps PG itself could handle it? > I plan to deploy as follow: > Machine A: 1 Datanode, 1 Coordinator, 1 GTM proxy, 1 GTM > Machine B: 1 Datanode, 1 Coordinator, 1 GTM proxy, 1 GTM-slave > > Both machines have my application installed on, and the clients of my > application will connect to the working machine (in normal case, they can > connect to either one of them with simple load-balancer, hence I need > multi-master replication). So all your tables will be replicated. > If I understand correctly, in case of failure in Machine A, I need to > promote the GTM-slave to become GTM master, and reconnect the GTM proxy - > all this could be done in Machine B. Right? Yep, this is doable. If all your data is replicated you would be able to do that. However you need to keep in mind that you will not be able to write new data to node B if node A is not accessible. If you data is replicated and you need to update a table, both nodes need to work. Or if you want B to be still writable, you could update the node information inside it, make it workable alone, and when server A is up again recreate a new XC node from scratch and add it again to the cluster. > My questions: > > 1. In your docs, you always put the GTM in dedicated machine. > a. Is this a requirement, just an easy to understand topology or best > practice? GTM consumes a certain amount of CPU and does not need much RAM, while for your nodes you might prioritize the opposite. > b. In case of best practice, what is the expected penalty in case the > GTM is deployed on the same machine with coordinator and datanode? CPU resource consumption and reduction of performance if your queries need some CPU with for example internal sort operations among other things. > c. In such deployment, is there a need for GTM proxy on this machine? This is actually a good question. GTM proxy is here to reduce the amount of data exchanged between GTM and the nodes. So yes if you have a lot of concurrent sessions in the whole cluster. > 2. What should I do after Machine A is back to life if I want: > a. Make it act as a new slave? > b. Make it become the master again? There is no principle of master/slave in XC like in Postgres (well you could create a slave node for an individual Coordinator/Datanode). But basically in your configuration machine A and B have the same state. Only GTM is a slave. Regards, -- Michael |