v5:loadbalancer:mysql_replication:automatic_control
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| v5:loadbalancer:mysql_replication:automatic_control [2016/10/12 04:16] – created mnewnham | v5:loadbalancer:mysql_replication:automatic_control [2017/04/29 04:01] (current) – mnewnham | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | <- v5: | + | <- v5: |
| ~~NOTOC~~ | ~~NOTOC~~ | ||
| ====== Automatic Control Of Statement Execution ====== | ====== Automatic Control Of Statement Execution ====== | ||
| + | Once we have assigned the primary '' | ||
| + | <code php> | ||
| + | $db = new ADOdbLoadbalancer; | ||
| + | |||
| + | $db0 = new ADOdbLoadbalancerConnection(' | ||
| + | $db-> | ||
| + | |||
| + | $db1 = new ADOdbLoadbalancerConnection(' | ||
| + | $db-> | ||
| + | |||
| + | $db2 = new ADOdbLoadbalancerConnection(' | ||
| + | $db-> | ||
| + | |||
| + | /* | ||
| + | * Keep adding readonly servers | ||
| + | */ | ||
| + | </ | ||
| + | |||
| The load balancer automatically controls the execution of SQL statements through ADOdb by parsing the statement and directing the execution to the appropriate server: | The load balancer automatically controls the execution of SQL statements through ADOdb by parsing the statement and directing the execution to the appropriate server: | ||
| - Statements that require read-write access to the database are directed to the primary server. | - Statements that require read-write access to the database are directed to the primary server. | ||
v5/loadbalancer/mysql_replication/automatic_control.1476238565.txt.gz · Last modified: (external edit)
