89286
Capturing a Connection with connect_server o
When the proxy accepts a connection from a MySQL Client, the
connect_server () function is called.
There are no arguments to the function, but you can use and if necessary manipulate the information in
the proxy.connection table, which is unique to each Client session.
For example, if you have multiple backend servers, you can specify which server that connection
should use by setting the value of proxy.connection.backend_ndx to a valid server number. The
following codę chooses between two servers based on whether the current time in
minutes is odd or
even:
function connect_server ()
print("--> a Client really want3 to talk to a server")
if (tonumber(os.date("%M")) % 2 == 0) then
proxy.connection.backend_ndx - 2
print("Choosing backend 2")
else
proxy.connection.backend_ndx - 1 print("Choosing backend 1") end
print("Using " ..
proxy.global.backends[proxy.connection.backend_ndx).dst.name) end
This example also displays the IP address/port combination by accessing the information from the
intemal proxy.global.backends table.
Wyszukiwarka
Podobne podstrony:
section 2.5 and [1]. Mnesia is known to have problems with performance degradation when the databaseTo perform a whole database backup when the database is open: 1. Connect RMAN to tCrochet Borders76 CROCHET SYMBOLS Chain stitch. When the symbol for a single Chain stitch ((*■—^)) iGTID modę and mysql_upgrade. Prior to MySQL 5.6.7, mysql_upgrade could not connect to a MySQL ServerSCI Transport Connections in MySQL Cluster [sci] sections in the config.ini file explicitly define Sk-la When .1 sufficien: quannty hasbeen prupared, space them apart with a needle inserted through thStart the Nessus server when Windows boots When enabled, the Nessus server will be automatically staWhen a sufficient quaniity hasbeen prepared, space them apart with a needle inserted through the smaf9 5 lnbox Setup Wizard Select the information services(s] that you want to use with Microsoft ExchaFig Earth Wand with flint Water Wand with shell Figurę 17 The Wand or Rod Air Wand with feathcrs Ti00116 09a02659b05297f786ef7e850f9912 116 McWilliams smali, so the first term of [10] does have an00162 ?9b949846ac8ec47085cc44f65d6360 163 Economic Control Chart Models with Cycle Duration Constra00431 ?2bd2b6c7f7803f642438372603e664 436 Russell between dynami cal Systems and time senes analysi00453 ?960d11ee48a490cc71f653328fb9cc 458 Russell set. Especially when the retrace "pattem&quoDon’t miss ANTON STROUrSDEAD MAUER When the paranormal raises its otherworldly head in New York Citywięcej podobnych podstron