Help me find a suitable replication solution
Help me find a suitable replication solution
От:
"Yuan HOng" <hongyuan1306@gmail.com>
Дата:
Sorry I forgot the subject. Hi, list, Can you give me some suggestions as to what replication solution best suits my situation: I have an online product sales applicaiton, which is split between two sites. The web front-end sits at the ISP's data center and accepts customer order. The server in the office handles the product lisitng, order processing and also takes ordres on telephone. The two sites are linked over Internet using ADSL, i.e. not high bandwidth. Due to high Internet cost here, it would be infeasible to move the two servers together. For the production information tables, they will be solely maintained inhouse, and will be synced to the web server. I have been using Slony-I for this. But for ordre and customer information, since both sites shall update these tables, and the link is over a WAN, it seems the most appropriate replication solution would be a multi-master, asynchronous solution. I have done a quick research on the current PostgreSQL replication solutions: Slony-I, PGPool(-I and -II), PGCluster, and none of them seems to fit exactly my situaiton: Slony-I is only single master. The only possible way to use it would be to use a separate table for order on web server and replicate it back to inhouse server. But then I have two tables for order, which will make the applicate much complicated. PGPool is used primarily for connection poolling. It can do synchronous replication on database level by sending the SQL commands to 2 servers. But since the WAN connection is not stable, if the connection is down for a while, the replication will be broken and I don't think PGPool can resync the two databases automatically. PGCluster is similar to PGPool in being a synchronous replication solution. I thinks it would only be useful for a LAN situation. Over a WAN, if the link is broken, I think it would also be impossible for it to resume replication. Also, it seems I can only replicate the whole database, not the selected tables. Finding no suitable soluiton for my case, I am wondering whether I have made a mistake in my database design. Havent' others experienced similiar situation as I do? Or do I have some misunderstanding of the capabilities of the existing solutions? Am I overlooking something? It seems Slony-II would be quite promising, but I can't wait that long. What is the best choice for me now? Thanks for helping! -- Hong Yuan 大管家网上建材超市 装修装潢建材一站式购物 http://www.homemaster.cn
Re: Help me find a suitable replication solution
От:
Chris Browne <cbbrowne@acm.org>
Дата:
hongyuan1306@gmail.com ("Yuan HOng") writes:
> It seems Slony-II would be quite promising, but I can't wait that
> long. What is the best choice for me now?
Worth noting: Slony-II would never have been suitable, as it would
have required that all the "master" servers be in the same data
centre.
I don't think you have an easy answer here...
--
select 'cbbrowne' || '@' || 'cbbrowne.com';
http://cbbrowne.com/info/internet.html
(THASSERT (PLANNER RG))
-- Example of HACKER statement.
Re: Help me find a suitable replication solution
От:
Andrew Sullivan <ajs@crankycanuck.ca>
Дата:
On Tue, Jul 03, 2007 at 08:15:35AM +0800, Yuan HOng wrote: > sites shall update these tables, and the link is over a WAN, it seems > the most appropriate replication solution would be a multi-master, > asynchronous solution. Yes, that would be best. > be to use a separate table for order on web server and replicate it > back to inhouse server. But then I have two tables for order, which > will make the applicate much complicated. Yep. > Finding no suitable soluiton for my case, I am wondering whether I > have made a mistake in my database design. Havent' others experienced > similiar situation as I do? Or do I have some misunderstanding of the > capabilities of the existing solutions? Am I overlooking something? There simply isn't anything that implements this now. It's possible to bodge it up using Slony, as you point out, but that makes things more complicated. If you need this now, though, that's your only option AFAIK. A -- Andrew Sullivan | ajs@crankycanuck.ca Unfortunately reformatting the Internet is a little more painful than reformatting your hard drive when it gets out of whack. --Scott Morris