Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Master-slave architecture server, service processing method thereof and service processing system thereof

A server, master-slave technology, applied in the computer field, can solve the problems of inability to fine-tune, reduce server performance, load unbalanced inter-process communication, etc., to avoid the phenomenon of shocking groups and improve business processing efficiency.

Active Publication Date: 2016-02-17
TAOBAO CHINA SOFTWARE
View PDF4 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] (1) Multiple working processes listen to the same port at the same time. When a request is sent to a certain port, multiple working processes will compete for the right to process the request. In the end, only one process can successfully compete, which causes a shocking crowd Phenomenon;
[0006] (2) In a real production environment, especially in a virtual machine environment, some processes are more likely to succeed in competing requests than other processes, causing some processes to receive a large number of requests and be overly busy, while other processes cannot get requests and are overly idle. The load imbalance between processes cannot give full play to the advantages of the SMP architecture;
[0007] (3) When the working process exists, that is, some requests can only be processed correctly if they are received by a specific working process. In this case, if these requests are received by other processes, the process receiving the request can only seek help from other processes , which increases the communication cost
For example, each working process independently maintains its own cache, which stores the user's personal information. If the personal information of user A is in the cache of process B, when the request initiated by A is received by process C, since process C does not have user A personal information, so it is impossible to directly give a correct answer to user A
At this time, it can only be obtained from process B through process communication. This behavior not only increases the execution complexity of processes B and C, but also increases the response time to A's request;
[0008] (4) The configuration of the working process is uniformly inherited from the parent process, and the configuration is the same and cannot be fine-tuned;
[0009] (5) In order to solve problems such as thundering herd phenomenon, load imbalance and unnecessary inter-process communication, it is inevitable to introduce process locks. Multiple processes solve the synchronization and mutual exclusion problems between processes through process locks, but the introduction of process locks It will also increase the execution complexity of the process and reduce the performance of the server

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
  • Master-slave architecture server, service processing method thereof and service processing system thereof
  • Master-slave architecture server, service processing method thereof and service processing system thereof
  • Master-slave architecture server, service processing method thereof and service processing system thereof

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] Embodiments of the present application are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary, and are intended to explain the present application, and should not be construed as limiting the present application.

[0023] The method for processing services by a master-slave architecture server, the master-slave architecture server, and the system for processing services in the embodiments of the present application will be described below with reference to the accompanying drawings.

[0024] figure 2 It is a flowchart of a method for processing business by a master-slave architecture server according to an embodiment of the present application, wherein the master-slave architecture server includes a parent process and at least one chi...

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 master-slave architecture server, a service processing method thereof and a service processing system thereof. The service processing method of the master-slave architecture server comprises the steps of analyzing and uploading a configuration file by a parent process of the master-slave architecture server, wherein the configuration file includes multiple ports and a process serial number which is in one-to-one correspondence with each port; distributing different process serial numbers for established sub-processes by the parent process; inheriting corresponding resources from the parent process based on the process serial number by each sub-process, wherein the resources include ports; and, by the sub-processes, monitoring corresponding ports to receive a service request from a client, processing the service request and then returning a service response to the client. According to the embodiment of the invention, as different sub-processes respectively monitor reading-writing events of different ports, the service request of one port can be completely processed by one sub-process, the sub-processes are completely independent and no longer compete with each other for the service request, and a thundering-herd phenomenon is accordingly avoided.

Description

technical field [0001] The present application relates to the field of computer technology, and in particular to a master-slave architecture server, a method for processing business, and a system for processing business. Background technique [0002] Currently, many servers have a multi-core central processing unit (CPU) and support a Symmetric Multi-Processing (Symmetric Multi-Processing, SMP) architecture. In order to make full use of CPU resources, many high-performance servers adopt a master-slave architecture. The schematic diagram of the master-slave architecture is shown in figure 1 As shown, the parent process first parses and loads the configuration file, creates a socket and binds the listening port, and then creates multiple child processes, each of which inherits the resources of the parent process. The number of sub-processes is the same as the number of cores of the CPU. In order to prevent sub-processes from migrating between CPUs, sub-processes can also be b...

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): H04L12/24
Inventor 陈虓将
Owner TAOBAO CHINA SOFTWARE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products