Supercharge Your Innovation With Domain-Expert AI Agents!

Database read-write separation method and platform

A read-write separation and database technology, which is applied in database distribution/replication, database update, structured data retrieval, etc., can solve the problems of automatic read-write separation of services, and can not solve the problem of immediate read delay after writing, and achieves the accuracy rate High and responsive effects

Inactive Publication Date: 2022-03-04
纳里健康科技有限公司
View PDF13 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In a distributed scenario, due to the complexity of calling links between services, in an existing huge business system, the above two solutions cannot solve the problem of delay in reading immediately after writing, so it is not possible to automatically read all services Write separation, otherwise some online problems will occur

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Database read-write separation method and platform
  • Database read-write separation method and platform

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0039] Such as figure 1 As shown, the embodiment of the present invention discloses a database reading and writing separation method, which is applied to a platform including a client, a gateway, a background micro-service cluster, a master database and a slave database, including the following steps:

[0040] Step 1. The user sends a gateway service request to the gateway through the client application;

[0041] Step 2: After receiving the gateway service re...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention belongs to the technical field of database data processing, and particularly relates to a database read-write separation method which comprises the following steps: a user sends a gateway service request to a gateway through a client application; after the gateway receives the gateway service request, the read-only information of the service is loaded from the gateway service cache, and the read-only attribute of the service is judged; if the gateway service is a write service, the background micro-service cluster sends the service to a main database, and the main database executes a write operation according to the service, receives a write response returned by the main database, and returns the write response to the client through the gateway; and if the gateway service is the read-only service, dynamically switching the background micro-service cluster, sending the service to the slave database, receiving a read-only response returned by the slave database, and returning the read-only response to the client through the gateway. The defects in the prior art are overcome, the gateway service is judged and marked, and read-only and write are separated to the slave database and the master database.

Description

technical field [0001] The invention belongs to the technical field of database data processing, and in particular relates to a database reading and writing separation method and platform. Background technique [0002] Since all read and write operations fall on the main database, as the number of users of the platform increases, the pressure on the database gradually increases, so it is decided to implement read and write separation. [0003] Regarding the read-write separation scheme, the most commonly used ones in the industry are as follows: [0004] Solution 1: The application judges according to the business logic, sends write operation commands such as adding, deleting, and modifying to the main database, and sends query commands to the standby database. [0005] Solution 2: Use middleware as a proxy, responsible for identifying whether to read or write database requests, and distribute them to different databases. [0006] Common middleware: [0007] <1>MySQ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/23G06F16/27
CPCG06F16/23G06F16/27
Inventor 刘琛王宁武赵铁猫杨宣志
Owner 纳里健康科技有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More