WRITE TO MYSQL questions

Asked by Salmon

Hi,

We hope to know more about the fail over response on the MYSQL Proxy:

--------------------
Does the Proxy require MYSQL Replication?

Does R/W split allows multi Replication masters?

How the proxy sync all the server information if it has multi-master?

When one of the MYSQL Server died, in the middle of an update query, can all the other servers sync with the same data?

When the master server failed, will it be automated sync with the latest data?

I know that we cannot replicate a slave, which has died, to the master when the slave is left behind too much, so does it the same as the proxy?

Consider this scenario:
There are 4 database servers:
Server 1 - read/write - data=1
Server 2 - read/write - data=1
Server C - read only - data=1
Server D - read only - data=1

1. Update Server 1 set data= data+1
2. Sync data=2 to all servers.
3. Update Server 2 set data= data+1
4. Sync data=3 to all servers.

5. Now Server 1 died
6. Update Server 2 set data= data+1
7. Sync data=4 to Server 2, C and D.

8. Now Server 2 died
9. Server 1 back online
10. Sync Server 1 with data=4. (Can Server 1 sync with the latest info from C or D?)

Will it be possible to be like this?

6. Update Server 2 set data= data+1
X Server 2 died
X Server 1 back online
X Update Server 1 set data= data+1
7. Sync data=4 to Server 2, C and D. (actually it should be 5)
X Server 2 back online
X Sync Server 2 with data=? (What data will be in server 2?)

--------------------
Will it lock all other MYSQL servers when there is an update on the R/W split setting?

Is there any size limit on the query side?

Will there be any overhead on updates?

How many update/insert/delete queries the Proxy can handle?

--------------------
Can I still use mysqldump to backup the database?

Can it be integrated with 3rd party MYSQL full-text search engines such as sphinx search engine?

I hope this aren't be too long.

Thank you.

Question information

Language:
English Edit question
Status:
Answered
For:
MySQL Proxy Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
fmpwizard (diego-fmpwizard) said :
#1

Hi There,

On Wed, Mar 11, 2009 at 3:23 AM, Salmon
<email address hidden> wrote:
> --------------------
> Does the Proxy require MYSQL Replication?
>
No, it does not need replication to work, but you can use it on a
replication environment.

> Does R/W split allows multi Replication masters?
>

the rw-splitting.lua script will not work out of the box with a
master-master replication, you will need to make some changes (I'm not
sure what changes)

> How the proxy sync all the server information if it has multi-master?
The proxy does not sync the masters, you can do that with a regular
Master Master replication with plain mysql

>
> When one of the MYSQL Server died, in the middle of an update query, can all the other servers sync with the same data?
>
See previous answer

> When the master server failed, will it be automated sync with the latest data?
>
See previous answer

> I know that we cannot replicate a slave, which has died, to the master when the slave is left behind too much, so does it the same as the proxy?
>
> Consider this scenario:
> There are 4 database servers:
> Server 1 - read/write - data=1
> Server 2 - read/write - data=1
> Server C - read only - data=1
> Server D - read only - data=1
>
> 1. Update Server 1 set data= data+1
> 2. Sync data=2 to all servers.
> 3. Update Server 2 set data= data+1
> 4. Sync data=3 to all servers.
>
> 5. Now Server 1 died
> 6. Update Server 2 set data= data+1
> 7. Sync data=4 to Server 2, C and D.
>
> 8. Now Server 2 died
> 9. Server 1 back online
> 10. Sync Server 1 with data=4.  (Can Server 1 sync with the latest info from C or D?)
>
> Will it be possible to be like this?
>
> 6. Update Server 2 set data= data+1
> X Server 2 died
> X Server 1 back online
> X Update Server 1 set data= data+1
> 7. Sync data=4 to Server 2, C and D. (actually it should be 5)
> X Server 2 back online
> X Sync Server 2 with data=? (What data will be in server 2?)
>
skipped

> --------------------
> Will it lock all other MYSQL servers when there is an update on the R/W split setting?
>
What do you mean?
> Is there any size limit on the query side?
>
As in the number of characters the sql query has? We have run large
queries, mostly queries from mysqldump and have not seen any problems.

> Will there be any overhead on updates?
>
It depends on what you do with the Lua script, in some cases the
overhead is very small.

> How many update/insert/delete queries the Proxy can handle?
It depends on the hardware
>
> --------------------
> Can I still use mysqldump to backup the database?
>
yes, but be careful about buffering the result sets.

if you are planning on reading the result set and modifying it, the
proxy will have to hold the whole resultset in memory, but if you do
not need to work with the result set, there will be no memory impact.

> Can it be integrated with 3rd party MYSQL full-text search engines such as sphinx search engine?
>
I have not tried it (yet?) but there should be no issues there.
> I hope this aren't be too long.
>

I hope I answered your questions :)

Thanks

Diego
> Thank you.
>
> --
> You received this question notification because you are a member of
> MySQL Proxy Discuss, which is an answer contact for MySQL Proxy.
>

--
Diego Medina
Web Developer
http://www.fmpwizard.com

Can you help with this problem?

Provide an answer of your own, or ask Salmon for more information if necessary.

To post a message you must log in.