Syncing MySql DB across different servers

Scenario: DB hosted on Server 1, Server 1 goes down

Client can access info in DB on Server 2 review/add/change - Server 2 syncs with Server 1 and vice-versa

Easy/difficult/impossible for a non expert MySql user.

D


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I sholuld add that I have Navicat and I suspect that it may well be capable of this but if anyone has first hand experience - any method - it would be useful.

D


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You can set up two MySQL servers to synch with one another. It is not something you can configure using Navigat, but rather you need access to the my.cnf file on each server to make the initial settings, and then you need to issue some SQL queries and then restart both of the servers a few times to get it to hook up correctly. One server becomes the master, and the other becomes a slave. The master server writes to itself first, then sends the same query to the slave. It’s a near-real-time backup, in other words. If the master fails, there is no automatic “fail-over” here – you have to change your application configuration to have it redirect queries to the slave while you get the master working again.

I imagine that if you set up such a master/slave setup, you could then hide it behind a round-robin load balancer, but I’m not sure how that would work exactly. If you write to the slave instead of the master, I don’t know if it would propagate those changes back to the master.

I am sure there must be a way to set this up so that the reads and writes are synchronized, regardless of how the traffic flows, but I haven’t seen a good example of this before.

Let me ask you this – what would cause the database server to stop working? Are you concerned about hardware failure, DDOS, what exactly?

Walter

On Oct 10, 2013, at 4:08 PM, DeltaDave wrote:

I sholuld add that I have Navicat and I suspect that it may well be capable of this but if anyone has first hand experience - any method - it would be useful.

D


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Let me ask you this — what would cause the database server to stop working?

I have a client that requires 24/7 access to their DB and my current host (who shall remain nameless) has had far too many outages recently leaving them high and dry.

They can live without email for short periods (there is always texting) but DB access is crucial.

I could move hosting but what is to say that the next host will provide 100% uptime.

D


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Anyone who promises you 100% uptime is frankly kidding themselves or lying to you, or some combination of the two. Even Amazon goes down, sometimes for hours, sometimes for a day, but I have never heard of them going down on both coasts simultaneously. So if you really need to put a big band-aid on this problem, and keep your client from freaking out any more, I suggest you take a look at Amazon AWS RDS (Relations Database Service). You pay by the hour. They have a transparent failover setup ready to use – all you do is pay for one server in one locale, and another in another locale, and they make the magic happen automatically.

Walter

On Oct 10, 2013, at 4:27 PM, DeltaDave wrote:

Let me ask you this — what would cause the database server to stop working?

I have a client that requires 24/7 access to their DB and my current host (who shall remain nameless) has had far too many outages recently leaving them high and dry.

They can live without email for short periods (there is always texting) but DB access is crucial.

I could move hosting but what is to say that the next host will provide 100% uptime.

D


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I don’t expect 100% uptime - I know that is unrealistic.

But over the past 6 months this server has gone down as often as twice a week - without reasonable explanation.

It may only be for an hour or so at a time but often it has been at peak times for their business.

I need to offer my client at the very least a back up plan.

D


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Okay, you could put a single micro server on the West coast (avoid Northern Virginia – they’re the ones who go down every now and again lately) for $23 to start and $0.016 per hour ($140.16/year) for a total of $163.16 a year, or $13.60 per month. That just hosts the database, nothing else. Putting your database egg in one basket, and your Web hosting in another would reduce the load on your Web server and provide quite a bit of resiliency. Most Web applications can shift the location of their database server by changing one configuration file. Since you can host a basic Web site for $5/month or less, you could put up several different servers with the same PHP and HTML, and switch between them either with a load balancer or a simple DNS control panel if there should be a problem with one. Take a look at Digital Ocean for cheap VPS servers if you want to go this route. And please use my referral code there, as it puts money in the kitty for ActionsForge! DigitalOcean | Cloud Hosting for Builders

Walter

On Oct 10, 2013, at 5:48 PM, DeltaDave wrote:

I don’t expect 100% uptime - I know that is unrealistic.

But over the past 6 months this server has gone down as often as twice a week - without reasonable explanation.

It may only be for an hour or so at a time but often it has been at peak times for their business.

I need to offer my client at the very least a back up plan.

D


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Walter - I will have a look at Digital Ocean

D


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options