CN112448985B - Distributed system, network processing method and device and electronic equipment - Google Patents
Distributed system, network processing method and device and electronic equipment Download PDFInfo
- Publication number
- CN112448985B CN112448985B CN201910824768.3A CN201910824768A CN112448985B CN 112448985 B CN112448985 B CN 112448985B CN 201910824768 A CN201910824768 A CN 201910824768A CN 112448985 B CN112448985 B CN 112448985B
- Authority
- CN
- China
- Prior art keywords
- unit
- service
- routing table
- service unit
- global routing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/10—Mapping addresses of different types
- H04L61/103—Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/63—Routing a service request depending on the request content or context
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention provides a distributed system, a network processing method and device and electronic equipment. The system comprises: a plurality of clients and a plurality of distributed collaborative service units, the system further comprising: and the intermediate node is used for receiving the service request sent by the client, inquiring a global routing table according to the service request, acquiring a corresponding target distributed cooperative service unit from the global routing table, and sending the service request to the target distributed cooperative service unit. The embodiment of the invention routes the service request sent by the client to the corresponding distributed cooperative service unit according to the global routing table by arranging the intermediate node between the client and the distributed cooperative service unit providing service for the client, thereby avoiding storing the global routing table in each client and reducing the maintenance cost of the global routing table; meanwhile, the global routing table can be dynamically updated, so that online migration of services can be supported.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a distributed system, a network processing method and apparatus, and an electronic device.
Background
In a cloud computing environment, cloud computing services are typically provided by a union of multiple servers. In order to meet the service access requirement under the scenarios of server automatic scaling, machine failure or version upgrade, a distributed cooperative service unit is usually arranged between a service provider (e.g., an application server) and a service caller (e.g., an application client), and is used as a registration center of a third party to provide address registration and address resolution functions for both parties.
Fig. 1 is a schematic diagram of a single distributed collaboration service unit in the prior art. As shown in fig. 1, the application server sends an address registration request to the distributed collaborative service unit, for example, stores the correspondence between the name address and the IP address in the distributed collaborative service unit to register the IP address; and when the application client accesses the application service, an address resolution request is sent to the distributed cooperative service unit according to the public name address of the application server so as to resolve the IP address corresponding to the name address, and then the application service is accessed according to the obtained IP address.
With the rapid development of business scale, the service capacity of a single distributed cooperative service unit cannot meet the ever-increasing address registration demand, and therefore, a plurality of distributed cooperative service units need to be deployed to form a distributed cooperative service unit group to improve the total service capacity.
Fig. 2 is a schematic diagram of setting up a plurality of distributed collaborative service units in the prior art. As shown in fig. 2, different distributed collaborative service units provide address registration services for different application servers, and when an application client accesses an application service, the application client first needs to find a distributed collaborative service unit that provides an address registration service for a corresponding application server, and then accesses the distributed service unit to perform address resolution. Therefore, a global routing table needs to be introduced to record the correspondence between the unit name of each distributed collaborative service unit and the access entry thereof. When the client end which carries out address registration sends an address registration request and when the client end which carries out address analysis sends an address analysis request, the access entrance of the distributed cooperative service unit which needs to be accessed is obtained by reading the global routing table.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems: in the prior art, a global routing table is stored in each address registration client and each address resolution client, and the global routing table needs to be maintained by all the clients together, so that the maintenance cost is high; meanwhile, the global routing table is stored in all the clients, so that the global routing table can only be static and cannot be updated in real time, and online migration of services cannot be supported.
Disclosure of Invention
Embodiments of the present invention provide a distributed system, a network processing method and apparatus, and an electronic device, so as to solve the defects that in the prior art, a global routing table is high in maintenance cost and cannot support online migration of services.
To achieve the above object, an embodiment of the present invention provides a distributed system, including: a plurality of clients and a plurality of distributed collaborative service units, the system further comprising:
the intermediate node is configured to receive a service request sent by the client, query a global routing table according to the service request, obtain a corresponding target distributed collaborative service unit from the global routing table, and send the service request to the target distributed collaborative service unit, where the global routing table is used to record a correspondence between the plurality of distributed collaborative service units and the client.
An embodiment of the present invention further provides a network processing method, including:
receiving a service request sent by a client;
querying a global routing table according to the service request, wherein the global routing table is used for recording the corresponding relation between a plurality of distributed collaborative service units and a user tenant;
and sending the service request to a corresponding target distributed collaborative service unit so that the target distributed collaborative service unit provides service for the client.
An embodiment of the present invention further provides a network processing method, including:
storing a global routing table, wherein the global routing table is used for recording the corresponding relation between a plurality of distributed cooperative service units and user tenants, and the distributed cooperative service units comprise a registration unit for providing address registration service and an analysis unit for providing address analysis service;
when a registered address migration instruction for changing a distributed cooperative service unit corresponding to the user tenant from a source distributed cooperative service unit to a target distributed cooperative service unit is received, updating an analysis unit corresponding to the user tenant and recorded in the global routing table to the source distributed cooperative service unit and the target distributed cooperative service unit, wherein the priority of a return result of the source distributed cooperative service unit is higher than that of the target distributed cooperative service unit;
when an intermediate node sends a subscription change event notification to an address registration client in the user tenant, setting the priority of a return result of a target distributed cooperative service unit in an analysis unit corresponding to the user tenant, which is recorded in the global routing table, to be higher than that of a return result of a source distributed cooperative service unit, and updating a registration unit corresponding to the user tenant, which is recorded in the global routing table, to be the target distributed cooperative service unit, wherein the subscription change event notification is used for triggering the address registration client to perform address registration again;
when all address registration clients in the user tenants finish address registration again, changing the analysis unit corresponding to the user tenants recorded in the global routing table into the target distributed cooperative service unit.
An embodiment of the present invention further provides a network processing apparatus, including:
the receiving module is used for receiving a service request sent by a client;
the query module is used for querying a global routing table according to the service request, wherein the global routing table is used for recording the corresponding relation between a plurality of distributed collaborative service units and a user tenant;
and the first sending module is used for sending the service request to a corresponding target distributed collaborative service unit so that the target distributed collaborative service unit provides service for the client.
An embodiment of the present invention further provides a network processing apparatus, including:
the system comprises a storage module, a processing module and a processing module, wherein the storage module is used for storing a global routing table, the global routing table is used for recording the corresponding relation between a plurality of distributed cooperative service units and user tenants, and the distributed cooperative service units comprise a registration unit for providing address registration service and an analysis unit for providing address analysis service;
a first updating module, configured to update, when a registered address migration instruction for changing a distributed collaborative service unit corresponding to the user tenant from a source distributed collaborative service unit to a target distributed collaborative service unit is received, an analysis unit corresponding to the user tenant recorded in the global routing table to the source distributed collaborative service unit and the target distributed collaborative service unit, where a priority of a return result of the source distributed collaborative service unit is higher than a priority of a return result of the target distributed collaborative service unit;
a second updating module, configured to set, when a subscription change event notification is sent to an address registration client in the user tenant by an intermediate node, a priority of a return result of a target distributed collaborative service unit in an parsing unit corresponding to the user tenant, which is recorded in the global routing table, to be higher than a return result of a source distributed collaborative service unit, and update a registration unit, which is recorded in the global routing table and corresponds to the user tenant, to the target distributed collaborative service unit, where the subscription change event notification is used to trigger the address registration client to perform address registration again;
and the third updating module is used for changing the analysis unit which is recorded in the global routing table and corresponds to the user tenant into the target distributed cooperative service unit when all address registration clients in the user tenant complete address registration again.
An embodiment of the present invention further provides a network processing method, including:
generating a service request according to a service instruction input by a user;
and sending the service request to an intermediate node, so that the intermediate node queries a global routing table according to the service request and sends the service request to a corresponding target distributed cooperative service unit, wherein the global routing table is used for recording the corresponding relation between a plurality of distributed cooperative service units and a user tenant.
An embodiment of the present invention further provides an electronic device, including:
a memory for storing a program;
a processor for executing the program stored in the memory for:
receiving a service request sent by a client;
querying a global routing table according to the service request, wherein the global routing table is used for recording the corresponding relation between a plurality of distributed collaborative service units and a user tenant;
and sending the service request to a corresponding target distributed collaborative service unit so that the target distributed collaborative service unit provides service for the client.
An embodiment of the present invention further provides an electronic device, including:
the device comprises a memory, a first storage unit, a second storage unit, a third storage unit and a fourth storage unit, wherein the memory is used for storing a program and a global routing table, the global routing table is used for recording the corresponding relation between a plurality of distributed cooperative service units and user tenants, and the distributed cooperative service units comprise a registration unit for providing address registration service and a resolution unit for providing address resolution service;
a processor for executing the program stored in the memory for:
when a registered address migration instruction for changing a distributed cooperative service unit corresponding to the user tenant from a source distributed cooperative service unit to a target distributed cooperative service unit is received, updating an analysis unit corresponding to the user tenant and recorded in the global routing table to the source distributed cooperative service unit and the target distributed cooperative service unit, wherein the priority of a return result of the source distributed cooperative service unit is higher than that of the target distributed cooperative service unit;
when an intermediate node sends a subscription change event notification to an address registration client in the user tenant, setting the priority of a return result of a target distributed cooperative service unit in an analysis unit corresponding to the user tenant, which is recorded in the global routing table, to be higher than that of a return result of a source distributed cooperative service unit, and updating a registration unit corresponding to the user tenant, which is recorded in the global routing table, to be the distributed cooperative target service unit, wherein the subscription change event notification is used for triggering the address registration client to perform address registration again;
and when all address registration clients in the user tenants finish address registration again, changing the analysis unit which is recorded in the global routing table and corresponds to the user tenants into the target distributed cooperative service unit.
In the distributed system, the network processing method and the device, and the electronic device provided by the embodiment of the invention, the intermediate node is arranged between the client and the distributed cooperative service unit providing service for the client, so that the service request sent by the client is routed to the corresponding distributed cooperative service unit according to the global routing table, thereby avoiding storing the global routing table in each client and reducing the maintenance cost of the global routing table; meanwhile, the global routing table can be dynamically updated, so that online migration of services can be supported.
The above description is only an overview of the technical solutions of the present invention, and the present invention can be implemented in accordance with the content of the description so as to make the technical means of the present invention more clearly understood, and the above and other objects, features, and advantages of the present invention will be more clearly understood.
Drawings
Various additional advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a schematic diagram of a prior art arrangement of a single distributed collaborative service unit;
FIG. 2 is a diagram illustrating a prior art method for providing multiple distributed collaboration service units;
FIG. 3 is a system block diagram of one embodiment of a distributed system provided by the present invention;
FIG. 4 is a system block diagram of another embodiment of a distributed system provided by the present invention;
FIG. 5 is a flow chart of one embodiment of a network processing method provided by the present invention;
fig. 6 is a flowchart of another embodiment of a network processing method provided by the present invention;
FIG. 7 is a flow chart of yet another embodiment of a network processing method provided by the present invention;
FIG. 8 is a schematic structural diagram of a network processing device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of another embodiment of a network processing apparatus provided in the present invention;
fig. 10 is a schematic structural diagram of a network processing device according to another embodiment of the present invention;
FIG. 11 is a schematic structural diagram of an embodiment of an electronic device provided in the present invention;
fig. 12 is a schematic structural diagram of another embodiment of an electronic device provided in the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In the prior art, a global routing table for recording the correspondence between the unit names of a plurality of distributed collaborative service units and the access entries thereof is stored in all clients (including an address registration client and an address resolution client), when a client sends a request (such as an address registration request, an address resolution request, and the like) related to an address service, the client obtains the access entry of a service unit to be accessed by reading the stored global routing table, and the global routing table needs to be maintained by all the clients together, so that the maintenance cost is very high; meanwhile, the global routing table can only be static and cannot support online migration of services.
Therefore, the present application proposes a network processing scheme, whose main principle is: an intermediate node is arranged between a client and a distributed cooperative service unit for providing relevant address service for the client, and the request sent by the client is routed through the intermediate node according to a global routing table, so that the global routing table is prevented from being stored in each client, the intermediate node replaces the client to maintain the global routing table, the maintenance cost of the global routing table is reduced, the global routing table can be dynamically updated, and the online migration of the service can be supported.
The above embodiments are illustrative of technical principles and exemplary application frameworks of the embodiments of the present invention, and specific technical solutions of the embodiments of the present invention are further described in detail below through a plurality of embodiments.
Example one
Fig. 3 is a system block diagram of an embodiment of a distributed system provided by the present invention. As shown in fig. 3, the distributed system provided in the embodiment of the present invention includes: a plurality of clients 31, a plurality of distributed collaborative service units 32 and at least one intermediate node 33.
The client 31 is a client for obtaining a service related to an address, and the distributed collaboration service unit 32 is configured to provide a service, such as a service related to an address, for each client 31. The intermediate node 33 is configured to receive a service request sent by the client 31, such as an analysis request, a registration request, a session request, an address subscription request, and the like, query the global routing table according to the service request, obtain a corresponding target distributed cooperative service unit 32 from the global routing table, and route the service request to the target distributed cooperative service unit 32.
In the embodiment of the present invention, the client 31 may be an address registration client (for example, a host in a cloud service product, or a server providing an application service, etc.) for obtaining an address registration service for a user, or an address resolution client (for example, a front-end machine in a cloud service product, or an application client accessing a server, etc.) for obtaining an address resolution service. When the client 31 generates a request for an address service and transmits the request to the intermediate node 33, the intermediate node 33 queries a global routing table for recording the correspondence relationship between the plurality of distributed cooperative service units 32 and the client 31 according to the request.
Specifically, after receiving the request related to the address service, the intermediate node 33 queries the global routing table according to the service unit information in the request, acquires the target distributed cooperative service unit 32 in the global routing table, and sends the request to the target distributed cooperative service unit 32, so that the target distributed cooperative service unit 32 provides the service related to the address to the client 31 that sent the request.
In the distributed system provided by the embodiment of the invention, the intermediate node is arranged between the client and the distributed cooperative service unit providing services for the client, so that the service request sent by the client is routed to the corresponding distributed cooperative service unit according to the global routing table, thereby avoiding storing the global routing table in each client and reducing the maintenance cost of the global routing table; meanwhile, the global routing table can be dynamically updated, so that online migration of services can be supported.
Example two
Fig. 4 is a system block diagram of another embodiment of a distributed system provided by the present invention. As shown in fig. 4, on the basis of the embodiment shown in fig. 3, in the distributed system provided in the embodiment of the present invention, the service request sent by the client 31 may carry user tenant information of a user tenant to which the request is directed. At this time, the global routing table also records the correspondence between the plurality of distributed collaborative service units 32 and the user tenant. As shown in table 1, which is an example of a global routing table in the embodiment of the present invention, a correspondence between tenant names of different user tenants and unit names of the distributed collaborative service units 32 is recorded, for example, tenants a and C correspond to the distributed collaborative service unit 1, tenant B corresponds to the distributed collaborative service unit 2, and tenant D corresponds to the distributed collaborative service unit 3.
TABLE 1
Tenant name | Name of unit |
A | 1 |
B | 2 |
C | 1 |
D | 3 |
Specifically, after receiving the request related to the address service sent by the client 31, the intermediate node 33 queries the global routing table according to the user tenant information (tenant name) carried in the request, acquires the unit name of the distributed cooperative user unit 32 corresponding to the user tenant information in the global routing table, and sends the request to the distributed cooperative service unit 32, so that the corresponding distributed cooperative service unit 32 provides the address-related service to the client 31 that sends the request.
Further, the distributed system provided by the embodiment of the present invention may further include a data management center 41, where the data management center 41 is configured to store the global routing table.
In the embodiment of the present invention, a plurality of intermediate nodes 33 may be provided, and different intermediate nodes 33 may be responsible for processing requests related to address services sent by different clients 31. Therefore, the data management center 41 may be configured to store the global routing table to ensure global state consistency of the global routing table queried by all intermediate nodes 33. Each intermediate node 33 may read the global routing table from the data management center 41 during the process startup phase to perform the requested routing operation.
Further, the data management center 41 may be further configured to send the updated global routing table to the intermediate node 33 when the global routing table is updated. Specifically, each intermediate node 33 may subscribe to a change event of the global routing table at the data management center 41, and when the global routing table stored in the data management center 41 is updated, the data management center 41 sends the updated global routing table to the intermediate node 33 to support online migration of the address registered by the address registration client.
In this embodiment of the present invention, the client 31 includes: an address registration client for obtaining an address registration service and an address resolution client for obtaining an address resolution service, where the service request sent by the address registration client may include, but is not limited to: the address registration request, the address subscription request, and the lease maintenance request, and the service request sent by the address resolution client may include, but is not limited to: an address resolution request.
In the embodiment of the present invention, when performing the migration of the registration address, the global routing table stored in the intermediate node 33 or the data management center 41 may adopt a three-hop upgrade mechanism, that is, the global routing table is updated by three times of version upgrade. The embodiment shown in fig. 4 is described by taking the example where the global routing table is stored in the data management center 41. Specifically, the distributed cooperative service unit 32 recorded in the global routing table may include a registration unit for providing an address registration service and a resolution unit for providing an address resolution service. The intermediate node 33 may specifically be configured to send the address resolution request for the user tenant sent by the client terminal 31 to the resolution unit corresponding to the user tenant, and send the address registration request for the user tenant sent by the client terminal 31 to the registration unit corresponding to the user tenant. As shown in table 2a, a version one of another example of the global routing table in the embodiment of the present invention is a version one, in which user tenant information of different user tenants is recorded, for example, a tenant name, a corresponding relationship between a resolution unit name of a resolution unit and a registration unit name of a registration unit, and before performing registration address migration, in an initial version of the global routing table, the resolution unit is consistent with the registration unit, for example, tenants a and C correspond to the resolution unit 1 and the registration unit 1, and tenant B corresponds to the resolution unit 2 and the registration unit 2, and so on.
TABLE 2a
Name of renter | Parsing unit names | Name of registered unit |
A | 1 | 1 |
B | 2 | 2 |
C | 1 | 1 |
When a register address migration instruction for changing a distributed cooperative service unit corresponding to a user tenant from a source distributed cooperative service unit to a target distributed cooperative service unit is received, resolving units corresponding to the user tenant, recorded in a global routing table, are the source distributed cooperative service unit and the target distributed cooperative service unit, the priority of a return result of the source distributed cooperative service unit is higher than that of the target distributed cooperative service unit, and a register unit corresponding to the user tenant, recorded in the global routing table, is the source distributed cooperative service unit. That is, when the data management center 41 receives the register address migration instruction, the global routing table stored therein is changed from the above-described initial version to the first intermediate version shown in table 2b below. As shown in table 2b, as a second example version of the global routing table in the embodiment of the present invention, after receiving the register address migration instruction, the global routing table is changed to a first intermediate version, in the first intermediate version, the parsing unit corresponding to the user tenant is the source distributed collaborative service unit and the target distributed collaborative service unit, for example, the parsing unit corresponding to the tenant a is changed to the source distributed collaborative service unit 1 and the target distributed collaborative service unit 3, and the priority of the returned result of the source distributed collaborative service unit 1 is higher than that of the target distributed collaborative service unit 3 (that is, the response returned by the source distributed collaborative service unit 1 is preferentially fed back to the client 31 for the response returned by the source distributed collaborative service unit 1 and the target distributed collaborative service unit 3).
TABLE 2b
Name of renter | Parsing unit names | Name of registered unit |
A | 1/3 | 1 |
B | 2 | 2 |
C | 1 | 1 |
In addition, when performing the registered address migration, the intermediate node 33 may also send a subscription change event notification to the relevant address registration client, where the subscription change event notification is used to trigger the address registration client to perform address registration again.
When the intermediate node 33 sends a subscription change event notification to the address registration client in the user tenant, the parsing units corresponding to the user tenant recorded in the global routing table are the target distributed cooperative service unit and the source distributed cooperative service unit, the priority of the returned result of the target distributed cooperative service unit is higher than that of the source distributed cooperative service unit, and the registration unit corresponding to the user tenant recorded in the global routing table is the target distributed cooperative service unit. That is, when the intermediate node 33 sends the subscription change event notification to the address registration client in the user tenant, the global routing table is changed from the above-described first intermediate version to a second intermediate version shown in table 2c below. As shown in table 2c, as a third version of another example of the global routing table in the embodiment of the present invention, when a subscription change event notification is sent, the global routing table is changed to a second intermediate version, in the second intermediate version, the parsing units corresponding to the user tenant are the source distributed collaborative service unit and the target distributed collaborative service unit, and the registration unit corresponding to the user tenant is the target distributed collaborative service unit. For example, the parsing unit corresponding to the tenant a is still the source distributed collaborative service unit 1 and the target distributed collaborative service unit 3, but the return result of the target distributed collaborative service unit 3 has higher priority than the return result of the source distributed collaborative service unit 1 (i.e., for the response returned by the source distributed collaborative service unit 1 and the target distributed collaborative service unit 3, the response returned by the target distributed collaborative service unit 3 is preferentially fed back to the client 31). And the registration unit corresponding to the tenant a is changed to the target distributed collaborative service unit 3.
TABLE 2c
Name of renter | Parsing unit names | Name of registered unit |
A | 3/1 | 3 |
B | 2 | 2 |
C | 1 | 1 |
When all address registration clients in the user tenant complete address registration again, the parsing unit and the registration unit which are recorded in the global routing table and correspond to the user tenant are both target distributed cooperative service units. That is, when all the address registration clients in the user tenant complete address registration again, the global routing table is changed from the second intermediate version to the final version shown in the following table 2 d. As shown in table 2d, as a version four of another example of the global routing table in the embodiment of the present invention, when all address registration clients complete address registration again, the global routing table is changed to a final version, and in the final version, both the parsing unit and the registering unit corresponding to the user tenant are target distributed cooperative service units. For example, the resolution unit corresponding to the tenant a is changed to the target distributed collaborative service unit 3. And at this point, completing the online migration of the registered address.
TABLE 2d
Name of renter | Parsing unit names | Name of registered unit |
A | 3 | 3 |
B | 2 | 2 |
C | 1 | 1 |
Further, according to an embodiment of the present invention, the intermediate node 33 may manage access to the distributed collaborative service unit 32 by creating a finite state machine. For example, by creating a finite state machine for an access request from the client 31, the access requests for the same distributed collaborative service unit 32 can be aggregated by the finite state machine and then sent to the distributed collaborative service unit 32, so that the distributed collaborative service unit 32 can reduce the number of connections created for the access request from the intermediate node 33, and the access pressure of the distributed collaborative service unit 32 can be reduced.
In addition, according to the embodiment of the present invention, the correspondence between the consistent hash value of the distributed cooperative service unit 32 calculated according to the consistent hash algorithm and the plurality of distributed cooperative service units 32 may be recorded in the global routing table. For example, the intermediate node 33 may query the global routing table according to a hash value corresponding to a user tenant for which the request is intended, which is included in the request regarding the address service sent by the client 31, thereby obtaining the distributed collaborative service unit 32 corresponding to the user tenant, and send the request to the distributed collaborative service unit 32. In this case, the client 31 does not need to include user tenant information in the request on the address service, but only needs to include a hash value calculated according to a consistent hash algorithm, so that the intermediate node 33 can obtain the corresponding distributed cooperative service unit 32 from the hash value.
In the distributed system provided by the embodiment of the invention, the intermediate node is arranged between the client and the distributed cooperative service unit which provides the address-related service for the client, so that the request sent by the client is routed to the corresponding distributed cooperative service unit according to the global routing table, thereby avoiding storing the global routing table in each client and reducing the maintenance cost of the global routing table; the data management center is arranged to store the global routing table so as to further ensure the global state consistency of the global routing table and ensure that the global routing table can be dynamically updated, thereby supporting the online migration of the registered address; meanwhile, by introducing the user tenant information, the intermediate node queries the corresponding distributed cooperative service unit according to the user tenant information, so that the service is decoupled from the distributed cooperative service unit information, and the service access cost is reduced.
EXAMPLE III
Fig. 5 is a flowchart of an embodiment of a network processing method provided by the present invention, where an execution subject of the method may be an intermediate node in the distributed system, or may be a device or chip integrated on the intermediate node. As shown in fig. 5, the network processing method includes the following steps:
s501, receiving a service request sent by a client.
In the embodiment of the present invention, the client may be an address registration client (for example, a host in a cloud service product, or a server providing an application service, etc.) for obtaining an address registration service for a user, or an address resolution client (for example, a front-end machine in a cloud service product, or an application client accessing a server, etc.) for obtaining an address resolution service. When a client generates a request for an address service, an intermediate node in the distributed system receives the request for the address service sent by the client.
S502, the global routing table is inquired according to the service request.
In the embodiment of the invention, the intermediate node queries the global routing table according to the user tenant information in the service request sent by the client, the global routing table is used for recording the corresponding relation between the distributed collaborative service units and the user tenants, and the global routing table can be stored in the intermediate node.
S503, sending the service request to the corresponding target distributed collaborative service unit, so that the target distributed collaborative service unit provides the service to the client.
In the embodiment of the invention, the intermediate node acquires the distributed cooperative service unit corresponding to the user tenant information in the service request from the global routing table, and sends the service request to the inquired distributed cooperative service unit, so that the corresponding distributed cooperative service unit provides service to the client side sending the request.
In the network processing method provided by the embodiment of the invention, the intermediate node is arranged between the client and the distributed cooperative service unit providing services for the client, so that the service request sent by the client is routed to the corresponding distributed cooperative service unit according to the global routing table, thereby avoiding storing the global routing table in each client and reducing the maintenance cost of the global routing table; meanwhile, the global routing table can be dynamically updated, so that online migration of services can be supported.
Example four
Fig. 6 is a flowchart of another embodiment of a network processing method according to the present invention. As shown in fig. 6, on the basis of the embodiment shown in fig. 5, the network processing method provided in this embodiment may further include the following steps:
s601, receiving a request related to address service sent by a client.
In the embodiment of the present invention, the request related to the address service sent by the client may carry user tenant information of the user tenant for which the request is directed.
S602, according to the user tenant information carried in the request of address service sent by the client, the global routing table is inquired.
In the embodiment of the present invention, the global routing table may be stored in the data management center to ensure global state consistency of the global routing table queried by the plurality of intermediate nodes. The intermediate node may read the global routing table from the data management center during a process startup phase to perform the routing operation of the request. In addition, each intermediate node can subscribe to a change event of the global routing table in the data management center, and when the global routing table stored in the data management center is updated, the intermediate node can also read the updated global routing table from the data management center so as to support online migration of the address registered by the address registration client.
In an embodiment of the present invention, the client may include: an address registration client for acquiring an address registration service and an address resolution client for acquiring an address resolution service, wherein the request about the address service sent by the address registration client may include but is not limited to: the address registration request, the address subscription request, and the lease maintenance request, and the request related to the address service sent by the address resolution client may include, but is not limited to: an address resolution request.
S603, when migrating the registered address, sending a subscription change event notification to the address registration client.
In the embodiment of the present invention, when performing the migration of the registered address, the intermediate node may further send a subscription change event notification to the relevant address registration client, where the subscription change event notification is used to trigger the address registration client to perform address registration again.
Specifically, when a register address migration instruction for changing a distributed collaborative service unit corresponding to a user tenant from a source distributed collaborative service unit to a target distributed collaborative service unit is received, parsing units corresponding to the user tenant recorded in a global routing table stored in an intermediate node or a data management center are the source distributed collaborative service unit and the target distributed collaborative service unit, a returned result of the source distributed collaborative service unit has a higher priority than a returned result of the target distributed collaborative service unit, and a register unit corresponding to the user tenant recorded in the global routing table is the source distributed collaborative service unit;
when a subscription change event notification is sent to an address registration client in the user tenant, the analysis units corresponding to the user tenant, which are recorded in a global routing table stored in an intermediate node or a data management center, are a target distributed cooperative service unit and a source distributed cooperative service unit, the priority of the return result of the target distributed cooperative service unit is higher than that of the source distributed cooperative service unit, and the registration unit corresponding to the user tenant, which is recorded in the global routing table, is the target distributed cooperative service unit;
when all address registration clients in the user tenant complete address registration again, the analysis unit and the registration unit which are recorded in the global routing table in the intermediate node or the data management center and correspond to the user tenant are target distributed cooperative service units.
S604, sending the request to the distributed collaborative service unit corresponding to the user tenant, so that the distributed collaborative service unit provides the address-related service to the client.
In the embodiment of the present invention, the distributed collaborative service unit recorded in the global routing table includes a registration unit for providing an address registration service and a resolution unit for providing an address resolution service. Specifically, the intermediate node may send an address resolution request sent by the client for the user tenant to a resolution unit corresponding to the user tenant, and send an address registration request sent by the client for the user tenant to a registration unit corresponding to the user tenant.
Further, according to embodiments of the invention, the intermediate node may manage access to the distributed collaborative service unit by creating a finite state machine. For example, by creating a finite state machine for an access request from a client, the access requests for the same distributed collaborative service unit can be aggregated by the finite state machine and then sent to the distributed collaborative service unit, so that the number of connections created for the access request from the intermediate node by the distributed collaborative service unit can be reduced, and the access pressure of the distributed collaborative service unit can be reduced.
In addition, according to the embodiment of the present invention, the correspondence between the consistent hash value of the user tenant, which is calculated according to the consistent hash algorithm, and the plurality of distributed collaborative service units may be recorded in the global routing table. For example, the intermediate node may query the global routing table according to a hash value corresponding to a user tenant for which the request is directed, which is included in the request related to the address service sent by the client, so as to obtain a distributed collaborative service unit corresponding to the user tenant, and send the request to the distributed collaborative service unit. In this case, the client does not need to include the user tenant information in the request related to the address service, but only needs to include the hash value calculated according to the consistent hash algorithm, so that the intermediate node can obtain the corresponding distributed cooperative service unit according to the hash value, and forward the request to the distributed cooperative service unit.
In the network processing method provided by the embodiment of the invention, the intermediate node is arranged between the client and the distributed cooperative service unit which provides the address-related service for the client, so that the request sent by the client is routed to the corresponding distributed cooperative service unit according to the global routing table, thereby avoiding storing the global routing table in each client and reducing the maintenance cost of the global routing table; the data management center is arranged to store the global routing table so as to further ensure the global state consistency of the global routing table and ensure that the global routing table can be dynamically updated, thereby supporting the online migration of the registered address; meanwhile, by introducing the user tenant information, the intermediate node queries the corresponding distributed cooperative service unit according to the user tenant information, so that the service is decoupled from the distributed cooperative service unit information, and the service access cost is reduced.
EXAMPLE five
Fig. 7 is a flowchart of a network processing method according to another embodiment of the present invention, where an execution subject of the method may be a data management center in the distributed system, or may be a device or a chip integrated on the data management center. As shown in fig. 7, the network processing method provided in this embodiment includes the following steps:
s701, storing a global routing table.
In the embodiment of the present invention, the global routing table is used to record the corresponding relationship between a plurality of distributed collaborative service units and a user tenant, and the distributed collaborative service units include a registration unit for providing an address registration service and a resolution unit for providing an address resolution service.
S702, when a register address migration instruction for changing the distributed cooperative service unit corresponding to the user tenant from the source distributed cooperative service unit to the target distributed cooperative service unit is received, updating the resolution unit corresponding to the user tenant, which is recorded in the global routing table, into the source distributed cooperative service unit and the target distributed cooperative service unit, wherein the priority of the return result of the source distributed cooperative service unit is higher than that of the target distributed cooperative service unit.
And S703, when the intermediate node sends a subscription change event notification to the address registration client in the user tenant, setting the priority of the returned result of the target distributed cooperative service unit in the parsing unit corresponding to the user tenant, which is recorded in the global routing table, to be higher than the returned result of the source distributed cooperative service unit, and updating the registration unit corresponding to the user tenant, which is recorded in the global routing table, to be the target distributed cooperative service unit.
In the embodiment of the present invention, the subscription change event notification is used to trigger the address registration client to perform address registration again.
S704, when all address registration clients in the user tenant complete address registration again, changing the parsing unit corresponding to the user tenant recorded in the global routing table to a target distributed collaborative service unit.
In the network processing method provided in the embodiment of the present invention, the operation of the data management center corresponds to the operation of the intermediate node in the embodiment shown in fig. 6, and the online migration of the registration address is implemented by updating the global routing table through the data management center.
EXAMPLE six
Fig. 8 is a schematic structural diagram of a network processing device according to an embodiment of the present invention, which can be used to execute the method steps shown in fig. 5. As shown in fig. 8, the network processing apparatus may include: a receiving module 81, a querying module 82 and a first sending module 83.
The receiving module 81 is configured to receive a service request sent by a client; the query module 82 is configured to query a global routing table according to the service request, where the global routing table is used to record a correspondence between a plurality of distributed collaborative service units and a user tenant; the first sending module 83 is configured to send the service request to the corresponding target distributed collaborative service unit, so that the distributed collaborative service unit provides a service to the client.
In the embodiment of the present invention, the client may be an address registration client (for example, a host in a cloud service product, or a server providing an application service, etc.) for obtaining an address registration service for a user, or an address resolution client (for example, a front-end machine in a cloud service product, or an application client accessing a server, etc.) for obtaining an address resolution service. When the client generates a request for an address service, the receiving module 81 receives the request for an address service transmitted by the client. Then, the query module 82 queries the global routing table according to the user tenant information in the request received by the receiving module 81, and acquires a target distributed collaborative service unit corresponding to the user tenant information. Finally, the first sending module 83 sends the request to the queried target distributed collaborative service unit, so that the corresponding distributed collaborative service unit provides the address-related service to the client sending the request.
In the network processing device provided by the embodiment of the invention, the intermediate node is arranged between the client and the distributed cooperative service unit providing services for the client, so that the service request sent by the client is routed to the corresponding distributed cooperative service unit according to the global routing table, thereby avoiding storing the global routing table in each client and reducing the maintenance cost of the global routing table; meanwhile, the global routing table can be dynamically updated, so that online migration of services can be supported.
EXAMPLE seven
Fig. 9 is a schematic structural diagram of another embodiment of a network processing device according to the present invention, which can be used to execute the method steps shown in fig. 6. As shown in fig. 9, on the basis of the embodiment shown in fig. 8, the request related to the address service sent by the client carries user tenant information of the user tenant for which the request is directed.
Specifically, the query module 82 may be configured to query the global routing table according to user tenant information carried in a request related to an address service sent by a client; and the first sending module 83 may be configured to send the service request to the distributed collaborative service unit corresponding to the user tenant.
Further, the network processing apparatus provided in the embodiment of the present invention may further include: a reading module 91. The reading module 91 may be configured to read the global routing table from the data management center during a startup phase. In addition, the reading module 91 may also be configured to read the updated global routing table from the data management center.
In the embodiment of the present invention, the client may include: an address registration client for acquiring an address registration service and an address resolution client for acquiring an address resolution service, the address registration client sending a request related to the address service including but not limited to: address registration request, address subscription request and lease maintenance request, the address resolution client sends the request about address service including but not limited to: an address resolution request.
Still further, the distributed collaborative service units recorded in the global routing table may include a registration unit for providing an address registration service and a resolution unit for providing an address resolution service, and the first sending module 83 may include: a first transmission unit 831 and a second transmission unit 832.
The first sending unit 831 may be configured to send an address resolution request sent by a client for the user tenant to a resolution unit corresponding to the user tenant, and the second sending unit 832 may be configured to send an address registration request sent by the client for the user tenant to a registration unit corresponding to the user tenant.
Still further, the network processing apparatus provided in the embodiment of the present invention may further include: a second sending module 92. The second sending module 92 may be configured to send a subscription change event notification to the address registration client when performing the registered address migration, where the subscription change event notification is used to trigger the address registration client to perform address registration again.
In the embodiment of the invention, when a register address migration instruction for changing a distributed cooperative service unit corresponding to a user tenant from a source distributed cooperative service unit to a target distributed cooperative service unit is received, resolving units corresponding to the user tenant, which are recorded in a global routing table, are the source distributed cooperative service unit and the target distributed cooperative service unit, the priority of a return result of the source distributed cooperative service unit is higher than that of the target distributed cooperative service unit, and a register unit corresponding to the user tenant, which is recorded in the global routing table, is the source distributed cooperative service unit; when a subscription change event notification is sent to an address registration client in a user tenant, resolving units, corresponding to the user tenant, recorded in a global routing table are a target distributed cooperative service unit and a source distributed cooperative service unit, the priority of a return result of the target distributed cooperative service unit is higher than that of the source distributed cooperative service unit, and a registration unit, corresponding to the user tenant, recorded in the global routing table is the target distributed cooperative service unit; when all address registration clients in the user tenants finish address registration again, the analysis units and the registration units which are recorded in the global routing table and correspond to the user tenants are target distributed cooperative service units.
In addition, the first sending module 83 may also be configured to use a finite state machine to control the sending of the request to the distributed collaborative serving unit.
In addition, the global routing table may be further configured to record correspondence between consistent hash values of user tenants calculated according to a consistent hash algorithm and the plurality of distributed collaborative service units, and the first sending module 83 may be further configured to query the global routing table according to a hash value, included in a request related to an address service sent by a client, corresponding to a user tenant for which the request is intended, and send the request to the distributed collaborative service unit corresponding to the user tenant.
The functions of the modules in the embodiments of the present invention are described in detail in the above method embodiments, and are not described herein again.
In the network processing device provided by the embodiment of the invention, the intermediate node is arranged between the client and the distributed cooperative service unit which provides the address-related service for the client, so that the request sent by the client is routed to the corresponding distributed cooperative service unit according to the global routing table, thereby avoiding storing the global routing table in each client and reducing the maintenance cost of the global routing table; the data management center is arranged to store the global routing table so as to further ensure the global state consistency of the global routing table and ensure that the global routing table can be dynamically updated, thereby supporting the online migration of the registered address; meanwhile, by introducing the user tenant information, the intermediate node queries the corresponding distributed cooperative service unit according to the user tenant information, so that the service is decoupled from the distributed cooperative service unit information, and the service access cost is reduced.
Example eight
Fig. 10 is a schematic structural diagram of a network processing device according to another embodiment of the present invention, which can be used to execute the method steps shown in fig. 7. As shown in fig. 10, the network processing apparatus may include: a storage module 101, a first update module 102, a second update module 103, and a third update module 104.
The storage module 101 is configured to store a global routing table, where the global routing table is configured to record a correspondence between a plurality of distributed collaborative service units and a user tenant, and each distributed collaborative service unit includes a registration unit configured to provide an address registration service and an analysis unit configured to provide an address analysis service; the first updating module 102 is configured to update, when receiving a registered address migration instruction for changing a distributed collaborative service unit corresponding to a user tenant from a source distributed collaborative service unit to a target distributed collaborative service unit, an analysis unit corresponding to the user tenant recorded in the global routing table to the source distributed collaborative service unit and the target distributed collaborative service unit, where a priority of a return result of the source distributed collaborative service unit is higher than a priority of a return result of the target distributed collaborative service unit; the second updating module 103 is configured to, when the intermediate node sends a subscription change event notification to the address registration client in the user tenant, set the priority of the return result of the target distributed cooperative service unit in the parsing unit corresponding to the user tenant, which is recorded in the global routing table, to be higher than the return result of the source distributed cooperative service unit, and update the registration unit corresponding to the user tenant, which is recorded in the global routing table, to be the target distributed cooperative service unit, where the subscription change event notification is used to trigger the address registration client to perform address registration again; the third updating module 104 is configured to change, when all address registration clients in the user tenant complete address registration again, an analysis unit corresponding to the user tenant recorded in the global routing table to a target distributed collaborative service unit.
The functions of the modules in the embodiments of the present invention are described in detail in the above method embodiments, and are not described herein again.
The network processing apparatus provided in the embodiment of the present invention corresponds to the operation of each module in the embodiment shown in fig. 9, and implements online migration of a registration address by updating a global routing table through a data management center.
Example nine
The internal functions and structure of the network processing apparatus, which can be implemented as an electronic device, are described above. Fig. 11 is a schematic structural diagram of an embodiment of an electronic device provided in the present invention. As shown in fig. 11, the electronic device includes a memory 111 and a processor 112.
The memory 111 stores programs. In addition to the above programs, the memory 111 may also be configured to store other various data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and the like.
The memory 111 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A processor 112, coupled to the memory 111, for executing the program stored in the memory 111 to:
receiving a service request sent by a client;
inquiring a global routing table according to the service request, wherein the global routing table is used for recording the corresponding relation between the distributed collaborative service units and the user tenants;
and sending the service request to the corresponding target distributed collaborative service unit so that the target distributed collaborative service unit provides the service for the client.
Further, as shown in fig. 11, the electronic device may further include: communication component 113, power component 114, audio component 115, display 116, and the like. Only some of the components are schematically shown in fig. 11, and the electronic device is not meant to include only the components shown in fig. 11.
The communication component 113 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 113 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 113 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
A power supply component 114 that provides power to the various components of the electronic device. The power components 114 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic devices.
The display 116 includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
Example ten
The internal functions and structures of the network processing apparatus, which can be implemented as an electronic device, are described above. Fig. 12 is a schematic structural diagram of another embodiment of an electronic device provided in the present invention. As shown in fig. 12, the electronic device includes a memory 121 and a processor 122.
The memory 121 is configured to store a program and a global routing table, where the global routing table is used to record correspondence between a plurality of distributed collaborative service units and a user tenant, and each distributed collaborative service unit includes a registration unit for providing an address registration service and a resolution unit for providing an address resolution service. In addition to the above-described programs, the memory 121 may also be configured to store other various data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and so forth.
The memory 121 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A processor 122, coupled to the memory 121, for executing the program stored in the memory 121 to:
when a register address migration instruction for changing a distributed cooperative service unit corresponding to a user tenant from a source distributed cooperative service unit to a target distributed cooperative service unit is received, updating an analysis unit corresponding to the user tenant, which is recorded in a global routing table, into the source distributed cooperative service unit and the target distributed cooperative service unit, wherein the priority of a return result of the source distributed cooperative service unit is higher than that of the target distributed cooperative service unit;
when the intermediate node sends a subscription change event notification to an address registration client in a user tenant, setting the priority of a returned result of a target distributed cooperative service unit in an analysis unit corresponding to the user tenant, which is recorded in a global routing table, to be higher than that of a returned result of a source distributed cooperative service unit, updating a registration unit corresponding to the user tenant, which is recorded in the global routing table, to be the target distributed cooperative service unit, and triggering the address registration client to perform address registration again by the subscription change event notification;
and when all address registration clients in the user tenants finish address registration again, changing the analysis unit corresponding to the user tenants recorded in the global routing table into a target distributed cooperative service unit.
Further, as shown in fig. 12, the electronic device may further include: communications component 123, power component 124, audio component 125, display 126, and the like. Only some of the components are schematically shown in fig. 12, and the electronic device is not meant to include only the components shown in fig. 12.
The communication component 123 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 123 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 123 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
A power supply component 124 that provides power to the various components of the electronic device. The power components 124 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for an electronic device.
The display 126 includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and these modifications or substitutions do not depart from the spirit of the corresponding technical solutions of the embodiments of the present invention.
Claims (29)
1. A distributed system, comprising: at least one client and a plurality of distributed collaborative service units, wherein the system further comprises:
the intermediate node is used for receiving a service request aiming at a user tenant sent by the client, inquiring a global routing table according to the service request, acquiring a corresponding target distributed collaborative service unit from the global routing table, and sending the service request to the target distributed collaborative service unit, wherein the global routing table is used for recording the corresponding relation between the distributed collaborative service unit and the user tenant,
the intermediate node is further configured to send a subscription change event notification to an address registration client for acquiring an address registration service when performing registration address migration, where the subscription change event notification is used to trigger the address registration client to perform address registration again;
when a registered address migration instruction for changing a distributed cooperative service unit corresponding to the user tenant from a source distributed cooperative service unit to a target distributed cooperative service unit is received, resolving units, which are recorded in the global routing table and correspond to the user tenant, for providing address resolution service are the source distributed cooperative service unit and the distributed cooperative target service unit, the priority of returned results of the source distributed cooperative service unit is higher than that of the target distributed cooperative service unit, and a registered unit, which is recorded in the global routing table and corresponds to the user tenant, for providing address registration service is the source distributed cooperative service unit;
when the intermediate node sends the subscription change event notification to an address registration client in the user tenant, parsing units, which correspond to the user tenant, recorded in the global routing table are the target distributed collaborative service unit and the source distributed collaborative service unit, and a returned result of the target distributed collaborative service unit has a higher priority than a returned result of the source distributed collaborative service unit, and a registration unit, which corresponds to the user tenant, recorded in the global routing table is the target distributed collaborative service unit;
when all address registration clients in the user tenants complete address registration again, the parsing unit and the registration unit which are recorded in the global routing table and correspond to the user tenants are the target distributed cooperative service unit.
2. The distributed system according to claim 1, wherein the service request sent by the client carries user tenant information to which the request is directed, and the intermediate node is specifically configured to query the global routing table according to the user tenant information carried in the service request sent by the client, and send the service request to a distributed cooperative service unit corresponding to the user tenant.
3. The distributed system of claim 2, further comprising:
the data management center is used for storing the global routing table;
the intermediate node is further configured to read the global routing table from the data management center during a startup phase.
4. The distributed system of claim 3, wherein the data management center is further configured to, when the global routing table is updated, send the updated global routing table to the intermediate node.
5. The distributed system of any one of claims 2 to 4 wherein said client comprises: the address registration client for obtaining the address registration service and the address resolution client for obtaining the address resolution service, wherein the service request sent by the address registration client comprises: the address registration request, the address subscription request and the lease maintenance request, wherein the service request sent by the address resolution client comprises: an address resolution request.
6. The distributed system according to claim 5, wherein the distributed cooperative service units recorded in the global routing table include a registration unit for providing address registration service and a resolution unit for providing address resolution service,
the intermediate node is specifically configured to send an address resolution request for the user tenant sent by the client to a resolution unit corresponding to the user tenant, and send an address registration request for the user tenant sent by the client to a registration unit corresponding to the user tenant.
7. The distributed system according to any of claims 1 to 4, wherein said intermediate node is further configured to use a finite state machine to control the sending of said service request to a target distributed collaborative service unit.
8. The distributed system according to any one of claims 1 to 4, wherein the global routing table is further configured to record a correspondence between consistent hash values of user tenants calculated according to a consistent hash algorithm and the plurality of distributed collaborative service units, and,
the intermediate node is further configured to query the global routing table according to a hash value, included in the service request sent by the client, corresponding to the user tenant to which the service request is directed, and send the service request to the distributed collaborative service unit corresponding to the user tenant.
9. A network processing method, comprising:
receiving a service request sent by a client;
querying a global routing table according to the service request, wherein the global routing table is used for recording the corresponding relation between a plurality of distributed collaborative service units and a user tenant;
sending the service request to a corresponding target distributed collaborative service unit so that the target distributed collaborative service unit provides a service to the client,
when the registered address is migrated, sending a subscription change event notification to the address registration client, wherein the subscription change event notification is used for triggering the address registration client to perform address registration again;
when a registered address migration instruction for changing a service unit corresponding to the user tenant from a source distributed cooperative service unit to a target distributed cooperative service unit is received, resolving units, which are recorded in the global routing table and correspond to the user tenant, for providing address resolution service are the source distributed cooperative service unit and the target distributed cooperative service unit, a returned result of the source distributed cooperative service unit has higher priority than a returned result of the target distributed cooperative service unit, and a registered unit, which is recorded in the global routing table and corresponds to the user tenant, for providing address registration service is the source distributed cooperative service unit;
when the subscription change event notification is sent to an address registration client in the user tenant, parsing units, corresponding to the user tenant, recorded in the global routing table are the target distributed collaborative service unit and the source distributed collaborative service unit, the priority of a return result of the target distributed collaborative service unit is higher than that of the source distributed collaborative service unit, and a registration unit, corresponding to the user tenant, recorded in the global routing table is the target distributed collaborative service unit;
when all address registration clients in the user tenants complete address registration again, the parsing unit and the registration unit which are recorded in the global routing table and correspond to the user tenants are the target distributed cooperative service unit.
10. The network processing method according to claim 9, wherein the service request sent by the client carries user tenant information to which the request is directed,
the querying a global routing table according to the service request includes:
querying the global routing table according to user tenant information carried in a service request sent by the client; and is provided with
The sending the service request to the corresponding target distributed collaborative service unit includes:
and sending the service request to a distributed collaborative service unit corresponding to the user tenant.
11. The network processing method of claim 10, further comprising:
the global routing table is read from a data management center during a startup phase.
12. The network processing method of claim 11, further comprising:
and reading the updated global routing table from the data management center.
13. The network processing method according to any of claims 10 to 12, wherein the client comprises: the address registration client is used for obtaining address registration service and the address resolution client is used for obtaining address resolution service, and the service request sent by the address registration client comprises: the system comprises an address registration request, an address subscription request and a lease maintenance request, wherein the service request sent by the address resolution client comprises: an address resolution request.
14. The network processing method according to claim 13, wherein the distributed collaborative service units recorded in the global routing table include a registration unit for providing address registration service and a resolution unit for providing address resolution service, and the sending the service request to the corresponding distributed collaborative service unit includes:
sending an address resolution request sent by the client and aiming at the user tenant to a resolution unit corresponding to the user tenant, an
Sending an address registration request which is sent by the client and aims at the user tenant to a registration unit corresponding to the user tenant.
15. The network processing method according to any of claims 9 to 12, wherein the sending the service request to the corresponding target distributed collaborative service unit comprises:
a finite state machine is used to control the sending of the service request to the target distributed collaborative service unit.
16. The network processing method according to any one of claims 9 to 12, wherein the global routing table is further configured to record a correspondence between consistent hash values of user tenants calculated according to a consistent hash algorithm and the plurality of distributed collaborative service units, and the querying the global routing table according to the service request comprises:
and querying the global routing table according to a hash value, contained in the service request sent by the client, corresponding to the user tenant to which the service request is directed.
17. A network processing method applied to the distributed system according to claim 1, comprising:
storing a global routing table, wherein the global routing table is used for recording the corresponding relation between a plurality of distributed collaborative service units and user tenants, and the distributed collaborative service units comprise a registration unit for providing address registration service and an analysis unit for providing address analysis service;
when a registered address migration instruction for changing a distributed cooperative service unit corresponding to the user tenant from a source distributed cooperative service unit to a target distributed cooperative service unit is received, updating an analysis unit corresponding to the user tenant and recorded in the global routing table to the source distributed cooperative service unit and the target distributed cooperative service unit, wherein the priority of a return result of the source distributed cooperative service unit is higher than that of the target distributed cooperative service unit;
when an intermediate node sends a subscription change event notification to an address registration client in the user tenant, setting the priority of a return result of a target distributed cooperative service unit in an analysis unit corresponding to the user tenant, which is recorded in the global routing table, to be higher than that of a return result of a source distributed cooperative service unit, and updating a registration unit corresponding to the user tenant, which is recorded in the global routing table, to be the target distributed cooperative service unit, wherein the subscription change event notification is used for triggering the address registration client to perform address registration again;
when all address registration clients in the user tenants finish address registration again, changing the analysis unit corresponding to the user tenants recorded in the global routing table into the target distributed cooperative service unit.
18. A network processing apparatus, comprising:
the receiving module is used for receiving a service request sent by a client;
the query module is used for querying a global routing table according to the service request, wherein the global routing table is used for recording the corresponding relation between a plurality of distributed collaborative service units and a user tenant;
a first sending module, configured to send the service request to a corresponding target distributed collaborative service unit, so that the target distributed collaborative service unit provides a service to the client,
a second sending module, configured to send a subscription change event notification to the address registration client when performing registration address migration, where the subscription change event notification is used to trigger the address registration client to perform address registration again;
when a registered address migration instruction for changing a service unit corresponding to the user tenant from a source distributed collaborative service unit to a target distributed collaborative service unit is received, resolving units which are recorded in the global routing table and correspond to the user tenant and provide address resolution service are the source distributed collaborative service unit and the target distributed collaborative service unit, the priority of a return result of the source distributed collaborative service unit is higher than that of the target distributed collaborative service unit, and the registered unit which is recorded in the global routing table and corresponds to the user tenant is the source distributed collaborative service unit;
when the subscription change event notification is sent to an address registration client in the user tenant, the parsing units, corresponding to the user tenant, recorded in the global routing table are the target distributed collaborative service unit and the source distributed collaborative service unit, the priority of the returned result of the target distributed collaborative service unit is higher than that of the source distributed collaborative service unit, and the registration unit, corresponding to the user tenant, recorded in the global routing table and providing an address registration service is the target distributed collaborative service unit;
when all address registration clients in the user tenants finish address registration again, the analysis unit and the registration unit which are recorded in the global routing table and correspond to the user tenants are the target distributed cooperative service unit.
19. The network processing apparatus according to claim 18, wherein the service request sent by the client carries user tenant information to which the request is directed,
the query module is specifically configured to query the global routing table according to user tenant information carried in a service request sent by the client; and is provided with
The first sending module is specifically configured to send the service request to a distributed collaborative service unit corresponding to the user tenant.
20. The network processing apparatus of claim 19, further comprising:
and the reading module is used for reading the global routing table from the data management center in a starting stage.
21. The network processing apparatus of claim 20, wherein the reading module is further configured to read the updated global routing table from the data management center.
22. The network processing apparatus of any of claims 19 to 21, wherein the client comprises: the address registration client is used for obtaining address registration service and the address resolution client is used for obtaining address resolution service, and the service request sent by the address registration client comprises: the system comprises an address registration request, an address subscription request and a lease maintenance request, wherein the service request sent by the address resolution client comprises: an address resolution request.
23. The network processing apparatus of claim 22, wherein the distributed cooperation service unit recorded in the global routing table includes a registration unit for providing address registration service and a resolution unit for providing address resolution service, and the first sending module includes:
a first sending unit, for sending the address resolution request sent by the client to the user tenant to the resolution unit corresponding to the user tenant, an
A second sending unit, configured to send the address registration request sent by the client for the user tenant to a registration unit corresponding to the user tenant.
24. The network processing apparatus of any of claims 18 to 21, wherein the first sending module is further configured to control sending of the service request to a target distributed collaborative service unit using a finite state machine.
25. The network processing apparatus according to any of claims 18 to 21, wherein the global routing table is further configured to record correspondence between consistent hash values of user tenants calculated according to a consistent hash algorithm and the plurality of distributed collaborative service units, and wherein
The first sending module is further configured to query the global routing table according to a hash value, which is included in the service request sent by the client and corresponds to the user tenant to which the service request is directed, and send the service request to the distributed collaborative service unit corresponding to the user tenant.
26. A network processing apparatus, comprising:
the system comprises a storage module, a processing module and a processing module, wherein the storage module is used for storing a global routing table, the global routing table is used for recording the corresponding relation between a plurality of distributed cooperative service units and user tenants, and the distributed cooperative service units comprise a registration unit for providing address registration service and an analysis unit for providing address analysis service;
a first updating module, configured to update, when a register address migration instruction for changing a distributed collaborative service unit corresponding to the user tenant from a source distributed collaborative service unit to a target distributed collaborative service unit is received, an analysis unit corresponding to the user tenant, which is recorded in the global routing table, to the source distributed collaborative service unit and the target distributed collaborative service unit, where a priority of a return result of the source distributed collaborative service unit is higher than a priority of a return result of the target distributed collaborative service unit;
a second updating module, configured to set, when the intermediate node sends a subscription change event notification to the address registration client in the user tenant, a priority of a return result of a target distributed cooperative service unit in an analysis unit corresponding to the user tenant, which is recorded in the global routing table, to be higher than a return result of a source distributed cooperative service unit, and update a registration unit, which is recorded in the global routing table and corresponds to the user tenant, to the target distributed cooperative service unit, where the subscription change event notification is used to trigger the address registration client to perform address registration again;
and the third updating module is used for changing the analysis unit which is recorded in the global routing table and corresponds to the user tenant into the target distributed cooperative service unit when all address registration clients in the user tenant complete address registration again.
27. A network processing method, comprising:
generating a service request according to a service instruction input by a user;
sending the service request to an intermediate node, such that the intermediate node:
inquiring a global routing table according to the service request, and sending the service request to a corresponding target distributed collaborative service unit, wherein the global routing table is used for recording the corresponding relation between a plurality of distributed collaborative service units and a user tenant; and
when the registered address is migrated, sending a subscription change event notification to the address registration client, wherein the subscription change event notification is used for triggering the address registration client to perform address registration again;
when a registered address migration instruction for changing a service unit corresponding to the user tenant from a source distributed collaborative service unit to a target distributed collaborative service unit is received, resolving units which are recorded in the global routing table and correspond to the user tenant and provide address resolution service are the source distributed collaborative service unit and the target distributed collaborative service unit, the priority of a return result of the source distributed collaborative service unit is higher than that of the target distributed collaborative service unit, and a registered unit which is recorded in the global routing table and corresponds to the user tenant and provides address registration service is the source distributed collaborative service unit;
when the subscription change event notification is sent to an address registration client in the user tenant, parsing units, corresponding to the user tenant, recorded in the global routing table are the target distributed collaborative service unit and the source distributed collaborative service unit, the priority of a return result of the target distributed collaborative service unit is higher than that of the source distributed collaborative service unit, and a registration unit, corresponding to the user tenant, recorded in the global routing table is the target distributed collaborative service unit;
when all address registration clients in the user tenants finish address registration again, the analysis unit and the registration unit which are recorded in the global routing table and correspond to the user tenants are the target distributed cooperative service unit.
28. An electronic device, comprising:
a memory for storing a program;
a processor for executing the program stored in the memory for:
receiving a service request sent by a client;
querying a global routing table according to the service request, wherein the global routing table is used for recording the corresponding relation between a plurality of distributed collaborative service units and a user tenant;
sending the service request to a corresponding target distributed collaborative service unit so that the target distributed collaborative service unit provides a service to the client,
when the registered address is migrated, sending a subscription change event notification to the address registration client, wherein the subscription change event notification is used for triggering the address registration client to perform address registration again;
when a registered address migration instruction for changing a service unit corresponding to the user tenant from a source distributed cooperative service unit to a target distributed cooperative service unit is received, resolving units, which are recorded in the global routing table and correspond to the user tenant, for providing address resolution service are the source distributed cooperative service unit and the target distributed cooperative service unit, a returned result of the source distributed cooperative service unit has higher priority than a returned result of the target distributed cooperative service unit, and a registered unit, which is recorded in the global routing table and corresponds to the user tenant, for providing address registration service is the source distributed cooperative service unit;
when the subscription change event notification is sent to an address registration client in the user tenant, parsing units, which correspond to the user tenant, recorded in the global routing table are the target distributed collaborative service unit and the source distributed collaborative service unit, and a returned result of the target distributed collaborative service unit has a higher priority than a returned result of the source distributed collaborative service unit, and a registered unit, which corresponds to the user tenant, recorded in the global routing table is the target distributed collaborative service unit;
when all address registration clients in the user tenants complete address registration again, the parsing unit and the registration unit which are recorded in the global routing table and correspond to the user tenants are the target distributed cooperative service unit.
29. An electronic device, comprising:
the system comprises a memory, a first sending unit, a second sending unit, a third sending unit, a fourth sending unit, a fifth sending unit, a sixth sending unit, a fifth sending unit, a sixth sending unit, a fourth sending unit, a fifth sending unit, a sixth sending unit, a fourth sending unit, a message, a fourth sending unit, a fourth sending unit, a message, and a message;
a processor for executing the program stored in the memory for:
when a registered address migration instruction for changing a distributed cooperative service unit corresponding to the user tenant from a source distributed cooperative service unit to a target distributed cooperative service unit is received, updating an analysis unit corresponding to the user tenant and recorded in the global routing table to the source distributed cooperative service unit and the target distributed cooperative service unit, wherein the priority of a return result of the source distributed cooperative service unit is higher than that of the target distributed cooperative service unit;
when an intermediate node sends a subscription change event notification to an address registration client in the user tenant, setting the priority of a return result of a target distributed cooperative service unit in an analysis unit corresponding to the user tenant, which is recorded in the global routing table, to be higher than that of a return result of a source distributed cooperative service unit, and updating a registration unit corresponding to the user tenant, which is recorded in the global routing table, to be the target distributed cooperative service unit, wherein the subscription change event notification is used for triggering the address registration client to perform address registration again;
and when all address registration clients in the user tenants finish address registration again, changing the analysis unit which is recorded in the global routing table and corresponds to the user tenants into the target distributed cooperative service unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910824768.3A CN112448985B (en) | 2019-09-02 | 2019-09-02 | Distributed system, network processing method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910824768.3A CN112448985B (en) | 2019-09-02 | 2019-09-02 | Distributed system, network processing method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112448985A CN112448985A (en) | 2021-03-05 |
CN112448985B true CN112448985B (en) | 2022-07-15 |
Family
ID=74734231
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910824768.3A Active CN112448985B (en) | 2019-09-02 | 2019-09-02 | Distributed system, network processing method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112448985B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116155740A (en) * | 2022-08-16 | 2023-05-23 | 马上消费金融股份有限公司 | Data routing system, method, electronic device and computer readable storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103067433A (en) * | 2011-10-24 | 2013-04-24 | 阿里巴巴集团控股有限公司 | Method, device and system of data migration of distributed type storage system |
CN104050249A (en) * | 2011-12-31 | 2014-09-17 | 北京奇虎科技有限公司 | Distributed query engine system and method and metadata server |
CN104050250A (en) * | 2011-12-31 | 2014-09-17 | 北京奇虎科技有限公司 | Distributed key-value query method and query engine system |
CN104380289A (en) * | 2012-05-25 | 2015-02-25 | 思科技术公司 | Service-aware distributed hash table routing |
CN104780102A (en) * | 2015-04-07 | 2015-07-15 | 杭州华三通信技术有限公司 | Information processing method and device for virtual machine migration in LISP (locator identity separation protocol) network |
CN105227541A (en) * | 2015-08-21 | 2016-01-06 | 华为技术有限公司 | A kind of security strategy dynamic migration method and device |
CN106302607A (en) * | 2015-06-05 | 2017-01-04 | 腾讯科技(深圳)有限公司 | It is applied to block storage system and the method for cloud computing |
CN107786527A (en) * | 2016-08-31 | 2018-03-09 | 阿里巴巴集团控股有限公司 | Realize the method and apparatus of service discovery |
CN108762762A (en) * | 2018-05-08 | 2018-11-06 | 深圳市分期乐网络科技有限公司 | Session information management method, device, equipment and computer storage media |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8301654B2 (en) * | 2009-02-24 | 2012-10-30 | Hitachi, Ltd. | Geographical distributed storage system based on hierarchical peer to peer architecture |
US10827410B2 (en) * | 2014-04-01 | 2020-11-03 | Umm-Al-Qura University | System, apparatus and method for robust transmission of visual data through visual sensor network |
-
2019
- 2019-09-02 CN CN201910824768.3A patent/CN112448985B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103067433A (en) * | 2011-10-24 | 2013-04-24 | 阿里巴巴集团控股有限公司 | Method, device and system of data migration of distributed type storage system |
CN104050249A (en) * | 2011-12-31 | 2014-09-17 | 北京奇虎科技有限公司 | Distributed query engine system and method and metadata server |
CN104050250A (en) * | 2011-12-31 | 2014-09-17 | 北京奇虎科技有限公司 | Distributed key-value query method and query engine system |
CN104380289A (en) * | 2012-05-25 | 2015-02-25 | 思科技术公司 | Service-aware distributed hash table routing |
CN104780102A (en) * | 2015-04-07 | 2015-07-15 | 杭州华三通信技术有限公司 | Information processing method and device for virtual machine migration in LISP (locator identity separation protocol) network |
CN106302607A (en) * | 2015-06-05 | 2017-01-04 | 腾讯科技(深圳)有限公司 | It is applied to block storage system and the method for cloud computing |
CN105227541A (en) * | 2015-08-21 | 2016-01-06 | 华为技术有限公司 | A kind of security strategy dynamic migration method and device |
CN107786527A (en) * | 2016-08-31 | 2018-03-09 | 阿里巴巴集团控股有限公司 | Realize the method and apparatus of service discovery |
CN108762762A (en) * | 2018-05-08 | 2018-11-06 | 深圳市分期乐网络科技有限公司 | Session information management method, device, equipment and computer storage media |
Non-Patent Citations (3)
Title |
---|
A Centralized Clustering based Hybrid Vehicular Networking Architecture for Safety Data Delivery;Chenhao Shi;《IEEE Xplore》;20180115;全文 * |
智慧云网络动态资源适配关键技术研究;黄道超;《CNKI中国优秀硕博士论文全文数据库》;20141231;全文 * |
面向移动环境的数据存储管理方法关键技术研究;曾文英;《CNKI中国硕博士优秀论文全文数据库》;20121231;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112448985A (en) | 2021-03-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110247944B (en) | Cross-regional service calling method, device and system and electronic equipment | |
US20070297422A1 (en) | Information delivery system, delivery request program, transfer program, delivery program, and the like | |
JP2010520540A (en) | System and method for automatically finding members of a web-based social network | |
CN109151025B (en) | Load balancing method and device based on URL, computer storage medium and equipment | |
JP2008287407A (en) | Content distribution device and content distribution method | |
CN112328413B (en) | Application service calling method, device and system | |
CN112835904A (en) | Data processing method and data processing device | |
EP2916495A1 (en) | Information processing system, an information processing apparatus and a medium storing an information processing program | |
CN112448985B (en) | Distributed system, network processing method and device and electronic equipment | |
KR101857020B1 (en) | Apparatas and method for managing service of providing server in a terminal | |
CN110324167B (en) | Configuration method, device and system of service governance rules and electronic equipment | |
CN113407356A (en) | Data processing method and device, electronic equipment and storage medium | |
US20140297762A1 (en) | Method and system for timezone aware application programming interface | |
CN114844744B (en) | Virtual private cloud network configuration method and device, electronic equipment and computer readable storage medium | |
CN103870471A (en) | Inquiring system, method and device of second-degree friends | |
CN110928598B (en) | System configuration method, device, computer equipment and storage medium | |
US11277300B2 (en) | Method and apparatus for outputting information | |
US10193965B2 (en) | Management server and operation method thereof and server system | |
CN114338279A (en) | Terminal access method and device and server | |
CN112949326B (en) | Information query method, device, equipment and computer readable medium | |
CN112565473B (en) | Access control system and method, electronic device, and computer-readable storage medium | |
CN109428919B (en) | Webpage processing request processing method and device and electronic equipment | |
CN111078736A (en) | Data aggregation processing method and device, terminal and storage medium | |
KR100812394B1 (en) | Method and apparatus for data management service in mobile communication terminal | |
CN112910675A (en) | Equipment management method, device and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |