Multi-tenant provider network database connection management and governance
AssigneeAmazon Technologies, Inc.
InventorsChayan Biswas, Anoop Gupta, Sirish Chandrasekaran, Lawrence Webley, Anton Okmyanskiy
Life of this patent
Estimating the term…
Abstract
Techniques for database connection management and governance in a multi-tenant provider network are described. One or more database proxy instances connect to client applications and can obtain database connections for these client applications. The database connections may be pinned to particular client applications and/or multiplexed and thus shared by multiple client connections.
Claims25
A computer-implemented method comprising:
- receiving, at a database proxy instance, one or more database statements via a first client connection with a first client application;
- determining that the first client connection is not pinned to a database connection to a database instance;
- identifying a connection state associated with the first client connection, wherein the connection state is based at least in part on a previous database statement sent by the first client application over the first client connection;
- obtaining, based at least in part on the connection state, a first database connection from a pool of database connections between the database proxy instance and the database instance;
- sending the one or more database statements via the first database connection;
- determining, by the database proxy instance, that the first client connection is to be pinned to the first database connection;
- receiving a second one or more database statements via the first client connection;
- determining that the first client connection is pinned to the first database connection;
- and
- sending the second one or more database statements via the first database connection,
- wherein the determining that the first client connection is to be pinned to the first database connection is based on an analysis of a third one or more database statements received via the first client connection prior to the receiving of the second one or more database statements.
A system comprising:
- a first one or more electronic devices to implement one or more database instances;
- and
- a second one or more electronic devices to implement one or more database proxy instances, the one or more database proxy instances including instructions that upon execution cause the one or more database proxy instances to:
- receive one or more database statements via a first client connection with a first client application;
- determine that the first client connection is not pinned to a database connection to a database instance;
- identify a connection state associated with the first client connection, wherein the connection state is based at least in part on a previous database statement sent by the first client application over the first client connection;
- obtain, based at least in part on the connection state, a first database connection from a pool of database connections between the database proxy instance and the database instance;
- send the one or more database statements via the first database connection;
- determine that the first client connection is to be pinned to the first database connection;
- receive a second one or more database statements via the first client connection;
- determine that the first client connection is pinned to the first database connection;
- and
- send the second one or more database statements via the first database connection,
- wherein the determination that the first client connection is to be pinned to the first database connection is based on an analysis of a third one or more database statements received via the first client connection prior to the receiving of the second one or more database statements.
A computer-implemented method comprising:
- receiving, at a provider network, one or more request messages originated by a client device of a user of the provider network to configure a database proxy instance within the provider network, the one or more request messages identifying one or more database instances within the provider network, the one or more database instances including a database instance;
- launching one or more database proxy instances within the provider network, the one or more database proxy instances including the database proxy instance;
- associating an endpoint within the provider network with the one or more database proxy instances;
- connecting, by each of the one or more database proxy instances, with the one or more database instances;
- receiving, at the database proxy instance, one or more database statements via a first client connection with a first client application;
- determining that the first client connection is not pinned to a database connection to the database instance;
- identifying a connection state associated with the first client connection, wherein the connection state is based at least in part on a previous database statement sent by the first client application over the first client connection;
- obtaining, based at least in part on the connection state, a first database connection from a pool of database connections between the database proxy instance and the database instance;
- and
- sending the one or more database statements via the first database connection.
A system comprising:
- a first one or more electronic devices to implement one or more database instances in a provider network;
- and
- a second one or more electronic devices to implement a database connection management and governance system (DCMGS) of a provider network, the DCMGS including instructions that upon execution cause the DCMGS to:
- receive one or more request messages originated by a client device of a user of the provider network to configure a database proxy instance within the provider network, the one or more request messages identifying one or more database instances within the provider network, the one or more database instances including a database instance;
- launch one or more database proxy instances within the provider network, the one or more database proxy instances including the database proxy instance;
- associate an endpoint within the provider network with the one or more database proxy instances;
- connect, by each of the one or more database proxy instances, with the one or more database instances;
- receive, at the database proxy instance, one or more database statements via a first client connection with a first client application;
- determine, by the database proxy instance, that the first client connection is not pinned to a database connection to a database instance;
- identify, by the database proxy instance, a connection state associated with the first client connection, wherein the connection state is based at least in part on a previous database statement sent by the first client application over the first client connection;
- obtain, by the database proxy instance based at least in part on the connection state, a first database connection from a pool of database connections between the database proxy instance and the database instance;
- and
- send, by the database proxy instance, the one or more database statements via the first database connection.
A non-transitory computer readable medium storing instructions which, when executed by one or more processors of one or more computing devices, cause the one or more computing devices to implement a database proxy instance to perform operations comprising:
- receiving, at the database proxy instance, one or more database statements via a first client connection with a first client application;
- determining that the first client connection is not pinned to a database connection to a database instance;
- identifying a connection state associated with the first client connection, wherein the connection state is based at least in part on a previous database statement sent by the first client application over the first client connection;
- obtaining, based at least in part on the connection state, a first database connection from a pool of database connections between the database proxy instance and the database instance;
- sending the one or more database statements via the first database connection;
- determining, by the database proxy instance, that the first client connection is to be pinned to the first database connection;
- receiving a second one or more database statements via the first client connection;
- determining that the first client connection is pinned to the first database connection;
- and
- sending the second one or more database statements via the first database connection, wherein the determining that the first client connection is to be pinned to the first database connection is based on an analysis of a third one or more database statements received via the first client connection prior to the receiving of the second one or more database statements.
A non-transitory computer readable medium storing instructions which, when executed by one or more processors of one or more computing devices, cause the one or more computing devices of a provider network to perform operations comprising:
- receiving, at the provider network, one or more request messages originated by a client device of a user of the provider network to configure a database proxy instance within the provider network, the one or more request messages identifying one or more database instances within the provider network, the one or more database instances including a database instance;
- launching one or more database proxy instances within the provider network, the one or more database proxy instances including the database proxy instance;
- associating an endpoint within the provider network with the one or more database proxy instances;
- connecting, by each of the one or more database proxy instances, with the one or more database instances;
- receiving, at the database proxy instance, one or more database statements via a first client connection with a first client application;
- determining that the first client connection is not pinned to a database connection to the database instance;
- identifying a connection state associated with the first client connection, wherein the connection state is based at least in part on a previous database statement sent by the first client application over the first client connection;
- obtaining, based at least in part on the connection state, a first database connection from a pool of database connections between the database proxy instance and the database instance;
- and
- sending the one or more database statements via the first database connection.
Dependencies are inferred from the claim text.