Transaction distribution method, device, device and storage medium
A transaction and backup technology, applied in transaction processing, multi-programming devices, database distribution/replication, etc., can solve problems such as low execution performance, waste of performance in read-write separated database systems, and database transactions that cannot be evenly distributed in the main database. Achieve the effect of improving execution performance and enhancing data storage capacity
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0025] figure 1 It is a flow chart of the steps of a transaction distribution method provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation of read transaction distribution in a read-write separation database cluster. This method can be executed by a transaction distribution device, and generally can be integrated In the database control server, the device can be implemented in the form of hardware and / or software, and the method in the embodiment of the present invention specifically includes the following steps:
[0026] Step 101, when the transaction to be executed is obtained, respectively obtain the current transaction count of each database in the database cluster.
[0027] Wherein, the transaction to be executed can be a logic unit that needs to be executed in the database cluster, and can include a read transaction and a write transaction. Optionally, in the embodiment of the present invention, the transaction to be executed c...
Embodiment 2
[0038] figure 2 It is a flow chart of the steps of a transaction distribution method provided by Embodiment 2 of the present invention. The embodiment of the present invention is embodied on the basis of the above embodiments and is applied to a database cluster. The database cluster includes a primary database and at least one backup Database, when creating a database connection in an application, two connections can be built in, one is connected to the main database, and the other is connected to the backup database. The specific methods of the embodiments of the present invention include:
[0039] Step 201, when the transaction to be executed is obtained, respectively obtain the current transaction count of each database in the database cluster.
[0040] Wherein, the transaction to be executed may be a read transaction generated by an application, and may be executed by the primary database or the backup database in the database cluster.
[0041] Specifically, when the da...
Embodiment 3
[0067] image 3 It is a schematic structural diagram of a transaction distribution device provided in Embodiment 3 of the present invention, which can execute the transaction distribution method provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method. The device may be implemented by software and / or hardware, and specifically includes: a count acquisition module 301 , a target determination module 302 and a transaction distribution module 303 .
[0068] Wherein, the count obtaining module 301 is configured to respectively obtain the current transaction counts of the databases in the database cluster when the transactions to be executed are obtained.
[0069] The target determination module 302 is configured to determine the target database of the transaction to be executed from the database cluster according to the current transaction counts.
[0070] The transaction distribution module 303 ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com