How do I identify which MySQL slave has responded?

Posted by Kynth on Stack Overflow See other posts from Stack Overflow or by Kynth
Published on 2010-03-25T15:40:49Z Indexed on 2010/03/25 15:43 UTC
Read the original article Hit count: 178

Filed under:

I have a MySql Master server replicating to three Slaves.

A legacy website is performing load-balanced Reads from the Slaves.

Is there a method of identifying from the website which of the Slaves is serving a Read request?

I'd prefer a function that I can use to return a server name or ip address as part of the SELECT, but any reasonable method will do.

Thank you in advance.

© Stack Overflow or respective owner

Related posts about mysql