[MXS-122] Persistent Connection to backend server Created: 2015-05-05  Updated: 2015-08-28  Resolved: 2015-08-28

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: None
Fix Version/s: 1.3.0

Type: New Feature Priority: Major
Reporter: Dipti Joshi (Inactive) Assignee: martin brampton (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MXS-177 Fixed Connection Throttling Closed
Epic Link: MaxScale 1.3

 Description   

Provide a persistent connection to database per client per user connection

Have a configuration limit on the maximum number of connections that can be made to a backend server for each server



 Comments   
Comment by Dipti Joshi (Inactive) [ 2015-06-02 ]

martin brampton,
Can you please list the name of the configuration parameters that will be used for maximum and minimum number of connections ?

Also see MXS-177, is it same as what you are doing here in Persistent connections ?

Comment by Dipti Joshi (Inactive) [ 2015-06-03 ]

martin brampton Please change the status of this task to "In Progress" since you are actively working on it.

Comment by Dipti Joshi (Inactive) [ 2015-06-09 ]

martin brampton Massimiliano Pinto Please list the new configuration parameters and their behaviors here. Is the parameter per server, per service or per user ?

Comment by martin brampton (Inactive) [ 2015-06-09 ]

There are two new configuration parameters, both of which belong in the server sections. One is "persistpoolmax" which determines the maximum number of connection DCBs that will be kept in the persistent pool. The default is 0 so that if nothing is done in the MaxScale configuration there will be no persistent connections. The other new parameter is "persistmaxtime" which is the maximum time in seconds that a persistent connection can remain in the pool and still be reused. The "persistmaxtime" should be set to a shorter time than the connection timeout configured in the backend server.

The maxadmin capabilities have been extended to support persistent connections. Showing servers now gives a figure for the number of DCBs that are in the persistent pool, waiting for reuse. There is a new command "show persistent ***" where the parameter is the name of a server. All DCBs that are in the persistent pool for the specified server are listed.

Comment by Dipti Joshi (Inactive) [ 2015-06-10 ]

martin brampton Can we put link to list the unit test case scenarios for this ?

Comment by Massimiliano Pinto (Inactive) [ 2015-06-10 ]

Found issues with SysBench 0.4.12 when persistent connection is enabled in a server section:

second run results in:

[root@maxscale-02 build]# sysbench --test=oltp --mysql-host=127.0.0.1 --mysql-port=4506 --mysql-user=massi --mysql-password=massi --mysql-db=sbtest --max-requests=100 --num-threads=40 --db-driver=mysql --oltp-read-only run
sysbench 0.4.12: multi-threaded system evaluation benchmark

ALERT: Error: failed to determine table 'sbtest' type!
ALERT: MySQL error: Lost connection to backend server.
FATAL: failed to get database capabilities!

With mysqlslap no issues.

Found sometimes debug assertion abort, that causes maxscale failure, when a connection has expired

Comment by Massimiliano Pinto (Inactive) [ 2015-06-11 ]

Today's new code is being tested with sysbench 0.5.3 with include test:

/usr/share/doc/sysbench/tests/db/oltp.lua

no issues found.

Code is stable right now even when removing expired connections (at a session create or when a "quit" is received.

Continue working.

Comment by Massimiliano Pinto (Inactive) [ 2015-06-11 ]

some sporadic crashes found with CTRL-C in running mysqlslap and sysbench tests.

Comment by Dipti Joshi (Inactive) [ 2015-06-16 ]

martin brampton & Massimiliano Pinto

(1) To understand the issue - we are seeing the crash when client disconnects with CTRL-C - Is that correct ?

(2) Are we stable if the database server goes down ?

(3) Do we have list of test cases scenarios are we testing the feature against ?

Comment by martin brampton (Inactive) [ 2015-06-16 ]

1) No, that was fixed some while ago
2) I don't know
3) Testing is being done in a variety of ways, all based on an actual VPS setup.

Comment by Dipti Joshi (Inactive) [ 2015-06-16 ]

martin brampton

Thanks for answers
Can you provide list of test cases - just the description of test scenario - not actual test scripts ?

Markus has done the same for other features in 1.2 - for example :
MXS-121 test case list is https://docs.google.com/spreadsheets/d/1W2A5H0k98xLVPpd4unB_4Dd2Xjtu8y9l447hm_6fLg0/edit#gid=0
MXS-129 test case list is https://docs.google.com/spreadsheets/d/13odz5dCzJqlq4z-Bdd1Cr7IFtueR0sjsgUcSFXnZhxs/edit?usp=sharing

This way we know what scenarios we have already addressed and what are left. It also helps Timofey for better test case coverage.

Thanks !

Comment by Dipti Joshi (Inactive) [ 2015-06-18 ]

martin brampton Any update on the test case list ?

Thanks,
Dipti

Comment by martin brampton (Inactive) [ 2015-06-19 ]

a) There have only been 2 working hours for me since you raised the question of test cases, so no.
b) Testing is primarily about trying to probe the functioning of the system to determine whether anything goes wrong, it is not based on a list of test cases. When testing progresses further, I will aim to provide some kind of list. At present, it does not seem a wise priority.

Comment by martin brampton (Inactive) [ 2015-06-24 ]

Notes on testing can be found at https://docs.google.com/document/d/1sIYcfa8qQMUJ_zDBsmDO4AhC2PmW6WYwxQp64-xoBDk/edit

Comment by martin brampton (Inactive) [ 2015-06-30 ]

No known faults for some while now.

Comment by Dipti Joshi (Inactive) [ 2015-08-25 ]

martin brampton Is this task complete now - can it be closed ?

Comment by martin brampton (Inactive) [ 2015-08-28 ]

Additional work on persistent connections is included in MXS-329

Comment by martin brampton (Inactive) [ 2015-08-28 ]

Appears to be robust, additional changes to further enhance reliability in MXS-329.

Generated at Thu Feb 08 03:56:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.