MySQL Forums
Forum List  »  Router & Proxy

Re: --proxy-read-only-backend-addresses
Posted by: Fabrizio Bottino
Date: December 03, 2007 12:25PM

I tried with 2clients manually, but every connection was directed to MASTER
When I started using mysqlslap finally there were connection to SLAVE.
So configuration is currently ok, maybe the LUA script isn't :(
So I did some tests, but I have a really strange issue on mysqlslap:

Direct connection:
corona bin # ./mysqlslap -uadmin -pXXX -h127.0.0.1 -P3306 -i10 -c10 -T -v -a -x2 -y3 --auto-generate-sql-add-autoincrement
Turning off preserve-schema!
Benchmark
        Average number of seconds to run all queries: 0.017 seconds
        Minimum number of seconds to run all queries: 0.007 seconds
        Maximum number of seconds to run all queries: 0.092 seconds
        Number of clients running queries: 10
        Average number of queries per client: 0


User time 0.01, System time 0.04
Maximum resident set size 0, Integral resident set size 0
Non-physical pagefaults 945, Physical pagefaults 0, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 1864, Involuntary context switches 1415

With PROXY:
Error A
corona bin # ./mysqlslap -uadmin -pXXX -h127.0.0.1 -P4040 -i10 -c10 -T -v -a -x2 -y3 --auto-generate-sql-add-autoincrement
Turning off preserve-schema!
./mysqlslap: Cannot create schema mysqlslap : can't change DB  to on slave 192.168.253.4:3306

Mysql proxy debug output:
[connect_server] 127.0.0.1:49636
  [1].connected_clients = 0
  [1].pool.cur_idle     = 0
  [1].pool.max_idle     = 8
  [1].pool.min_idle     = 4
  [1].type = 1
  [1].state = 1
  [1] idle-conns below min-idle
[read_query] 127.0.0.1:49636
  current backend   = 0
  client default db =
  client username   = admin
  query             = DROP SCHEMA IF EXISTS `mysqlslap`
  sending to backend : 192.168.xx.xx:3306
    is_slave         : false
    server default db:
    server username  : admin
    in_trans        : false
    in_calc_found   : false
    COM_QUERY       : true
[read_query] 127.0.0.1:49636
  current backend   = 0
  client default db =
  client username   = admin
  query             = CREATE SCHEMA `mysqlslap`
    server default db: mysqlslap
    client default db:
    syncronizing
  sending to backend : 192.168.xx.xx:3306
    is_slave         : false
    server default db: mysqlslap
    server username  : admin
    in_trans        : false
    in_calc_found   : false
    COM_QUERY       : true
[disconnect_client] 127.0.0.1:49636

Error B
corona bin # ./mysqlslap -uadmin -pastrodb -h127.0.0.1 -P4040 -i10 -c10 -T -v -a -x2 -y3 --auto-generate-sql-add-autoincrement
Turning off preserve-schema!
./mysqlslap: Cannot drop database 'mysqlslap' ERROR : can't change DB  to on slave 192.168.253.4:3306

Mysql proxy debug output:
[connect_server] 127.0.0.1:65470
  [1].connected_clients = 0
  [1].pool.cur_idle     = 10
  [1].pool.max_idle     = 8
  [1].pool.min_idle     = 4
  [1].type = 1
  [1].state = 1
  [2].connected_clients = 0
  [2].pool.cur_idle     = 8
  [2].pool.max_idle     = 8
  [2].pool.min_idle     = 4
  [2].type = 2
  [2].state = 1
  [1] taking master as default
  using pooled connection from: 1
[read_query] 127.0.0.1:65470
  current backend   = 0
  client default db =
  client username   = admin
  query             = DROP SCHEMA IF EXISTS `mysqlslap`
    server default db: mysqlslap
    client default db:
    syncronizing
  sending to backend : 192.168.xx.xx:3306
    is_slave         : false
    server default db: mysqlslap
    server username  : admin
    in_trans        : false
    in_calc_found   : false
    COM_QUERY       : true
[disconnect_client] 127.0.0.1:65470

Options: ReplyQuote


Subject
Views
Written By
Posted
4942
December 03, 2007 07:42AM
Re: --proxy-read-only-backend-addresses
4727
December 03, 2007 12:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.