CN115470303B - Database access method, device, system, equipment and readable storage medium - Google Patents
Database access method, device, system, equipment and readable storage medium Download PDFInfo
- Publication number
- CN115470303B CN115470303B CN202211417410.7A CN202211417410A CN115470303B CN 115470303 B CN115470303 B CN 115470303B CN 202211417410 A CN202211417410 A CN 202211417410A CN 115470303 B CN115470303 B CN 115470303B
- Authority
- CN
- China
- Prior art keywords
- database
- node
- mysql
- virtual
- mysql database
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000012545 processing Methods 0.000 claims abstract description 24
- 238000004590 computer program Methods 0.000 claims description 21
- 230000008569 process Effects 0.000 claims description 13
- 238000004364 calculation method Methods 0.000 claims description 9
- 235000000332 black box Nutrition 0.000 claims description 2
- 238000013500 data storage Methods 0.000 abstract description 5
- 230000000694 effects Effects 0.000 abstract description 3
- 230000001360 synchronised effect Effects 0.000 abstract description 3
- 230000036541 health Effects 0.000 description 10
- 238000007726 management method Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 230000008602 contraction Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000013024 troubleshooting Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/256—Integrating or interfacing systems involving database management systems in federated or virtual databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本申请涉及计算机技术领域,特别涉及一种数据库访问方法、装置、系统、设备及可读存储介质。The present application relates to the field of computer technology, in particular to a database access method, device, system, equipment and readable storage medium.
背景技术Background technique
目前,为了保证MySQL数据库服务的高可用以及稳定运行,一般会设置主节点和从节点。其中,主节点用于处理写操作,从节点用于处理查操作。并且,主节点在完成写操作后,会同步当前所写数据至从节点。因此,若当前所写数据量大,那么同步数据量就大,因此在大量写操作情况下或网络带宽较低的情况下,会有数据同步的延时,会降低数据库服务性能。At present, in order to ensure the high availability and stable operation of the MySQL database service, a master node and a slave node are generally set up. Among them, the master node is used to handle write operations, and the slave node is used to handle query operations. Moreover, after the master node completes the write operation, it will synchronize the currently written data to the slave node. Therefore, if the amount of currently written data is large, the amount of synchronized data will be large. Therefore, in the case of a large number of write operations or low network bandwidth, there will be a delay in data synchronization, which will reduce the performance of database services.
因此,如何提高高并发场景下的数据库服务性能,是本领域技术人员需要解决的问题。Therefore, how to improve database service performance in a high-concurrency scenario is a problem to be solved by those skilled in the art.
发明内容Contents of the invention
有鉴于此,本申请的目的在于提供一种数据库访问方法、装置、系统、设备及可读存储介质,以提高高并发场景下的数据库服务性能。其具体方案如下:In view of this, the purpose of the present application is to provide a database access method, device, system, equipment and readable storage medium, so as to improve the performance of database services in high concurrency scenarios. The specific plan is as follows:
第一方面,本申请提供了一种数据库访问方法,应用于虚拟数据库,包括:In the first aspect, the present application provides a database access method applied to a virtual database, including:
接收数据库访问请求;Receive database access requests;
按照负载均衡策略将所述数据库访问请求路由至所述虚拟数据库纳管的任一目标数据库节点;其中,所述虚拟数据库纳管多个MySQL数据库节点,且所有MySQL数据库节点共享同一存储库;According to the load balancing strategy, the database access request is routed to any target database node managed by the virtual database; wherein, the virtual database manages multiple MySQL database nodes, and all MySQL database nodes share the same repository;
使所述目标数据库节点通过访问所述存储库完成所述数据库访问请求的处理。making the target database node complete the processing of the database access request by accessing the storage repository.
可选地,所述按照负载均衡策略将所述数据库访问请求路由至所述虚拟数据库纳管的任一目标数据库节点,包括:Optionally, the routing the database access request to any target database node managed by the virtual database according to the load balancing strategy includes:
按照所述负载均衡策略在所述虚拟数据库纳管的所有MySQL数据库节点中确定权重最小的MySQL数据库节点;Determine the MySQL database node with the smallest weight among all the MySQL database nodes managed by the virtual database according to the load balancing strategy;
将权重最小的MySQL数据库节点确定为所述目标数据库节点,并将所述数据库访问请求路由至所述目标数据库节点。Determining the MySQL database node with the least weight as the target database node, and routing the database access request to the target database node.
可选地,任一MySQL数据库节点的权重计算过程包括:Optionally, the weight calculation process of any MySQL database node includes:
计算当前MySQL数据库节点的路由频繁程度;Calculate the routing frequency of the current MySQL database node;
计算当前MySQL数据库节点在当前时刻的负载评分;Calculate the load score of the current MySQL database node at the current moment;
将所述路由频繁程度和所述负载评分之和,作为当前MySQL数据库节点的权重。The sum of the route frequency and the load score is used as the weight of the current MySQL database node.
可选地,所述计算当前MySQL数据库节点的路由频繁程度,包括:Optionally, the calculation of the routing frequency of the current MySQL database node includes:
按照第一公式计算当前MySQL数据库节点的路由频繁程度;所述第一公式为:Wu=Ci/CS,Wu为MySQL数据库节点i的路由频繁程度,Ci为MySQL数据库节点i的被路由次数,CS为预设的被路由次数最大值。Calculate the routing frequency of the current MySQL database node according to the first formula; the first formula is: W u =C i /C S , W u is the routing frequency of MySQL database node i, and C i is the routing frequency of MySQL database node i The number of times to be routed, C S is the preset maximum number of times to be routed.
可选地,所述计算当前MySQL数据库节点在当前时刻的负载评分,包括:Optionally, the calculation of the load score of the current MySQL database node at the current moment includes:
按照第二公式计算当前MySQL数据库节点在当前时刻的负载评分;所述第二公式为:Wload=LCPU×a+Lm×b+LIO×c,Wload为当前MySQL数据库节点的负载评分,LCPU为当前MySQL数据库节点的CPU负载,Lm为当前MySQL数据库节点的内存负载,LIO为当前MySQL数据库节点的IO负载,a、b、c均为预设系数。Calculate the load score of the current MySQL database node at the current moment according to the second formula; the second formula is: W load = L CPU × a + L m × b + L IO × c, W load is the load of the current MySQL database node Scoring, L CPU is the CPU load of the current MySQL database node, L m is the memory load of the current MySQL database node, L IO is the IO load of the current MySQL database node, and a, b, and c are preset coefficients.
可选地,还包括:Optionally, also include:
定时采集并记录所述虚拟数据库纳管的所有MySQL数据库节点的运行状态;Regularly collect and record the operating status of all MySQL database nodes managed by the virtual database;
若任意MySQL数据库节点故障,则为该MySQL数据库节点添加故障标识。If any MySQL database node fails, add a failure identifier for the MySQL database node.
可选地,还包括:Optionally, also include:
在所述虚拟数据库运行过程中,通过配置更新命令对所述虚拟数据库已纳管的节点序列中的MySQL数据库节点进行增加、删除或修改,得到更新后的节点序列;During the operation of the virtual database, add, delete or modify the MySQL database nodes in the managed node sequence of the virtual database through a configuration update command to obtain an updated node sequence;
逐一对更新后的节点序列中的各MySQL数据库节点进行管理配置。Manage and configure each MySQL database node in the updated node sequence one by one.
可选地,所述逐一对更新后的节点序列中的各MySQL数据库节点进行管理配置,包括:Optionally, the management and configuration of each MySQL database node in the updated node sequence one by one includes:
在更新后的节点序列中确定新增MySQL数据库节点;Determine the new MySQL database node in the updated node sequence;
逐一对所述新增MySQL数据库节点进行管理配置后,再对更新后的节点序列中的剩余MySQL数据库节点进行管理配置。After performing management and configuration on the newly added MySQL database nodes one by one, management and configuration are performed on the remaining MySQL database nodes in the updated node sequence.
可选地,对所述新增MySQL数据库节点进行管理配置,包括:Optionally, the management configuration of the newly added MySQL database node includes:
将所述新增MySQL数据库节点的IP地址、端口、数据库账号及数据库登录密码配置于所述虚拟数据库。Configure the IP address, port, database account number and database login password of the newly added MySQL database node in the virtual database.
可选地,还包括:Optionally, also include:
根据用户操作对所述虚拟数据库的服务配置进行查询、增加、删除或修改;所述服务配置包括:最大可用连接数、最大空闲连接数、最长等待时间、访问地址、访问端口、虚拟数据库账号及虚拟数据库登录密码。Query, add, delete or modify the service configuration of the virtual database according to user operations; the service configuration includes: the maximum number of available connections, the maximum number of idle connections, the longest waiting time, access address, access port, virtual database account and virtual database login password.
可选地,还包括:Optionally, also include:
若所述虚拟数据库停止运行,则对所述虚拟数据库已纳管的节点序列中的MySQL数据库节点进行增加、删除或修改,并重启所述虚拟数据库。If the virtual database stops running, add, delete or modify the MySQL database nodes in the node sequence already managed by the virtual database, and restart the virtual database.
第二方面,本申请提供了一种数据库访问装置,应用于虚拟数据库,包括:In a second aspect, the present application provides a database access device applied to a virtual database, including:
接收模块,用于接收数据库访问请求;A receiving module, configured to receive a database access request;
路由模块,用于按照负载均衡策略将所述数据库访问请求路由至所述虚拟数据库纳管的任一目标数据库节点;其中,所述虚拟数据库纳管多个MySQL数据库节点,且所有MySQL数据库节点共享同一存储库;A routing module, configured to route the database access request to any target database node managed by the virtual database according to a load balancing strategy; wherein, the virtual database manages multiple MySQL database nodes, and all MySQL database nodes share the same repository;
处理模块,用于使所述目标数据库节点通过访问所述存储库完成所述数据库访问请求的处理。A processing module, configured to enable the target database node to complete the processing of the database access request by accessing the storage repository.
可选地,所述路由模块具体用于:Optionally, the routing module is specifically used for:
按照所述负载均衡策略在所述虚拟数据库纳管的所有MySQL数据库节点中确定权重最小的MySQL数据库节点;Determine the MySQL database node with the smallest weight among all the MySQL database nodes managed by the virtual database according to the load balancing strategy;
将权重最小的MySQL数据库节点确定为所述目标数据库节点,并将所述数据库访问请求路由至所述目标数据库节点。Determining the MySQL database node with the least weight as the target database node, and routing the database access request to the target database node.
可选地,还包括:Optionally, also include:
健康监测模块,用于定时采集并记录所述虚拟数据库纳管的所有MySQL数据库节点的运行状态;若任意MySQL数据库节点故障,则为该MySQL数据库节点添加故障标识。The health monitoring module is used to regularly collect and record the running status of all MySQL database nodes managed by the virtual database; if any MySQL database node fails, then add a failure identification for the MySQL database node.
可选地,还包括:Optionally, also include:
节点配置在线更新模块,用于在所述虚拟数据库运行过程中,通过配置更新命令对所述虚拟数据库已纳管的节点序列中的MySQL数据库节点进行增加、删除或修改,得到更新后的节点序列;逐一对更新后的节点序列中的各MySQL数据库节点进行管理配置。The node configuration online update module is used to add, delete or modify the MySQL database nodes in the node sequence managed by the virtual database through the configuration update command during the operation of the virtual database to obtain the updated node sequence ; Manage and configure each MySQL database node in the updated node sequence one by one.
可选地,所述节点配置在线更新模块具体用于:在更新后的节点序列中确定新增MySQL数据库节点;逐一对所述新增MySQL数据库节点进行管理配置后,再对更新后的节点序列中的剩余MySQL数据库节点进行管理配置。Optionally, the node configuration online update module is specifically used to: determine the newly added MySQL database node in the updated node sequence; after managing and configuring the newly added MySQL database nodes one by one, the updated node sequence The rest of the MySQL database nodes in the management configuration.
可选地,所述节点配置在线更新模块具体用于:将所述新增MySQL数据库节点的IP地址、端口、数据库账号及数据库登录密码配置于所述虚拟数据库。Optionally, the node configuration online update module is specifically configured to: configure the IP address, port, database account number and database login password of the newly added MySQL database node in the virtual database.
可选地,还包括:Optionally, also include:
服务配置操作模块,用于根据用户操作对所述虚拟数据库的服务配置进行查询、增加、删除或修改;所述服务配置包括:最大可用连接数、最大空闲连接数、最长等待时间、访问地址、访问端口、虚拟数据库账号及虚拟数据库登录密码。The service configuration operation module is used to query, add, delete or modify the service configuration of the virtual database according to user operations; the service configuration includes: the maximum number of available connections, the maximum number of idle connections, the longest waiting time, and the access address , access port, virtual database account and virtual database login password.
可选地,还包括:Optionally, also include:
节点配置离线更新模块,用于若所述虚拟数据库停止运行,则对所述虚拟数据库已纳管的节点序列中的MySQL数据库节点进行增加、删除或修改,并重启所述虚拟数据库。The node configuration offline update module is used for adding, deleting or modifying the MySQL database nodes in the node sequence managed by the virtual database if the virtual database stops running, and restarting the virtual database.
第三方面,本申请提供了一种数据库访问系统,包括:前述公开的虚拟数据库、多个MySQL数据库节点以及存储库。In a third aspect, the present application provides a database access system, including: the virtual database disclosed above, multiple MySQL database nodes, and a storage library.
可选地,虚拟数据库用于:接收数据库访问请求;按照负载均衡策略将所述数据库访问请求路由至所述虚拟数据库纳管的任一目标数据库节点;其中,所述虚拟数据库纳管多个MySQL数据库节点,且所有MySQL数据库节点共享同一存储库;使所述目标数据库节点通过访问所述存储库完成所述数据库访问请求的处理。Optionally, the virtual database is used to: receive a database access request; route the database access request to any target database node managed by the virtual database according to a load balancing strategy; wherein, the virtual database manages multiple MySQL database nodes, and all MySQL database nodes share the same storage repository; making the target database node complete the processing of the database access request by accessing the storage repository.
可选地,虚拟数据库用于:按照所述负载均衡策略在所述虚拟数据库纳管的所有MySQL数据库节点中确定权重最小的MySQL数据库节点;将权重最小的MySQL数据库节点确定为所述目标数据库节点,并将所述数据库访问请求路由至所述目标数据库节点。Optionally, the virtual database is used to: determine the MySQL database node with the smallest weight among all the MySQL database nodes managed by the virtual database according to the load balancing strategy; determine the MySQL database node with the smallest weight as the target database node , and route the database access request to the target database node.
可选地,虚拟数据库用于:计算当前MySQL数据库节点的路由频繁程度;计算当前MySQL数据库节点在当前时刻的负载评分;将所述路由频繁程度和所述负载评分之和,作为当前MySQL数据库节点的权重。Optionally, the virtual database is used to: calculate the routing frequency of the current MySQL database node; calculate the load score of the current MySQL database node at the current moment; use the sum of the routing frequency and the load rating as the current MySQL database node the weight of.
可选地,虚拟数据库用于:按照第一公式计算当前MySQL数据库节点的路由频繁程度;所述第一公式为:Wu=Ci/CS,Wu为MySQL数据库节点i的路由频繁程度,Ci为MySQL数据库节点i的被路由次数,CS为预设的被路由次数最大值。Optionally, the virtual database is used to: calculate the routing frequency of the current MySQL database node according to the first formula; the first formula is: W u =C i /C S , and W u is the routing frequency of the MySQL database node i , C i is the routing times of MySQL database node i, and C S is the preset maximum routing times.
可选地,虚拟数据库用于:按照第二公式计算当前MySQL数据库节点在当前时刻的负载评分;所述第二公式为:Wload=LCPU×a+Lm×b+LIO×c,Wload为当前MySQL数据库节点的负载评分,LCPU为当前MySQL数据库节点的CPU负载,Lm为当前MySQL数据库节点的内存负载,LIO为当前MySQL数据库节点的IO负载,a、b、c均为预设系数。Optionally, the virtual database is used to: calculate the load score of the current MySQL database node at the current moment according to the second formula; the second formula is: W load =L CPU ×a+L m ×b+L IO ×c, W load is the load score of the current MySQL database node, L CPU is the CPU load of the current MySQL database node, L m is the memory load of the current MySQL database node, L IO is the IO load of the current MySQL database node, and a, b, and c are all is the default coefficient.
可选地,虚拟数据库用于:定时采集并记录所述虚拟数据库纳管的所有MySQL数据库节点的运行状态;若任意MySQL数据库节点故障,则为该MySQL数据库节点添加故障标识。Optionally, the virtual database is used to: regularly collect and record the running status of all the MySQL database nodes managed by the virtual database; if any MySQL database node fails, add a failure identifier for the MySQL database node.
可选地,虚拟数据库用于:在所述虚拟数据库运行过程中,通过配置更新命令对所述虚拟数据库已纳管的节点序列中的MySQL数据库节点进行增加、删除或修改,得到更新后的节点序列;逐一对更新后的节点序列中的各MySQL数据库节点进行管理配置。Optionally, the virtual database is used for: during the operation of the virtual database, add, delete or modify the MySQL database nodes in the node sequence managed by the virtual database through a configuration update command to obtain updated nodes Sequence; manage and configure each MySQL database node in the updated node sequence one by one.
可选地,虚拟数据库用于:在更新后的节点序列中确定新增MySQL数据库节点;逐一对所述新增MySQL数据库节点进行管理配置后,再对更新后的节点序列中的剩余MySQL数据库节点进行管理配置。Optionally, the virtual database is used to: determine the newly added MySQL database nodes in the updated node sequence; after managing and configuring the newly added MySQL database nodes one by one, the remaining MySQL database nodes in the updated node sequence Make management configuration.
可选地,虚拟数据库用于:将所述新增MySQL数据库节点的IP地址、端口、数据库账号及数据库登录密码配置于所述虚拟数据库。Optionally, the virtual database is used to: configure the IP address, port, database account and database login password of the newly added MySQL database node in the virtual database.
可选地,虚拟数据库用于:根据用户操作对所述虚拟数据库的服务配置进行查询、增加、删除或修改;所述服务配置包括:最大可用连接数、最大空闲连接数、最长等待时间、访问地址、访问端口、虚拟数据库账号及虚拟数据库登录密码。Optionally, the virtual database is used to: query, add, delete or modify the service configuration of the virtual database according to user operations; the service configuration includes: the maximum number of available connections, the maximum number of idle connections, the longest waiting time, Access address, access port, virtual database account and virtual database login password.
可选地,虚拟数据库用于:若所述虚拟数据库停止运行,则对所述虚拟数据库已纳管的节点序列中的MySQL数据库节点进行增加、删除或修改,并重启所述虚拟数据库。Optionally, the virtual database is used to: if the virtual database stops running, add, delete or modify MySQL database nodes in the node sequence already managed by the virtual database, and restart the virtual database.
第四方面,本申请提供了一种电子设备,包括:In a fourth aspect, the present application provides an electronic device, including:
存储器,用于存储计算机程序;memory for storing computer programs;
处理器,用于执行所述计算机程序,以实现前述公开的数据库访问方法。A processor, configured to execute the computer program, so as to implement the database access method disclosed above.
第五方面,本申请提供了一种可读存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现前述公开的数据库访问方法。In a fifth aspect, the present application provides a readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the aforementioned disclosed database access method is implemented.
通过以上方案可知,本申请提供了一种数据库访问方法,应用于虚拟数据库,包括:接收数据库访问请求;按照负载均衡策略将所述数据库访问请求路由至所述虚拟数据库纳管的任一目标数据库节点;其中,所述虚拟数据库纳管多个MySQL数据库节点,且所有MySQL数据库节点共享同一存储库;使所述目标数据库节点通过访问所述存储库完成所述数据库访问请求的处理。It can be seen from the above solution that the present application provides a database access method applied to a virtual database, including: receiving a database access request; routing the database access request to any target database managed by the virtual database according to a load balancing strategy Node; Wherein, the virtual database manages multiple MySQL database nodes, and all MySQL database nodes share the same storage; make the target database node complete the processing of the database access request by accessing the storage.
可见,本申请采用虚拟数据库纳管多个共享同一存储库的MySQL数据库节点,并在接收到数据库访问请求时,按照负载均衡策略可以将数据库访问请求路由至虚拟数据库纳管的任一目标数据库节点上,从而使各个MySQL数据库节点都能通过访问存储库完成数据库访问请求的处理。该方案抛弃了数据库主从概念,转而使各个MySQL数据库节点共享同一存储库,由此不仅可避免高并发场景下的同步操作,从而避免同步操作对数据库服务性能的影响,还可以使同一份数据存在一份,以此来保证数据一致性。并且,可以按照负载均衡策略使虚拟数据库纳管的各个数据库节点分担访问请求,从而尽可能发挥每个数据库节点的可用性,从而保证整个数据库访问服务的稳定性、可靠性以及高可用。It can be seen that this application uses a virtual database to manage multiple MySQL database nodes sharing the same repository, and when receiving a database access request, the database access request can be routed to any target database node managed by the virtual database according to the load balancing strategy On, so that each MySQL database node can complete the processing of the database access request by accessing the repository. This solution abandons the concept of database master-slave and instead enables each MySQL database node to share the same repository, thereby not only avoiding synchronization operations in high-concurrency scenarios, thereby avoiding the impact of synchronization operations on database service performance, but also making the same database There is one copy of the data to ensure data consistency. Moreover, each database node managed by the virtual database can share access requests according to the load balancing strategy, so as to maximize the availability of each database node, thereby ensuring the stability, reliability and high availability of the entire database access service.
相应地,本申请提供的一种数据库访问装置、系统、设备及可读存储介质,也同样具有上述技术效果。Correspondingly, the database access device, system, equipment and readable storage medium provided by the present application also have the above-mentioned technical effects.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present application, and those skilled in the art can also obtain other drawings according to the provided drawings without creative work.
图1为本申请公开的一种数据库访问方法流程图;Fig. 1 is a flow chart of a database access method disclosed in the present application;
图2为本申请公开的一种数据库访问系统示意图;Fig. 2 is a schematic diagram of a database access system disclosed in the present application;
图3为本申请公开的一种数据库访问装置示意图;FIG. 3 is a schematic diagram of a database access device disclosed in the present application;
图4为本申请公开的一种电子设备示意图。FIG. 4 is a schematic diagram of an electronic device disclosed in the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
目前,MySQL数据库一般会设置主节点和从节点。其中,主节点用于处理写操作,从节点用于处理查操作。并且,主节点在完成写操作后,会同步当前所写数据至从节点。因此,若当前所写数据量大,那么同步数据量就大,因此在大量写操作情况下或网络带宽较低的情况下,会有数据同步的延时,会降低数据库服务性能。为此,本申请提供了一种数据库访问方案,能够使各个MySQL数据库节点共享同一存储库,避免同步操作对数据库服务性能的影响,还能保证数据存储的一致性以及整个数据库访问服务的稳定性、可靠性以及高可用。Currently, a MySQL database generally sets up a master node and a slave node. Among them, the master node is used to handle write operations, and the slave node is used to handle query operations. Moreover, after the master node completes the write operation, it will synchronize the currently written data to the slave node. Therefore, if the amount of currently written data is large, the amount of synchronized data will be large. Therefore, in the case of a large number of write operations or low network bandwidth, there will be a delay in data synchronization, which will reduce the performance of database services. For this reason, this application provides a database access scheme, which can enable each MySQL database node to share the same storage library, avoid the impact of synchronization operations on database service performance, and ensure the consistency of data storage and the stability of the entire database access service , reliability and high availability.
参见图1所示,本申请实施例公开了一种数据库访问方法,应用于虚拟数据库,包括:Referring to Fig. 1, the embodiment of the present application discloses a database access method applied to a virtual database, including:
S101、接收数据库访问请求。S101. Receive a database access request.
在本实施例中,数据库访问请求即:用于实现查询操作的SQL语句或用于实现写操作的SQL语句。本实施例中的虚拟数据库可以理解为一个软件服务,该软件服务能够同时管理多个MySQL数据库节点,这些MySQL数据库节点通过交换机等网络设备连接同一存储库,也就是:这些MySQL数据库节点共享同一存储库,从而实现了共享存储服务。In this embodiment, the database access request is: an SQL statement used to implement a query operation or an SQL statement used to implement a write operation. The virtual database in this embodiment can be understood as a software service, which can manage multiple MySQL database nodes at the same time. Library, thus realizing the shared storage service.
S102、按照负载均衡策略将数据库访问请求路由至虚拟数据库纳管的任一目标数据库节点;其中,虚拟数据库纳管多个MySQL数据库节点,且所有MySQL数据库节点共享同一存储库。S102. Routing the database access request to any target database node managed by the virtual database according to the load balancing strategy; wherein, the virtual database manages multiple MySQL database nodes, and all the MySQL database nodes share the same storage library.
在一种实施方式中,按照负载均衡策略将数据库访问请求路由至虚拟数据库纳管的任一目标数据库节点,包括:按照负载均衡策略在虚拟数据库纳管的所有MySQL数据库节点中确定权重最小的MySQL数据库节点;将权重最小的MySQL数据库节点确定为目标数据库节点,并将数据库访问请求路由至目标数据库节点。In one embodiment, routing the database access request to any target database node managed by the virtual database according to the load balancing strategy includes: determining the MySQL with the smallest weight among all the MySQL database nodes managed by the virtual database according to the load balancing strategy Database node: determine the MySQL database node with the least weight as the target database node, and route the database access request to the target database node.
在一种实施方式中,任一MySQL数据库节点的权重计算过程包括:计算当前MySQL数据库节点的路由频繁程度;计算当前MySQL数据库节点在当前时刻的负载评分;将路由频繁程度和负载评分之和,作为当前MySQL数据库节点的权重。当前MySQL数据库节点即:虚拟数据库纳管的任一个节点。In one embodiment, the weight calculation process of any MySQL database node includes: calculating the routing frequency of the current MySQL database node; calculating the load score of the current MySQL database node at the current moment; the sum of the routing frequency and the load score, As the weight of the current MySQL database node. The current MySQL database node is: any node managed by the virtual database.
其中,计算当前MySQL数据库节点的路由频繁程度,包括:按照第一公式计算当前MySQL数据库节点的路由频繁程度;第一公式为:Wu=Ci/CS,Wu为MySQL数据库节点i的路由频繁程度,Ci为MySQL数据库节点i的被路由次数,CS为预设的被路由次数最大值。Wherein, calculating the routing frequency of the current MySQL database node includes: calculating the routing frequency of the current MySQL database node according to the first formula; the first formula is: W u =C i /C S , W u is the MySQL database node i Routing frequency, C i is the routing times of MySQL database node i, and C S is the preset maximum routing times.
其中,计算当前MySQL数据库节点在当前时刻的负载评分,包括:按照第二公式计算当前MySQL数据库节点在当前时刻的负载评分;第二公式为:Wload=LCPU×a+Lm×b+LIO×c,Wload为当前MySQL数据库节点的负载评分,LCPU为当前MySQL数据库节点的CPU负载,Lm为当前MySQL数据库节点的内存负载,LIO为当前MySQL数据库节点的IO负载,a、b、c均为预设系数。一般地,a+b+c=1。Wherein, calculating the load score of the current MySQL database node at the current moment includes: calculating the load score of the current MySQL database node at the current moment according to the second formula; the second formula is: W load =L CPU ×a+L m ×b+ L IO × c, W load is the load score of the current MySQL database node, L CPU is the CPU load of the current MySQL database node, L m is the memory load of the current MySQL database node, L IO is the IO load of the current MySQL database node, a , b, c are preset coefficients. Generally, a+b+c=1.
S103、使目标数据库节点通过访问存储库完成数据库访问请求的处理。S103. Make the target database node complete the processing of the database access request by accessing the storage repository.
由于数据库访问请求实际为SQL语句,因此目标数据库节点通过执行SQL语句便可实现:在存储库中查询相应信息或将某些信息写入存储库。Since the database access request is actually an SQL statement, the target database node can realize by executing the SQL statement: querying the corresponding information in the repository or writing some information into the repository.
需要说明的是,可以根据用户操作对虚拟数据库的服务配置进行查询、增加、删除或修改;服务配置包括:最大可用连接数、最大空闲连接数、最长等待时间、访问地址、访问端口、虚拟数据库账号及虚拟数据库登录密码。It should be noted that the service configuration of the virtual database can be queried, added, deleted or modified according to user operations; the service configuration includes: the maximum number of available connections, the maximum number of idle connections, the longest waiting time, access address, access port, virtual Database account and virtual database login password.
可见,本实施例采用虚拟数据库纳管多个共享同一存储库的MySQL数据库节点,并在接收到数据库访问请求时,按照负载均衡策略可以将数据库访问请求路由至虚拟数据库纳管的任一目标数据库节点上,从而使各个MySQL数据库节点都能通过访问存储库完成数据库访问请求的处理。该方案抛弃了数据库主从概念,转而使各个MySQL数据库节点共享同一存储库,由此不仅可避免高并发场景下的同步操作,从而避免同步操作对数据库服务性能的影响,还可以使同一份数据存在一份,以此来保证数据一致性。并且,可以按照负载均衡策略使虚拟数据库纳管的各个数据库节点分担访问请求,从而尽可能发挥每个数据库节点的可用性,从而保证整个数据库访问服务的稳定性、可靠性以及高可用。It can be seen that in this embodiment, a virtual database is used to manage multiple MySQL database nodes that share the same repository, and when a database access request is received, the database access request can be routed to any target database managed by the virtual database according to the load balancing strategy Nodes, so that each MySQL database node can complete the processing of database access requests by accessing the repository. This solution abandons the concept of database master-slave and instead enables each MySQL database node to share the same repository, thereby not only avoiding synchronization operations in high-concurrency scenarios, thereby avoiding the impact of synchronization operations on database service performance, but also making the same database There is one copy of the data to ensure data consistency. Moreover, each database node managed by the virtual database can share access requests according to the load balancing strategy, so as to maximize the availability of each database node, thereby ensuring the stability, reliability and high availability of the entire database access service.
基于上述实施例,需要说明的是,虚拟数据库可以对其纳管的各个MySQL数据库节点进行监控状态监测。在一种实施方式中,定时采集并记录虚拟数据库纳管的所有MySQL数据库节点的运行状态;若任意MySQL数据库节点故障,则为该MySQL数据库节点添加故障标识。Based on the above embodiments, it should be noted that the virtual database can monitor the monitoring status of each MySQL database node managed by it. In one embodiment, the running status of all MySQL database nodes managed by the virtual database is regularly collected and recorded; if any MySQL database node fails, a failure identifier is added to the MySQL database node.
当然,还可以灵活调整虚拟数据库纳管的MySQL数据库节点,包括在线调整和离线调整两种方式。在线调整即:在虚拟数据库运行过程中,通过配置更新命令对虚拟数据库已纳管的节点序列中的MySQL数据库节点进行增加、删除或修改,得到更新后的节点序列;逐一对更新后的节点序列中的各MySQL数据库节点进行管理配置。离线调整即:若虚拟数据库停止运行,则对虚拟数据库已纳管的节点序列中的MySQL数据库节点进行增加、删除或修改,并重启虚拟数据库。其中,虚拟数据库已纳管节点指:可用于处理请求的节点。也就是说,故障节点或被断开服务的节点不在节点序列中。Of course, you can also flexibly adjust the MySQL database nodes managed by the virtual database, including online adjustment and offline adjustment. Online adjustment means: during the running process of the virtual database, add, delete or modify the MySQL database nodes in the node sequence managed by the virtual database through the configuration update command to obtain the updated node sequence; pair the updated node sequence one by one Each MySQL database node in the management configuration. Offline adjustment means: if the virtual database stops running, add, delete or modify the MySQL database nodes in the node sequence already managed by the virtual database, and restart the virtual database. Wherein, the managed node of the virtual database refers to a node that can be used to process requests. That is, a failed node or a node taken out of service is not in the node sequence.
其中,逐一对更新后的节点序列中的各MySQL数据库节点进行管理配置,包括:在更新后的节点序列中确定新增MySQL数据库节点;逐一对新增MySQL数据库节点进行管理配置后,再对更新后的节点序列中的剩余MySQL数据库节点进行管理配置(如:在检查到节点IP、端口等信息有更新时,进行相应信息的更新)。其中,对新增MySQL数据库节点进行管理配置,包括:将新增MySQL数据库节点的IP地址、端口、数据库账号及数据库登录密码配置于虚拟数据库。例如:某一MySQL数据库节点在节点序列中被记录为:IP:端口:username:password。Wherein, each MySQL database node in the updated node sequence is managed and configured one by one, including: determining a new MySQL database node in the updated node sequence; Manage and configure the remaining MySQL database nodes in the subsequent node sequence (for example, update the corresponding information when it is detected that the node IP, port and other information have been updated). Among them, the management configuration of the newly added MySQL database node includes: configuring the IP address, port, database account number and database login password of the newly added MySQL database node in the virtual database. For example: a MySQL database node is recorded as: IP:port:username:password in the node sequence.
需要说明的是,优先配置新增节点可以避免服务中断。例如:虚拟数据库原本纳管了节点A和节点B,某一次在线调整时,将节点A、B改成了节点C、D,那么优先配置节点C、D,以使节点C、D能够接受访问请求。如果先使节点A、B停止服务,那么虚拟数据库服务就会中断。It should be noted that prioritizing the configuration of new nodes can avoid service interruption. For example: the virtual database originally manages nodes A and B, and during an online adjustment, nodes A and B are changed to nodes C and D, then nodes C and D are configured first so that nodes C and D can accept access ask. If the nodes A and B are stopped from service first, the virtual database service will be interrupted.
请参见图2,本实施例为虚拟数据库提供了具体组成结构,包括:虚拟服务、配置中心、虚拟服务、负载均衡、健康检查等模块。其中,借助配置中心模块可以更改、读取虚拟数据库的相关配置信息,包括:基础连接配置和服务配置。Please refer to FIG. 2 , this embodiment provides a specific composition structure for the virtual database, including modules such as virtual service, configuration center, virtual service, load balancing, and health check. Among them, the relevant configuration information of the virtual database can be changed and read by means of the configuration center module, including: basic connection configuration and service configuration.
其中,基础连接配置用于设定虚拟数据库纳管的各个节点,采用ip:port:username:password的形式,可以记录虚拟数据库纳管的各个节点。如:config.dbpool.serverList=10.0.0.1:3306:root:mysqladmin|10.0.0.2:3306:root:mysqladmin,就是某一节点对应的连接配置。Among them, the basic connection configuration is used to set each node managed by the virtual database, and adopts the form of ip:port:username:password, which can record each node managed by the virtual database. For example: config.dbpool.serverList=10.0.0.1:3306:root:mysqladmin|10.0.0.2:3306:root:mysqladmin is the connection configuration corresponding to a certain node.
其中,服务配置包括:最大可用连接数,如:config.dbpool.maxActive=100。最大空闲连接数,如:config.dbpool.maxIdle=20。初始化连接数,如:config.dbpool.initSize=10。最大等待时间,单位ms,如:config.dbpool.maxWait=1000。虚拟数据库地址及端口,如:config.server.url=10.1.1.1:3306。虚拟数据库访问账号及密码,可设置多个,如:config.server.userInfo=root:mysqladmin|test1:test1。当然,还可以设置能够访问虚拟数据库的用户IP,如:config.server.url:x=10.1.1.1:3306:root:mysqladmin、config.server.userInfo:x=root:mysqladmin|test1:test1,x为递增的阿拉伯数字。可见,可根据需要设定多个用户IP访问虚拟数据库。Among them, the service configuration includes: the maximum number of available connections, such as: config.dbpool.maxActive=100. The maximum number of idle connections, such as: config.dbpool.maxIdle=20. Initialize the number of connections, such as: config.dbpool.initSize=10. The maximum waiting time, in ms, such as: config.dbpool.maxWait=1000. Virtual database address and port, such as: config.server.url=10.1.1.1:3306. The virtual database access account and password can be multiple, such as: config.server.userInfo=root:mysqladmin|test1:test1. Of course, you can also set the user IP that can access the virtual database, such as: config.server.url:x=10.1.1.1:3306:root:mysqladmin, config.server.userInfo:x=root:mysqladmin|test1:test1, x For increasing Arabic numerals. It can be seen that multiple user IPs can be set to access the virtual database as required.
基础连接配置和服务配置都可以记录在配置文件中,用户可随时修改配置文件。虚拟数据库服务启动时,配置中心会读取配置文件,并辅助其他模块完成服务初始化。在服务正常启动后,用户也可通过如下命令进行相关配置的查询和修改。例如:采用lssharedbconfig -i configName查询服务配置信息,“–i”为可选参数,不填将返回所有信息,填写将返回特定配置内容。采用chgsharedbconfig -i configName configValue修改服务配置信息,“–i”为可选参数,该参数有两个参数值,第一项为配置名称,第二项为配置项内容。采用refreshsharedbconfig读取配置信息,并重启虚拟服务。Both basic connection configuration and service configuration can be recorded in configuration files, and users can modify configuration files at any time. When the virtual database service starts, the configuration center will read the configuration file and assist other modules to complete the service initialization. After the service starts normally, the user can also query and modify related configurations through the following commands. For example: Use lssharedbconfig -i configName to query service configuration information, "-i" is an optional parameter, if not filled, all information will be returned, and if filled, specific configuration content will be returned. Use chgsharedbconfig -i configName configValue to modify service configuration information, "-i" is an optional parameter, this parameter has two parameter values, the first item is the configuration name, and the second item is the content of the configuration item. Use refreshsharedbconfig to read the configuration information and restart the virtual service.
需要说明的是,虚拟数据库是底层真实的数据库集群和用户服务请求的中间桥梁。底层的数据库集群对用户是处于黑盒状态的,用户不会直接访问到具体的数据库节点,而是访问虚拟数据库提供的虚拟服务,由此虚拟服务可以将请求路由到具体的数据库节点上。故虚拟服务为用户提供了统一访问入口,能屏蔽掉内部复杂的设计,提升系统简洁性。It should be noted that the virtual database is an intermediate bridge between the underlying real database cluster and user service requests. The underlying database cluster is in a black-box state for users. Users will not directly access specific database nodes, but access virtual services provided by virtual databases, so that virtual services can route requests to specific database nodes. Therefore, the virtual service provides users with a unified access portal, which can shield the internal complex design and improve the simplicity of the system.
负载均衡模块是虚拟服务进行路由的前置功能,此模块可根据设置的路由规则,选择当前数据库集群中最适合的节点供虚拟服务路由。此模块能够保证服务请求能尽可能均匀的落到每个节点上,提供整个系统的负载能力。其中,负载均衡路由规则包括:(1)记录最近1000次请求的节点路由次数,每次路由时统计每个节点的使用率权重分(即路由频繁程度),计算规则为:节点路由次数/总路由次数1000。(2)定时扫描每个节点的基础性能信息,包含CPU使用率、内存使用率、IO使用率,根据这三个信息统计每个节点的服务器负载权重分(即负载评分),计算规则为:CPU使用率*50+内存使用率*30+IO使用率*20。(3)取各节点的使用率权重分与服务器负载权重分的和作为节点最终负载权重,最终负载权重最低的节点将作为此次路由的目标节点。The load balancing module is a pre-function for virtual service routing. This module can select the most suitable node in the current database cluster for virtual service routing according to the set routing rules. This module can ensure that service requests can fall on each node as evenly as possible, providing the load capacity of the entire system. Among them, the load balancing routing rules include: (1) record the node routing times of the last 1000 requests, and calculate the usage weight score of each node (that is, the frequency of routing) for each routing. The calculation rule is: node routing times/total The number of routes is 1000. (2) Regularly scan the basic performance information of each node, including CPU usage, memory usage, and IO usage, and count the server load weight score (load score) of each node according to these three information. The calculation rules are: CPU usage*50+memory usage*30+IO usage*20. (3) Take the sum of the utilization weight score of each node and the server load weight score as the final load weight of the node, and the node with the lowest final load weight will be the target node of this routing.
健康检查模块会定期检查每个数据库节点的健康状态,并采集相关数据供负载均衡模块使用。如果某个节点出现故障,则负载均衡模块会识别出此事件,那么该节点不再纳入路由的范畴,直到健康检查模块上报其恢复正常。此模块负责排查系统内的节点故障,并有着节点正常后的自动恢复能力,保障整个系统的高可用性。The health check module regularly checks the health status of each database node and collects relevant data for use by the load balancing module. If a node fails, the load balancing module will recognize this event, and the node will no longer be included in the routing until the health check module reports that it is back to normal. This module is responsible for troubleshooting node failures in the system, and has the ability to automatically recover after the node is normal, ensuring the high availability of the entire system.
其中,数据库集群中的各个数据库节点(如图2所示的A、B、C、D),使用共享存储作为数据存储空间,可以保证数据存储的一致性。各个数据库节点的实例信息通过配置文件注册在虚拟数据库中。启动虚拟数据库服务,配置中心会读取相关配置文件,读取完毕后,通知健康检查模块进行数据库节点的连接、初始化等操作。健康检查模块依次检查各个数据库节点的连通性后,记录处于健康状态的数据库节点,并通知虚拟服务进行请求的路由。Among them, each database node in the database cluster (A, B, C, D as shown in Figure 2) uses shared storage as the data storage space, which can ensure the consistency of data storage. The instance information of each database node is registered in the virtual database through the configuration file. Start the virtual database service, and the configuration center will read the relevant configuration files. After reading, it will notify the health check module to perform operations such as connection and initialization of database nodes. The health check module checks the connectivity of each database node in turn, records the database nodes in a healthy state, and notifies the virtual service to route the request.
其中,可以采用停机扩缩容、开机扩缩容方式对数据库集群进行扩容或缩容。Among them, the capacity expansion or contraction of the database cluster can be expanded or contracted in the manner of expansion and contraction with shutdown and expansion and contraction with startup.
停机扩缩容时,虚拟服务处理停机状态,用户可直接修改配置文件,进行数据库节点列表的更改,更改后重启服务,扩缩容即可生效。When expansion and contraction are stopped, the virtual service handles the shutdown state, and the user can directly modify the configuration file to change the database node list, restart the service after the change, and the expansion and contraction will take effect.
开机扩缩容时,用户可通过chgsharedbconfig命令对数据库节点列表进行增加或删除。配置中心可检测到此命令的结果,而后会通知健康检查模块进行新一轮的节点健康检查以及节点连接初始化。此时,逐个对各数据库节点进行连接初始化,以保证整个过程中有至少一个节点可以处理访问请求,从而保障服务的可用性,以免出现:新请求进入时,找不到可用的数据库节点。When starting to expand or shrink, the user can add or delete the database node list through the chgsharedbconfig command. The configuration center can detect the result of this command, and then notify the health check module to perform a new round of node health check and node connection initialization. At this time, each database node is initialized one by one to ensure that at least one node can process the access request during the whole process, so as to ensure the availability of the service, so as to avoid: when a new request comes in, no available database node can be found.
请参照图2,服务请求的处理过程包括:请求到达虚拟服务后,虚拟服务借助负载均衡模块尝试获取一个可用的高性能节点,也即:负载均衡模块从当前数据库集群中选取权重分最低的健康节点作为路由节点,并返回给虚拟服务。此时虚拟服务使该路由节点执行SQL语句,以完成服务请求对共享存储的访问。Please refer to Figure 2. The process of service request includes: After the request reaches the virtual service, the virtual service tries to obtain an available high-performance node through the load balancing module, that is, the load balancing module selects the health node with the lowest weight score from the current database cluster The node acts as a routing node and returns to the virtual service. At this time, the virtual service enables the routing node to execute an SQL statement to complete the service request to access the shared storage.
可见,本实施例为用户请求提供了统一的访问入口,且基于共享存储建立多节点的数据库集群,取消了主从节点的同步机制。一方面可以克服大数据量写入时的数据同步延时,另一方面可以横向拓展节点数量。并且,统一的访问入口,屏蔽了底层集群结构,并借助负载均衡策略使得在高并发、高压力场景下,数据库服务能正常运行,保证了整个服务的稳定性、可靠性以及高可用。It can be seen that this embodiment provides a unified access portal for user requests, and establishes a multi-node database cluster based on shared storage, canceling the synchronization mechanism of the master and slave nodes. On the one hand, it can overcome the data synchronization delay when writing large amounts of data, and on the other hand, it can expand the number of nodes horizontally. Moreover, the unified access entrance shields the underlying cluster structure, and with the help of load balancing strategies, the database service can run normally under high concurrency and high pressure scenarios, ensuring the stability, reliability and high availability of the entire service.
下面对本申请实施例提供的一种数据库访问装置进行介绍,下文描述的一种数据库访问装置与上文描述的一种数据库访问方法可以相互参照。A database access device provided in the embodiment of the present application is introduced below, and a database access device described below and a database access method described above may refer to each other.
参见图3所示,本申请实施例公开了一种数据库访问装置,应用于虚拟数据库,包括:Referring to Figure 3, the embodiment of the present application discloses a database access device, which is applied to a virtual database, including:
接收模块301,用于接收数据库访问请求;A receiving
路由模块302,用于按照负载均衡策略将数据库访问请求路由至虚拟数据库纳管的任一目标数据库节点;其中,虚拟数据库纳管多个MySQL数据库节点,且所有MySQL数据库节点共享同一存储库;The
处理模块303,用于使目标数据库节点通过访问存储库完成数据库访问请求的处理。The
在一种实施方式中,路由模块具体用于:In one embodiment, the routing module is specifically used for:
按照负载均衡策略在虚拟数据库纳管的所有MySQL数据库节点中确定权重最小的MySQL数据库节点;Determine the MySQL database node with the smallest weight among all the MySQL database nodes managed by the virtual database according to the load balancing strategy;
将权重最小的MySQL数据库节点确定为目标数据库节点,并将数据库访问请求路由至目标数据库节点。The MySQL database node with the least weight is determined as the target database node, and the database access request is routed to the target database node.
在一种实施方式中,还包括:In one embodiment, it also includes:
健康监测模块,用于定时采集并记录虚拟数据库纳管的所有MySQL数据库节点的运行状态;若任意MySQL数据库节点故障,则为该MySQL数据库节点添加故障标识。The health monitoring module is used to regularly collect and record the running status of all MySQL database nodes managed by the virtual database; if any MySQL database node fails, add a fault identification for the MySQL database node.
在一种实施方式中,还包括:In one embodiment, it also includes:
节点配置在线更新模块,用于在虚拟数据库运行过程中,通过配置更新命令对虚拟数据库已纳管的节点序列中的MySQL数据库节点进行增加、删除或修改,得到更新后的节点序列;逐一对更新后的节点序列中的各MySQL数据库节点进行管理配置。The node configuration online update module is used to add, delete or modify the MySQL database nodes in the node sequence managed by the virtual database through the configuration update command during the operation of the virtual database to obtain the updated node sequence; update one by one Manage and configure each MySQL database node in the subsequent node sequence.
在一种实施方式中,节点配置在线更新模块具体用于:在更新后的节点序列中确定新增MySQL数据库节点;逐一对新增MySQL数据库节点进行管理配置后,再对更新后的节点序列中的剩余MySQL数据库节点进行管理配置。In one embodiment, the node configuration online update module is specifically used to: determine the newly added MySQL database node in the updated node sequence; Manage and configure the remaining MySQL database nodes.
在一种实施方式中,节点配置在线更新模块具体用于:将新增MySQL数据库节点的IP地址、端口、数据库账号及数据库登录密码配置于虚拟数据库。In one embodiment, the node configuration online update module is specifically configured to: configure the IP address, port, database account number and database login password of the newly added MySQL database node in the virtual database.
在一种实施方式中,还包括:In one embodiment, it also includes:
服务配置操作模块,用于根据用户操作对虚拟数据库的服务配置进行查询、增加、删除或修改;服务配置包括:最大可用连接数、最大空闲连接数、最长等待时间、访问地址、访问端口、虚拟数据库账号及虚拟数据库登录密码。The service configuration operation module is used to query, add, delete or modify the service configuration of the virtual database according to user operations; the service configuration includes: the maximum number of available connections, the maximum number of idle connections, the longest waiting time, access address, access port, Virtual database account and virtual database login password.
在一种实施方式中,还包括:In one embodiment, it also includes:
节点配置离线更新模块,用于若虚拟数据库停止运行,则对虚拟数据库已纳管的节点序列中的MySQL数据库节点进行增加、删除或修改,并重启虚拟数据库。The node configuration offline update module is used to add, delete or modify the MySQL database nodes in the node sequence that the virtual database has managed if the virtual database stops running, and restart the virtual database.
其中,关于本实施例中各个模块、单元更加具体的工作过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For the more specific working process of each module and unit in this embodiment, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not repeated here.
可见,本实施例提供了一种数据库访问装置,能够使各个MySQL数据库节点共享同一存储库,避免同步操作对数据库服务性能的影响,还能保证数据存储的一致性以及整个数据库访问服务的稳定性、可靠性以及高可用。It can be seen that this embodiment provides a database access device, which can enable each MySQL database node to share the same storage library, avoid the impact of synchronization operations on database service performance, and ensure the consistency of data storage and the stability of the entire database access service , reliability and high availability.
下面对本申请实施例提供的一种数据库访问装置进行介绍,下文描述的一种数据库访问装置与上文描述的一种数据库访问方法可以相互参照。A database access device provided in the embodiment of the present application is introduced below, and a database access device described below and a database access method described above may be referred to each other.
本申请实施例公开了一种数据库访问系统,包括:前述实施例公开的虚拟数据库、多个MySQL数据库节点以及存储库。具体可参照图2,图2中的共享存储即存储库。The embodiment of the present application discloses a database access system, including: the virtual database disclosed in the foregoing embodiments, multiple MySQL database nodes, and a storage library. For details, refer to FIG. 2 , and the shared storage in FIG. 2 is the repository.
在一种实施方式中,虚拟数据库用于:接收数据库访问请求;按照负载均衡策略将数据库访问请求路由至虚拟数据库纳管的任一目标数据库节点;其中,虚拟数据库纳管多个MySQL数据库节点,且所有MySQL数据库节点共享同一存储库;使目标数据库节点通过访问存储库完成数据库访问请求的处理。In one embodiment, the virtual database is used to: receive a database access request; route the database access request to any target database node managed by the virtual database according to the load balancing strategy; wherein, the virtual database manages multiple MySQL database nodes, And all the MySQL database nodes share the same repository; the target database node completes the processing of the database access request by accessing the repository.
在一种实施方式中,虚拟数据库用于:按照负载均衡策略在虚拟数据库纳管的所有MySQL数据库节点中确定权重最小的MySQL数据库节点;将权重最小的MySQL数据库节点确定为目标数据库节点,并将数据库访问请求路由至目标数据库节点。In one embodiment, the virtual database is used to: determine the MySQL database node with the smallest weight among all the MySQL database nodes managed by the virtual database according to the load balancing strategy; determine the MySQL database node with the smallest weight as the target database node, and Database access requests are routed to target database nodes.
在一种实施方式中,虚拟数据库用于:计算当前MySQL数据库节点的路由频繁程度;计算当前MySQL数据库节点在当前时刻的负载评分;将路由频繁程度和负载评分之和,作为当前MySQL数据库节点的权重。In one embodiment, the virtual database is used to: calculate the routing frequency of the current MySQL database node; calculate the load score of the current MySQL database node at the current moment; use the sum of the routing frequency and load scoring as the current MySQL database node Weights.
在一种实施方式中,虚拟数据库用于:按照第一公式计算当前MySQL数据库节点的路由频繁程度;第一公式为:Wu=Ci/CS,Wu为MySQL数据库节点i的路由频繁程度,Ci为MySQL数据库节点i的被路由次数,CS为预设的被路由次数最大值。In one embodiment, the virtual database is used to: calculate the routing frequency of the current MySQL database node according to the first formula; the first formula is: W u =C i /C S , where W u is the routing frequency of the MySQL database node i degree, C i is the routing times of MySQL database node i, and C S is the preset maximum routing times.
在一种实施方式中,虚拟数据库用于:按照第二公式计算当前MySQL数据库节点在当前时刻的负载评分;第二公式为:Wload=LCPU×a+Lm×b+LIO×c,Wload为当前MySQL数据库节点的负载评分,LCPU为当前MySQL数据库节点的CPU负载,Lm为当前MySQL数据库节点的内存负载,LIO为当前MySQL数据库节点的IO负载,a、b、c均为预设系数。In one embodiment, the virtual database is used to: calculate the load score of the current MySQL database node at the current moment according to the second formula; the second formula is: W load =L CPU ×a+L m ×b+L IO ×c , W load is the load score of the current MySQL database node, L CPU is the CPU load of the current MySQL database node, L m is the memory load of the current MySQL database node, L IO is the IO load of the current MySQL database node, a, b, c are preset coefficients.
在一种实施方式中,虚拟数据库用于:定时采集并记录虚拟数据库纳管的所有MySQL数据库节点的运行状态;若任意MySQL数据库节点故障,则为该MySQL数据库节点添加故障标识。In one embodiment, the virtual database is used to: regularly collect and record the running status of all MySQL database nodes managed by the virtual database; if any MySQL database node fails, add a failure identifier for the MySQL database node.
在一种实施方式中,虚拟数据库用于:在虚拟数据库运行过程中,通过配置更新命令对虚拟数据库已纳管的节点序列中的MySQL数据库节点进行增加、删除或修改,得到更新后的节点序列;逐一对更新后的节点序列中的各MySQL数据库节点进行管理配置。In one embodiment, the virtual database is used to: add, delete or modify the MySQL database nodes in the node sequence managed by the virtual database through configuration update commands during the running of the virtual database to obtain an updated node sequence ; Manage and configure each MySQL database node in the updated node sequence one by one.
在一种实施方式中,虚拟数据库用于:在更新后的节点序列中确定新增MySQL数据库节点;逐一对新增MySQL数据库节点进行管理配置后,再对更新后的节点序列中的剩余MySQL数据库节点进行管理配置。In one embodiment, the virtual database is used to: determine the newly added MySQL database nodes in the updated node sequence; after managing and configuring the newly added MySQL database nodes one by one, the remaining MySQL databases in the updated node sequence Nodes are managed and configured.
在一种实施方式中,虚拟数据库用于:将新增MySQL数据库节点的IP地址、端口、数据库账号及数据库登录密码配置于虚拟数据库。In one embodiment, the virtual database is used to: configure the IP address, port, database account and database login password of the newly added MySQL database node in the virtual database.
在一种实施方式中,虚拟数据库用于:根据用户操作对虚拟数据库的服务配置进行查询、增加、删除或修改;服务配置包括:最大可用连接数、最大空闲连接数、最长等待时间、访问地址、访问端口、虚拟数据库账号及虚拟数据库登录密码。In one embodiment, the virtual database is used to: query, add, delete or modify the service configuration of the virtual database according to user operations; the service configuration includes: the maximum number of available connections, the maximum number of idle connections, the longest waiting time, access Address, access port, virtual database account and virtual database login password.
在一种实施方式中,虚拟数据库用于:若虚拟数据库停止运行,则对虚拟数据库已纳管的节点序列中的MySQL数据库节点进行增加、删除或修改,并重启虚拟数据库。In one embodiment, the virtual database is used to: if the virtual database stops running, add, delete or modify the MySQL database nodes in the node sequence already managed by the virtual database, and restart the virtual database.
下面对本申请实施例提供的一种电子设备进行介绍,下文描述的一种电子设备与上文描述的一种数据库访问方法及装置可以相互参照。An electronic device provided by an embodiment of the present application is introduced below, and the electronic device described below and the database access method and apparatus described above may refer to each other.
参见图4所示,本申请实施例公开了一种电子设备,包括:Referring to Figure 4, the embodiment of the present application discloses an electronic device, including:
存储器401,用于保存计算机程序;
处理器402,用于执行所述计算机程序,以实现上述任意实施例公开的方法。The
进一步的,本申请实施例还提供了一种服务器来作为上述电子设备。该服务器,具体可以包括:至少一个处理器、至少一个存储器、电源、通信接口、输入输出接口和通信总线。其中,所述存储器用于存储计算机程序,所述计算机程序由所述处理器加载并执行,以实现前述任一实施例公开的数据库访问方法中的相关步骤。Further, the embodiment of the present application also provides a server as the above-mentioned electronic device. The server may specifically include: at least one processor, at least one memory, a power supply, a communication interface, an input and output interface, and a communication bus. Wherein, the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement relevant steps in the database access method disclosed in any of the foregoing embodiments.
本实施例中,电源用于为服务器上的各硬件设备提供工作电压;通信接口能够为服务器创建与外界设备之间的数据传输通道,其所遵循的通信协议是能够适用于本申请技术方案的任意通信协议,在此不对其进行具体限定;输入输出接口,用于获取外界输入数据或向外界输出数据,其具体的接口类型可以根据具体应用需要进行选取,在此不进行具体限定。In this embodiment, the power supply is used to provide working voltage for each hardware device on the server; the communication interface can create a data transmission channel between the server and external devices, and the communication protocol it follows is applicable to the technical solution of this application Any communication protocol is not specifically limited here; the input/output interface is used to obtain external input data or output data to the external, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
另外,存储器作为资源存储的载体,可以是只读存储器、随机存储器、磁盘或者光盘等,其上所存储的资源包括操作系统、计算机程序及数据等,存储方式可以是短暂存储或者永久存储。In addition, memory, as a resource storage carrier, can be read-only memory, random access memory, magnetic disk or optical disk, etc. The resources stored on it include operating system, computer program and data, etc., and the storage method can be temporary storage or permanent storage.
其中,操作系统用于管理与控制服务器上的各硬件设备以及计算机程序,以实现处理器对存储器中数据的运算与处理,其可以是Windows Server、Netware、Unix、Linux等。计算机程序除了包括能够用于完成前述任一实施例公开的数据库访问方法的计算机程序之外,还可以进一步包括能够用于完成其他特定工作的计算机程序。数据除了可以包括虚拟机等数据外,还可以包括虚拟机的开发商信息等数据。Wherein, the operating system is used to manage and control various hardware devices and computer programs on the server, so as to realize the calculation and processing of the data in the memory by the processor, which may be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the database access method disclosed in any of the foregoing embodiments, the computer program can further include a computer program that can be used to complete other specific tasks. In addition to data such as the virtual machine, the data may also include data such as developer information of the virtual machine.
进一步的,本申请实施例还提供了一种终端来作为上述电子设备。该终端具体可以包括但不限于智能手机、平板电脑、笔记本电脑或台式电脑等。Further, the embodiment of the present application also provides a terminal as the above-mentioned electronic device. The terminal specifically may include, but is not limited to, a smart phone, a tablet computer, a notebook computer or a desktop computer, and the like.
通常,本实施例中的终端包括有:处理器和存储器。Generally, the terminal in this embodiment includes: a processor and a memory.
其中,处理器可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器还可以包括AI(ArtificialIntelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。Wherein, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor can be realized by at least one hardware form of DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, programmable logic array) . The processor can also include a main processor and a coprocessor, the main processor is a processor for processing data in the wake-up state, also called a CPU (Central Processing Unit, central processing unit); Low-power processor for processing data in standby state. In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used for rendering and drawing content that needs to be displayed on the display screen. In some embodiments, the processor may further include an AI (Artificial Intelligence, artificial intelligence) processor, where the AI processor is configured to process computing operations related to machine learning.
存储器可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。本实施例中,存储器至少用于存储以下计算机程序,其中,该计算机程序被处理器加载并执行之后,能够实现前述任一实施例公开的由终端侧执行的数据库访问方法中的相关步骤。另外,存储器所存储的资源还可以包括操作系统和数据等,存储方式可以是短暂存储或者永久存储。其中,操作系统可以包括Windows、Unix、Linux等。数据可以包括但不限于应用程序的更新信息。The memory may include one or more computer-readable storage media, which may be non-transitory. Memory may also include high-speed random access memory, and non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory is at least used to store the following computer program, wherein, after the computer program is loaded and executed by the processor, it can implement the relevant steps in the database access method performed by the terminal side disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory may also include an operating system and data, etc., and the storage method may be temporary storage or permanent storage. Wherein, the operating system may include Windows, Unix, Linux and so on. Data may include, but is not limited to, application update information.
在一些实施例中,终端还可包括有显示屏、输入输出接口、通信接口、传感器、电源以及通信总线。In some embodiments, the terminal may further include a display screen, an input/output interface, a communication interface, a sensor, a power supply, and a communication bus.
下面对本申请实施例提供的一种可读存储介质进行介绍,下文描述的一种可读存储介质与上文描述的一种数据库访问方法、装置及设备可以相互参照。A readable storage medium provided by an embodiment of the present application is introduced below. The readable storage medium described below and the database access method, device, and device described above may refer to each other.
一种可读存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现前述实施例公开的数据库访问方法。A readable storage medium is used to store a computer program, wherein when the computer program is executed by a processor, the database access method disclosed in the foregoing embodiments is implemented.
本申请涉及的“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法或设备固有的其它步骤或单元。"First", "second", "third", "fourth" and the like referred to in the present application, if any, are used to distinguish similar objects and not necessarily to describe a specific order or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, e.g. a process, method or apparatus comprising a series of steps or elements is not necessarily limited to those steps or elements explicitly listed , but may include other steps or elements not explicitly listed or inherent to the process, method or apparatus.
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。It should be noted that the descriptions in this application involving "first", "second" and so on are for descriptive purposes only, and should not be understood as indicating or implying their relative importance or implicitly indicating the number of indicated technical features . Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In addition, the technical solutions of the various embodiments can be combined with each other, but it must be based on the realization of those skilled in the art. When the combination of technical solutions is contradictory or cannot be realized, it should be considered that the combination of technical solutions does not exist , nor within the scope of protection required by the present application.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same or similar parts of each embodiment can be referred to each other.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的可读存储介质中。The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be directly implemented by hardware, software modules executed by a processor, or a combination of both. Software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other Any other known readable storage medium.
本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。In this paper, specific examples are used to illustrate the principles and implementation methods of the application. The descriptions of the above embodiments are only used to help understand the method and core idea of the application; meanwhile, for those of ordinary skill in the art, according to the application There will be changes in the specific implementation and scope of application. In summary, the content of this specification should not be construed as limiting the application.
Claims (13)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211417410.7A CN115470303B (en) | 2022-11-14 | 2022-11-14 | Database access method, device, system, equipment and readable storage medium |
PCT/CN2023/115587 WO2024103902A1 (en) | 2022-11-14 | 2023-08-29 | Database access method, apparatus and system, and device and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211417410.7A CN115470303B (en) | 2022-11-14 | 2022-11-14 | Database access method, device, system, equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115470303A CN115470303A (en) | 2022-12-13 |
CN115470303B true CN115470303B (en) | 2023-03-03 |
Family
ID=84338237
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211417410.7A Active CN115470303B (en) | 2022-11-14 | 2022-11-14 | Database access method, device, system, equipment and readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115470303B (en) |
WO (1) | WO2024103902A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115470303B (en) * | 2022-11-14 | 2023-03-03 | 苏州浪潮智能科技有限公司 | Database access method, device, system, equipment and readable storage medium |
CN119128004A (en) * | 2024-08-22 | 2024-12-13 | 中国电信股份有限公司技术创新中心 | Data caching method, system, device and medium |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103905530A (en) * | 2014-03-11 | 2014-07-02 | 浪潮集团山东通用软件有限公司 | High-performance global load balance distributed database data routing method |
US10528586B2 (en) * | 2016-12-20 | 2020-01-07 | International Business Machines Corporation | Database process with virtual nodes |
CN107066575B (en) * | 2017-04-11 | 2021-01-15 | 广东亿迅科技有限公司 | Method and system for realizing database read-write load balance |
US20190065258A1 (en) * | 2017-08-30 | 2019-02-28 | ScalArc Inc. | Automatic Provisioning of Load Balancing as Part of Database as a Service |
CN110225087A (en) * | 2019-05-08 | 2019-09-10 | 平安科技(深圳)有限公司 | Cloud access method, device and storage medium based on global load balancing |
CN110727709A (en) * | 2019-10-10 | 2020-01-24 | 北京优炫软件股份有限公司 | Cluster database system |
CN113377866B (en) * | 2021-06-10 | 2024-09-17 | 全球能源互联网研究院有限公司 | Load balancing method and device for virtualized database proxy service |
CN114564530B (en) * | 2022-02-25 | 2024-10-15 | 苏州浪潮智能科技有限公司 | Database access method, device, equipment and storage medium |
CN115470303B (en) * | 2022-11-14 | 2023-03-03 | 苏州浪潮智能科技有限公司 | Database access method, device, system, equipment and readable storage medium |
-
2022
- 2022-11-14 CN CN202211417410.7A patent/CN115470303B/en active Active
-
2023
- 2023-08-29 WO PCT/CN2023/115587 patent/WO2024103902A1/en unknown
Also Published As
Publication number | Publication date |
---|---|
CN115470303A (en) | 2022-12-13 |
WO2024103902A1 (en) | 2024-05-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210168034A1 (en) | Configuration and management of scalable global private networks | |
WO2024103902A1 (en) | Database access method, apparatus and system, and device and readable storage medium | |
US11729077B2 (en) | Configuration and management of scalable global private networks | |
CN106464532B (en) | A network state management method and device | |
US20100318608A1 (en) | Systems and methods for efficient live application migration within bandwidth constrained networks | |
US20180004777A1 (en) | Data distribution across nodes of a distributed database base system | |
US20220357981A1 (en) | Migrating the runtime state of a container between two nodes | |
KR20140014273A (en) | Method and system for dynamically creating and servicing master-slave pairs within and across switch fabrics of a portable computing device | |
US12273408B1 (en) | Migrating an on premises workload to a web services platform | |
CN107666493B (en) | Database configuration method and equipment thereof | |
CN105302536A (en) | Configuration method and apparatus for related parameters of MapReduce application | |
CN115061813A (en) | Cluster resource management method, device, equipment and medium | |
CN115801569B (en) | Access rule deployment method, device, equipment, medium and cloud platform | |
CN115328662A (en) | A process thread resource management control method and system | |
US10019182B2 (en) | Management system and management method of computer system | |
CN115878269A (en) | Cluster migration method, related device and storage medium | |
US8621260B1 (en) | Site-level sub-cluster dependencies | |
CN111147312A (en) | Resource allocation management method and device, resource allocation cache management method and device, and allocation management system | |
CN118170324B (en) | Cloud hard disk migration method and device, electronic equipment and storage medium | |
CN110247801A (en) | A kind of monitoring system and method for pair of cluster host | |
CN105094947A (en) | Method and system for quotas management of virtual computing resource | |
WO2023029485A1 (en) | Data processing method and apparatus, computer device, and computer-readable storage medium | |
CN108694102A (en) | A kind of data manipulation method, equipment, system and medium based on Nexus services | |
CN114371911A (en) | Virtual machine scheduling method, apparatus, electronic device and readable storage medium | |
JP2014126940A (en) | Cloud configuration management support system, cloud configuration management support method and cloud configuration management support program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |