gatewayd icon indicating copy to clipboard operation
gatewayd copied to clipboard

Add connection multiplexing to avoid 1:1 mapping of client to server connections

Open mostafa opened this issue 2 years ago • 2 comments

Currently incoming connections from database clients are mapped 1:1 with the server connection in the pool. Multiplexing can help improve this to reuse idle server connections.

Context: This will only be possible if the core authenticates incoming connections itself, and then creates authenticated connections (clients) to the database server. That is, GatewayD creates authenticated connections to the database server and puts them in the available connections pool. Whenever the clients connect to GatewayD, they will authenticate against GatewayD's chosen auth method and will be proxied on success. This will probably happen via a plugin. After the said plugin is developed, then 1:1 mapping of clients to server connections is a thing of the past, since GatewayD has authenticated connections that can be assigned to the clients on-demand, thus multiplexing.

This is blocked by the auth plugin.

mostafa avatar Dec 22 '22 16:12 mostafa

This will only be possible if the core authenticates incoming connections itself, and then creates authenticated connections (clients) to the database server. That is, GatewayD creates authenticated connections to the database server and puts them in the available connections pool. Whenever the clients connect to GatewayD, they will authenticate against GatewayD's chosen auth method and will be proxied on success. This will probably happen via a plugin. After the said plugin is developed, then 1:1 mapping of clients to server connections is a thing of the past, since GatewayD has authenticated connections that can be assigned to the clients on-demand, thus multiplexing.

mostafa avatar Jan 15 '23 22:01 mostafa

This is blocked by the auth plugin.

mostafa avatar May 01 '24 15:05 mostafa