![background image](http://html1.mh-extra.com/html/oracle/5-0/5-0_reference-manual_16461962578.webp)
Mysqlnd replication and load balancing plugin (
mysqlnd_ms
)
2558
• PHP 5.4.0 or newer: transaction aware when using API calls only to control transactions.
• Weighted load balancing: servers can be assigned different priorities, for example, to direct more
requests to a powerful machine than to another less powerful machine. Or, to prefer nearby
machines to reduce latency.
• Global transaction ID
• Client-side emulation. Makes manual master server failover and slave promotion easier with
asynchronous clusters, such as MySQL Replication.
• Support for built-in global transaction identifier feature of MySQL 5.6.5 or newer.
• Supports using transaction ids to identify up-to-date asynchronous slaves for reading when
session consistency is required.
• Throttling: optionally, the plugin can wait for a slave to become "synchronous" before continuing.
• Service and consistency levels
• Applications can request eventual, session and strong consistency service levels for connections.
Appropriate cluster nodes will be searched automatically.
• Eventual consistent MySQL Replication slave accesses can be replaced with fast local cache
accesses transparently to reduce server load.
• Partitioning and sharding
• Servers of a replication cluster can be organized into groups. SQL hints can be used to manually
direct queries to a specific group. Grouping can be used to partition (shard) the data, or to cure the
issue of hotspots with updates.
• MySQL Replication filters are supported through the table filter.
20.7.6.2. Limitations
Copyright 1997-2012 the PHP Documentation Group. [2230]
The built-in read-write-split mechanism is very basic. Every query which starts with
SELECT
is
considered a read request to be sent to a MySQL slave server. All other queries (such as
SHOW
statements) are considered as write requests that are sent to the MySQL master server. The build-in
behavior can be overruled using
SQL hints
, or a user-defined
callback function
.
The read-write splitter is not aware of multi-statements. Multi-statements are considered as one
statement. The decision of where to run the statement will be based on the beginning of the statement
string. For example, if using
mysqli_multi_query
to execute the multi-statement
SELECT id FROM
test ; INSERT INTO test(id) VALUES (1)
, the statement will be redirected to a slave server
because it begins with
SELECT
. The
INSERT
statement, which is also part of the multi-statement, will
not be redirected to a master server.
Note
Applications must be aware of the consequences of connection switches that
are performed for load balancing purposes. Please check the documentation on
connection pooling and switching
,
transaction handling
,
failover
load balancing
and
read-write splitting
.
20.7.6.3. On the name
Copyright 1997-2012 the PHP Documentation Group. [2230]
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...