A data management method, device, server and storage medium
A data management and server technology, applied in the field of data processing, to achieve the effect of improving the utilization rate of shards
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0027] figure 1 It is a flowchart of a data management method provided in Embodiment 1 of the present invention. This embodiment can be applied to the situation of data management in a distributed system. The method can be executed by a data management device, and the device can use software / hardware. way to achieve. The device may be configured in an application server that performs data management. like figure 1 As shown, the method specifically includes:
[0028] Step S110, obtaining routing rule data.
[0029] The routing rule data is used to indicate the mapping relationship between the key of the business data and the database number, and the key of the business data may be a route named according to the business data.
[0030] The database number is the number of the database shard. For example, sharding the database to obtain a set number of database shards. The set number is an empirical value, and the number of pieces to divide the database can be determined ac...
Embodiment 2
[0048] figure 2 is a flowchart of another data management method in the second embodiment of the present invention. This embodiment is optimized on the basis of the above-mentioned embodiments, such as figure 2 As shown, the method includes:
[0049] Step S210, creating a Redis connection pool.
[0050] The Redis connection pool is connected between the application server and the Redis server, and is used to store the connection relationship between the application server and the Redis server. The application server pre-establishes a Redis connection pool. When a connection needs to be used, the application server obtains the established connection from the Redis connection pool through a certain algorithm, and returns it to the connection pool after use, which eliminates the need for database connections. time.
[0051] Step S220, determine whether the Redis connection pool is created, if so, execute step S230; otherwise, return to step S210.
[0052] Exemplarily, perio...
Embodiment 3
[0064] image 3 is a flowchart of another data management method in Embodiment 3 of the present invention. This embodiment is optimized on the basis of the above-mentioned embodiments, such as image 3 As shown, the method includes:
[0065] Step S310 , query the setting database according to the preset frequency to obtain routing rule data.
[0066] The setting database is a common database that is connected to the application server in advance and is used to store routing rule data. The setting database may be a relational database management system, such as MySQL.
[0067] Exemplarily, the routing rule data is pre-stored in MySQL, and when the application in the business center starts, the application server queries MySQL, and loads the routing rule data in MySQL into the memory of the application server.
[0068] Optionally, the application server may periodically read the routing rule data in the setting database. For example, the application server cooperates with sch...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


