LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-21-2016, 02:30 AM   #16
ravishchugh
Member
 
Registered: Sep 2015
Posts: 54

Original Poster
Rep: Reputation: 0

http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster

Sir this seems like a viable solution.

what do you think?
 
Old 04-21-2016, 02:33 AM   #17
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi,

No trouble, we all here to share and get some knowledge.

Let's try to build it by pieces.
First install postgres on two machines.
Then make those two instances to replicate to each other (master replicates to slaves).
See if you can easily reverse the master and slave roles.

Then, try to build HA pgsql resource, and see if the master and slave roles can be switched when HA fail over.

I am sorry, to just be theoretical, but as I said I never had to do that before.
So I am just sharing the path I would have followed.
 
Old 04-21-2016, 02:49 AM   #18
ravishchugh
Member
 
Registered: Sep 2015
Posts: 54

Original Poster
Rep: Reputation: 0
Sir, replication of pgsql will be with or without linux HA RA??
 
Old 04-21-2016, 03:00 AM   #19
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Without.
 
Old 04-21-2016, 03:21 AM   #20
ravishchugh
Member
 
Registered: Sep 2015
Posts: 54

Original Poster
Rep: Reputation: 0
Thanx sir,

Ill try and follow your instructions and will keep you updated.

Regards
 
Old 04-21-2016, 04:46 AM   #21
ravishchugh
Member
 
Registered: Sep 2015
Posts: 54

Original Poster
Rep: Reputation: 0
http://dalibo.github.io/PAF/Quick_Start-CentOS-6.html
https://wiki.postgresql.org/images/0/07/Ha_postgres.pdf

Hi sir,

I read about the PostgreSQL failover in the above mentioned links and have one doubt.

In my scenario, there are 2 different machines running the same software and both are getting input from same source. They both are updating their respective SQL DBs with the output values of the software.

How will this scenario fit in with the above mentioned methods?
If the standby DB is getting only the replicated data from main DB then where will the software output of standby will be stored. Or, will the standby software will not be working at all till failover occurs.

regards
 
Old 04-21-2016, 08:51 AM   #22
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi,

I am sorry, but I have no idea of what does and how operates the "software" you are mentioning.

Can you try to describe, with some details, how your solution works without failover mechanism?
My understanding is that you have apache and postgres.The user interacts from his browser ; when apache sees the requests, some codes {maybe PHP} make it interacts with the database {here Postgres}, builds a response and sends it back to the user browser.
 
Old 04-21-2016, 09:03 AM   #23
ravishchugh
Member
 
Registered: Sep 2015
Posts: 54

Original Poster
Rep: Reputation: 0
The software takes inout from a GPS and other sensors and calculates lat and long and stores it in SQL database. There will be a webpGe which will keep showing these values to the client after fetching from DB.
 
Old 04-21-2016, 09:16 AM   #24
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi,

That is fine.

With 2 clustered machines for HA, to which of them the GPS and the sensors are connected?
Or you also have the whole duplicated and attach independently to each machine?

If the GPS and sensors are isolated from the 2 clustered machines, you can have your software write to the active database by accessing it through the floating IP address the cluster avails.
 
Old 04-21-2016, 09:21 AM   #25
ravishchugh
Member
 
Registered: Sep 2015
Posts: 54

Original Poster
Rep: Reputation: 0
Sir, the gps and sensors are isolated from the machines but their outpUTS are fanned out and given to the 2 machines via RS 232. They are then given as inputs to the software and the output is to be stored in the SQL DB from where they are to be queried on a webpage.
The idea is that there is no lag when one machine goes down and when it comes up, it has previous entries available from standby machine for the time gap that it was down.The DB of the downed machine needs to be updated automatically from the active machine as soon as it starts back.

Last edited by ravishchugh; 04-21-2016 at 09:22 AM.
 
Old 04-21-2016, 10:39 AM   #26
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
So get the application store output to the database by its floating ip.
 
Old 04-21-2016, 10:41 AM   #27
ravishchugh
Member
 
Registered: Sep 2015
Posts: 54

Original Poster
Rep: Reputation: 0
Sir, i didnt quite get what u wanted to tell me
 
Old 04-21-2016, 10:55 AM   #28
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi,

I do supposed your application set a kind of connection to the database in order to be able to store data in the database.
Generally that kind connection has a parameter called sever or host in which you put the database server ip address.
Put in there the floating ip address that the HA will use for the pgsql resource.
 
Old 04-21-2016, 11:23 AM   #29
ravishchugh
Member
 
Registered: Sep 2015
Posts: 54

Original Poster
Rep: Reputation: 0
But how will the main machine, which has recovered from a shutdown, will get back the lost entries which will be needed for future results?
 
Old 04-21-2016, 11:49 AM   #30
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi,

My understanding is that those entries are supposed to be in the database.
 
  


Reply

Tags
database, replication



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: High Availability - Real Time Data Replication Across Multiple Nodes using GlusterFS On Centos LXer Syndicated Linux News 0 05-22-2013 07:01 PM
LXer: How To Install Repcached (Memcached Replication) For High-Availability Over 2 Nodes On Ubuntu LXer Syndicated Linux News 0 09-30-2011 12:30 PM
How to build a redundant, high-availability File Server system manya Linux - Server 3 03-24-2010 05:07 AM
[SOLVED] Linux high performance and high availability clustering Blue_Ice Linux - Software 2 03-27-2009 04:49 AM
Replication + High Availability !! varungupta_82 Linux - General 0 02-28-2004 01:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration