server_id in my.cnf for xtradb cluster

397 views
Skip to first unread message

Gil McGrath

unread,
Sep 16, 2012, 10:51:06 AM9/16/12
to percona-d...@googlegroups.com
The percona cluster setup documentation for HA config using haproxy shows using a separate server_id per cluster node in its setup.

I did  quick test and setup a two node cluster (I know two nodes is not good, but this is a test) with both nodes having server_id=1. The cluster came up and sync'd. I did not see any errors anywhere.

So my question is: Is a separate server_id per node really required for xradb cluster?

I hope the answer is no, because this would allow me to define a single chef role for the nodes of a single cluster. FYI - I use ohai data in chef recipe to generate unique node names, but generating a unique server_id is problematic.

Jay Janssen

unread,
Sep 17, 2012, 7:56:10 AM9/17/12
to percona-d...@googlegroups.com

On Sep 16, 2012, at 10:51 AM, Gil McGrath <mcgra...@gmail.com> wrote:

So my question is: Is a separate server_id per node really required for xradb cluster?

No, server-id is not used by PXC for cluster replication.  It *can* be used to slave into or out of the cluster, but it is not a requirement.

Jay Janssen, Senior MySQL Consultant, Percona Inc.
Percona Live in NYC Oct 1-2nd: http://www.percona.com/live/nyc-2012/

Gil McGrath

unread,
Sep 17, 2012, 8:03:42 AM9/17/12
to percona-d...@googlegroups.com
Thanks for quick reply.

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Percona Discussion" group.
To post to this group, send email to percona-d...@googlegroups.com.
To unsubscribe from this group, send email to percona-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/percona-discussion?hl=en.

seppo....@codership.com

unread,
Sep 17, 2012, 8:05:23 AM9/17/12
to percona-d...@googlegroups.com
..and if xtradb cluster is used as a master for MySQL replication
slave(s), you should set same server_id for all xtradb cluster nodes.
The MySQL slaves should see the whole cluster as a single MySQL master
server.

-seppo
Reply all
Reply to author
Forward
0 new messages