[MXS-1723] Delayed connection creation Created: 2018-03-20  Updated: 2019-04-29  Resolved: 2019-04-29

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: 2.2.3
Fix Version/s: 2.4.0

Type: New Feature Priority: Major
Reporter: sava Assignee: markus makela
Resolution: Fixed Votes: 1
Labels: None
Environment:

CentOS 7
maxscale-2.2.3-1.x86_64


Issue Links:
Blocks
is blocked by MXS-1503 Master reconnection Closed
is blocked by MXS-1506 Delayed query retry Closed

 Description   

Original description

The readwritesprit router have specification called "Routing to every session backend" in this page.

https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-22-readwritesplit/

For example, SET NAMES 'utf8' is always executed on the master server even if there is no write in the following statements.

So, a slave server with a high load could make the master server in the error state of "Too many connections".

I want a function that does not execute the session commands until it needs it.

Implementation Notes

This ties in with the improved storage of session commands so that the execution of session commands on the master can be postponed until a master connection is needed.



 Comments   
Comment by markus makela [ 2018-03-20 ]

The master connection is created as soon as the client connection is made. Please correct me if I am wrong but here's what I think would solve your problem:

  1. Do not open backend connections when the session starts
  2. When a query is received, open a connection to the correct server type
  3. If no writes are received, no master connection is made
Comment by sava [ 2018-03-20 ]

Thank you for your comment.

I couldn't understand difference of 2 and 3, but I think 3 is what I need.

When there is no writing, any connection is not made to the master. This can solve the problem.

Comment by markus makela [ 2018-03-20 ]

OK, I'll go ahead and update the issue title to better describe the requested feature.

Comment by markus makela [ 2019-04-29 ]

Added lazy_connect to 2.4.0.

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