-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME
38 lines (37 loc) · 1.59 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#
# how to setup
#
# load module
LoadModule namy_pool_module modules/mod_namy_pool.so
# make pooling
# server: mysqld server name
# db: database name
# user: mysql user account
# port: mysqld port
# socket: domain socket
# option: option value for mysql_real_connect()
# connections: number of conecction to the server
# weight: weight value for load balancing
# priority: priority for fallback function
<NamyPool test>
PoolServer "server=localhost;db=test;user=root;port=3340;socket=/var/lib/mysql/mysql.sock;option=0;connestion=5;weight=10"
PoolServer "server=localhost;db=test;user=root;port=3340;socket=/var/lib/mysql/mysql.sock;option=0;connestion=2;weight=10"
PoolServer "server=localhost;db=test;user=root;port=3340;socket=/var/lib/mysql/mysql.sock;option=0;connestion=5;weight=10"
</NamyPool>
<NamyPool test2>
PoolServer "server=localhost;db=test;user=root;port=3340;socket=/var/lib/mysql/mysql.sock;option=0;connestion=3;weight=10"
PoolServer "server=localhost;db=test;user=root;port=3340;socket=/var/lib/mysql/mysql.sock;option=0;connestion=2;weight=10"
PoolServer "server=localhost;db=test;user=root;port=3340;socket=/var/lib/mysql/mysql.sock;option=0;connestion=5;weight=10"
</NamyPool>
# mysql_ping() interval to check connections, 5 means 5 seconds
NamyPoolPingInterval 1
# how many times you allow mysql_ping() failures before switching fallback servers
NamyPoolMaxFailure 5
# alert mail settings
NamyPoolMailFrom "[email protected]"
NamyPoolMailTo "[email protected]"
NamyPoolSendMail "/usr/sbin/sendmail"
# show information
<Location /connections>
SetHandler namy_pool
</Location>