Method and device for reading and writing separation of database

A read-write separation and database technology, applied in the computer field, can solve problems such as inconvenient maintenance, inconvenient troubleshooting, complex configuration, etc.

CN107301179AInactive Publication Date: 2017-10-27BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
6 Cites 5 Cited by

Patent Information

Authority / Receiving Office
CN · China
Current Assignee / Owner
Publication Date
2017-10-27
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a method and a device for reading and writing separation of a database. One embodiment of the method comprises the steps that a business request of a user is acquired through a web access layer; a business method of the business request is named according to a business type of the business request; the business method is intercepted through a pre-declared aspect oriented programming interception class; and according to an interception result of the aspect oriented programming interception class, the business request is linked to a master base of the database for corresponding writing operation, or the business request is linked to a slave base of the database for corresponding reading operation. Through the embodiment, reading and writing separation of the database is realized.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present application relates to the field of computer technology, specifically to the field of Internet technology, and in particular to a method and device for separating reads and writes from a database. Background technique

[0002] With the development of the Internet, the application of large databases has become an indispensable part of web applications. When a large amount of data accesses the database concurrently, the number of database reads and writes is huge, causing the database access pressure to increase exponentially. In the daily Java web application background business implementation scenario, in order to disperse the pressure on the database, many data sources are configured, and usually, each data source corresponds to a separate IP address, and in these databases In the middle, the data source needs to be divided into main database and slave database. The main database is mainly used to undertake the demand of writing data, and...

Examples

Embodiment Construction

[0025] The application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain related inventions, rather than to limit the invention. It should also be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.

[0026] It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and embodiments.

[0027] figure 1 Shown is an exemplary system architecture 100 to which embodiments of the database read-write separation method or the database read-write separation apparatus of the present application can be applied.

[0028] Such as figure 1 As shown, the system archite...