Oracle 5.0 Reference Manual page 2614

Table of Contents

Advertisement

• eventual consistency, no further options set: all masters, all slaves
• session consistency, no further options set: all masters
• strong consistency (no options allowed): all masters
Throttling
The quality of service filter can be combined with
does reduce the write load on the master by slowing down clients. If session consistency is requested
and global transactions idenentifier are used to check the status of a slave, the check can be done in
two ways. By default a slave is checked and skipped immediately if it does not match the criteria for
session consistency. Alternatively, the plugin can wait for a slave to catch up to the master until session
consistency is possible. To enable the throttling, you have to set
option.
20.7.6.5.10. Global transaction IDs
Copyright 1997-2012 the PHP Documentation Group. [2230]
Idea and client-side emulation
PECL/mysqlnd_ms can do client-side transparent global transaction ID injection. In its most basic form,
a global transaction identifier is a counter which is incremented for every transaction executed on the
master. The counter is held in a table on the master. Slaves replicate the counter table.
In case of a master failure a database administrator can easily identify the most recent slave for
promiting it as a new master. The most recent slave has the highest transaction identifier.
Application developers can ask the plugin for the global transaction identifier (GTID) for their last
successful write operation. The plugin will return an identifier that refers to an transaction no older than
that of the clients last write operation. Then, the GTID can be passed as a parameter to the quality
of service (QoS) filter as an option for session consistency. Session consistency ensures read your
writes. The filter ensures that all reads are either directed to a master or a slave which has replicated
the write referenced by the GTID.
When injection is done
The plugin transparently maintains the GTID table on the master. In autocommit mode the plugin
injects an
UPDATE
transaction mode, the injection is done before the application calls
The configuration option
control whether a failed injection shall abort the current operation or be ignored silently (default).
Please note, the PHP version requirements for
Limitations
Client-side global transaction ID injection has shortcomings. The potential issues are not specific to
PECL/mysqlnd_ms but are rather of general nature.
Mysqlnd replication and load balancing plugin (mysqlnd_ms)
Version requirement
Client side global transaction ID injection exists as of mysqlnd_ms version
1.2.0-alpha. Transaction boundaries are detected by monitoring API calls. This
is possible as of PHP 5.4.0. Please, see also
As of MySQL 5.6.5-m8 the MySQL server features built-in global transaction
identifiers. The MySQL built-in global transaction ID feature is supported by
PECL/mysqlnd_ms 1.3.0-alpha or later. Neither are client-side transaction
boundary monitoring nor any setup activities required if using the server feature.
statement before executing the users statement for every master use. In manual
report_error
Global transaction IDs
of the GTID section in the plugins configuration file is used to
transaction boundary monitoring
2594
to throttle clients. Throttling
wait_for_gtid_timeout
configuration
Transaction
handling.
to close a transaction.
commit()
and their limits.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents