The connection lifecycle is the process of establishing a connection between a client and a server. This process is initiated by the client and is completed when the client disconnects from the server. In doing so, the client and server exchange data, in the form of queries and responses, which are sent over the connection and processed by the GatewayD and its plugins.
The connection lifecycle is composed of the following steps:
GatewayD starts with a pool of client connections to database server.
The database client initiates a connection to the GatewayD.
GatewayD accepts the connection and assigns it to a client connection.
The client sends a query to the GatewayD.
GatewayD proxies (forwards) the query to the database server.
GatewayD receives the response from the database server.
GatewayD sends the response to the client.
Database client disconnects from GatewayD.
The client connection closes and a new client connection is created.
The new client connection is added to the pool of client connections.