Migration method, electronic equipment and storage medium for microservices in multi-computer rooms

A micro-service and multi-computer room technology, applied in the field of information processing, can solve problems such as data inconsistency and data conflicts in multiple computer rooms, and achieve the effect of avoiding data conflicts and optimizing migration methods

Active Publication Date: 2020-07-17
ZHANGYUE TECH CO LTD
View PDF10 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In actual application scenarios, there may also be situations where services need to be migrated from one computer room to another due to traffic balance, network conditions, etc. However, there is a delay in data synchronization between multiple computer rooms. Once the service is completed Data synchronization between multiple computer rooms is not completed in time during the migration, so data inconsistencies in multiple computer rooms may occur, and there is a problem of data conflicts

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
  • Migration method, electronic equipment and storage medium for microservices in multi-computer rooms
  • Migration method, electronic equipment and storage medium for microservices in multi-computer rooms
  • Migration method, electronic equipment and storage medium for microservices in multi-computer rooms

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0029] figure 1 A schematic flowchart of a method for migrating microservices in multiple computer rooms according to Embodiment 1 of the present invention is shown, such as figure 1 As shown, the method includes the following steps:

[0030] Step S101 , according to the data migration request for the microservice to be migrated, determine the source host room and the target host room corresponding to the microservice to be migrated.

[0031] Specifically, the host room and the slave room are pre-configured for each microservice in the configuration center. Microservices refer to services that can be deployed independently and have high cohesion characteristics. Different microservices also have low coupling characteristics. Those skilled in the art can configure the host room and the slave room for each microservice according to actual needs, so as to ensure that the traffic in the computer room is balanced. Assuming that the e-book reading server contains 4 microservices, ...

Embodiment 2

[0043] figure 2 It shows a schematic flowchart of a method for migrating microservices in multiple computer rooms according to Embodiment 2 of the present invention, as shown in figure 2 As shown, the method includes the following steps:

[0044] Step S201, configuring the master computer room and the slave computer room for each microservice in the configuration center.

[0045] In the configuration center, the master room and the slave room can be configured for each microservice based on principles such as machine room traffic balance. For each microservice, the host computer room of the microservice is used to provide external data access. When the host computer room provides external data access, the slave computer room of the microservice does not provide external data access, but serves as a hot backup. Among them, some microservices need to call each other, for example, multiple microservices related to user-generated content need to call each other, or multiple mi...

Embodiment 3

[0063] Embodiment 3 of the present invention provides a non-volatile storage medium, where the storage medium stores at least one executable instruction, and the executable instruction can execute the method for migrating microservices in multiple computer rooms in any of the foregoing method embodiments.

[0064] The executable instructions can specifically be used to cause the processor to perform the following operations: according to the data migration request for the microservice to be migrated, determine the source host room and the target host room corresponding to the microservice to be migrated; use the switch component to turn off the microservice to be migrated at the source External data access of the host room; generate probe data, write the probe data into the data access log of the source host room, and synchronize the data access log of the source host room to the target host room; the target host room reads the data access log Update the database. When the prob...

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 discloses a migration method for micro-services in multiple machine rooms, an electronic device and a storage medium, and the method comprises the steps: determining a source main machine room and a target main machine room corresponding to a to-be-migrated micro-service according to a data migration request for the to-be-migrated micro-service; closing external data access of the to-be-migrated micro-service in the source main machine room by utilizing the switch assembly; generating probe data, writing the probe data into a data access log of the source main machine room, and synchronizing the data access log of the source main machine room to the target main machine room; the target main machine room reading the data access log to update the database, and when the probe data is read, the switch assembly being used for starting external data access of the to-be-migrated micro-service in the target main machine room. The scheme ensures that the target main machine room provides external data access for the to-be-migrated micro-service only after the source main machine room and the target main machine room finish data synchronization, so that data conflicts caused bymigration of the micro-service among a plurality of machine rooms are effectively avoided.

Description

technical field [0001] The invention relates to the technical field of information processing, in particular to a migration method, electronic equipment and storage medium of microservices in multiple computer rooms. Background technique [0002] Users can use the client to obtain services provided by the server, such as downloading e-books from the server, browsing e-book comment information, and so on. In order to manage the server and ensure the normal operation of the server business, the operator will store the server in the computer room, and the temperature, humidity and anti-static measures of the computer room have strict requirements. In order to prevent the service interruption caused by the failure of the server in the computer room, computer rooms are generally set up in multiple places, so that after one computer room hangs up, reliable services can be provided through another computer room. Users can access the required services through any computer room. Und...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/48
CPCG06F9/4806G06F9/4856
Inventor 贺鹏飞
Owner ZHANGYUE TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products