CN105025042B - A kind of method and system of determining data information, proxy server - Google Patents

A kind of method and system of determining data information, proxy server Download PDF

Info

Publication number
CN105025042B
CN105025042B CN201410153208.7A CN201410153208A CN105025042B CN 105025042 B CN105025042 B CN 105025042B CN 201410153208 A CN201410153208 A CN 201410153208A CN 105025042 B CN105025042 B CN 105025042B
Authority
CN
China
Prior art keywords
service request
request message
server
proxy server
data
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
Application number
CN201410153208.7A
Other languages
Chinese (zh)
Other versions
CN105025042A (en
Inventor
路征
王海通
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Group Hebei Co Ltd
Original Assignee
China Mobile Group Hebei Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Mobile Group Hebei Co Ltd filed Critical China Mobile Group Hebei Co Ltd
Priority to CN201410153208.7A priority Critical patent/CN105025042B/en
Publication of CN105025042A publication Critical patent/CN105025042A/en
Application granted granted Critical
Publication of CN105025042B publication Critical patent/CN105025042B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a kind of methods of determining data information, and the method is in first agent's server;First agent's server can be the positive integer more than or equal to 2 with N-1 second agent's server communication, the N;The described method includes: receiving business request information;When determining the load of first agent's server greater than preset threshold according to the data volume that business request information generates, at least one the second agent's server of partial service request message in business request information into the N-1 second agent server is sent, determines the load of first agent's server less than or equal to until preset threshold until the data volume generated according to business request information.The invention also discloses a kind of determining data information systems, proxy server.

Description

Method and system for determining data information and proxy server
Technical Field
The present invention relates to a service support technology, and in particular, to a method and a system for determining data information, and a proxy server.
Background
The online business hall, as an important component of an electronic channel, receives a great deal of concurrent access of various kinds from customers every moment. Therefore, it becomes especially important to enhance the customer experience of the online business hall. According to statistics of an internet authoritative research institution, the method comprises the following steps: every second of page delay of the online business hall can cause the customer conversion rate to be reduced by 7%, the page browsing amount to be reduced by 11%, and the customer satisfaction to be reduced by 16%.
Therefore, in order to reduce the service handling time and improve the customer experience, a Memcache caching technology is provided, wherein the Memcache is a high-performance distributed memory object caching system and a caching solution under a cluster environment. However, the existing Memcache deployment method has the following problems:
in the existing Memcache deployment method, only one Memcache server is arranged, when the user access volume is large, the user access pressure is transmitted to one Memcache server, and the cache efficiency is low due to the limitation of the network bandwidth of the Memcache server, so that the existing Memcache deployment method has poor performance when processing large data volume application;
when one or some memcached in the Memcache server cannot normally operate, user access corresponding to the memcached which cannot normally operate is directly sent to the database, and when the user access volume is large, the user access pressure is easily transmitted to the database, so that the pressure of the database is too large, and the access efficiency of a final user is reduced.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present invention provide a method, a system, and a proxy server for determining data information, which can disperse service pressure and improve user experience.
The technical scheme of the invention is realized as follows: the embodiment of the invention provides a method for determining data information, which is used in a first proxy server; the first proxy server can communicate with N-1 second proxy servers, wherein N is a positive integer greater than or equal to 2; the method comprises the following steps:
receiving a service request message;
and when the load of the first proxy server is determined to be larger than a preset threshold value according to the data volume generated by the service request message, sending part of the service request message in the service request message to at least one of the N-1 second proxy servers until the load of the first proxy server is determined to be smaller than or equal to the preset threshold value according to the data volume generated by the service request message.
Preferably, the method further comprises:
searching path information and a data identifier corresponding to the service request message according to the service request message;
and acquiring and sending data information corresponding to the service request message according to the path information and the data identifier.
Preferably, the first proxy server is capable of communicating with a cache server; correspondingly, the acquiring and sending the data information corresponding to the service request message according to the path information and the data identifier includes:
according to the path information corresponding to the service request message, sending the data identifier corresponding to the service request message to a cache server;
and acquiring and sending data information corresponding to the service request message, which is determined by the cache server according to the data identifier.
Preferably, the method further comprises:
and receiving a service request message sent by any one of the N-1 second proxy servers, searching path information and a data identifier corresponding to the service request message according to the service request message, and acquiring and sending data information corresponding to the service request message according to the path information and the data identifier.
The embodiment of the invention also provides a method for determining data information, which relates to N first proxy servers, namely a first proxy server A1 to a first proxy server AN; the M cache servers are respectively from a first cache server to an Mth cache server; the N first proxy servers can communicate with each other; the M cache servers all store data information corresponding to the service request message; the data information stored in the first cache server to the M-1 cache server is different from each other, and all the data information stored in the first cache server to the M-1 cache server is stored in the M cache server; n is a positive integer greater than or equal to 2, and M is a positive integer greater than or equal to 3; the method comprises the following steps:
any one of the N first proxy servers receives the service request message, and searches for path information of a cache server where data information corresponding to the service request message is located and data identification corresponding to the data information corresponding to the service request message in the first proxy server according to the service request message;
and the first proxy server acquires and sends the data information corresponding to the service request message to the cache server corresponding to the path information according to the path information and the data identifier.
Preferably, the method further comprises:
and when the load determined by any one of the N first proxy servers according to the data volume generated by the received service request message is greater than a preset threshold value, sending part of the service request message in the service request message to at least one of the other first proxy servers except the first proxy server until the load determined according to the data volume generated by the service request message is less than or equal to the preset threshold value.
Preferably, the acquiring and sending, by the first proxy server, the data information corresponding to the service request message to the cache server corresponding to the path information according to the path information and the data identifier includes:
the first proxy server sends the data identifier corresponding to the service request message to a cache server according to the path information corresponding to the service request message;
the cache server determines data information corresponding to the service request message according to the data identifier corresponding to the service request message;
and the cache server sends the data information corresponding to the service request message to the client through the first proxy server.
Preferably, the method further comprises:
determining that any first proxy server Ai in the N first proxy servers fails to operate normally, and acquiring current service data information and service configuration information of the first proxy server Ai;
determining a first proxy server Aj capable of normally operating, sending the service data information and the service configuration information to the first proxy server Aj, enabling the first proxy server Aj to carry out service configuration by using the service configuration information, and executing the current service of the first proxy server Ai which cannot normally operate according to the service data information;
and i and j are positive integers which are more than or equal to 1 and less than or equal to N, and the values of i and j are different.
Preferably, the method further comprises:
determining that any one of the first cache server to the M-1 cache server fails to operate normally, and acquiring current service data information and service configuration information of the cache server which fails to operate normally;
and sending the service data information and the service configuration information to an Mth cache server, so that the Mth cache server performs service configuration by using the service configuration information, and executing the current service which cannot be operated by the cache server which cannot normally operate according to the service data information.
The embodiment of the invention also provides a first proxy server, wherein the first proxy server can be communicated with N-1 second proxy servers, and N is a positive integer greater than or equal to 2; the first proxy server includes:
a message receiving unit, configured to receive a service request message;
and the load determining unit is used for sending part of the service request messages to at least one second proxy server in the N-1 second proxy servers when the load of the first proxy server is determined to be larger than a preset threshold value according to the data volume generated by the service request messages until the load of the first proxy server determined according to the data volume generated by the service request messages is smaller than or equal to the preset threshold value.
Preferably, the first proxy server further comprises:
the first searching unit is used for searching the path information and the data identification corresponding to the service request message according to the service request message;
and the first acquiring and sending unit is used for acquiring and sending the data information corresponding to the service request message according to the path information and the data identifier.
Preferably, the first proxy server is capable of communicating with a cache server; correspondingly, the first acquiring and sending unit further includes:
the first sending subunit is used for sending the data identifier corresponding to the service request message to the cache server according to the path information corresponding to the service request message;
and the obtaining and sending subunit is used for obtaining and sending the data information which is determined by the cache server according to the data identifier and corresponds to the service request message.
Preferably, the message receiving unit is further configured to receive a service request message sent by a second proxy server; correspondingly, the first proxy server further comprises:
the second searching unit is used for searching the path information and the data identification corresponding to the service request message according to the service request message sent by the second proxy server;
the second acquiring and sending unit is used for acquiring and sending data information corresponding to the service request message sent by the second proxy server according to the path information and the data identifier; and the path information and the data identification are path information and data identification corresponding to a service request message sent by the second proxy server.
An embodiment of the present invention further provides a system for determining data information, where the system includes: n first proxy servers and M cache servers; the N first proxy servers can communicate with each other; the M cache servers all store data information corresponding to the service request message; the M cache servers are respectively a first cache server, a second cache server and an … … Mth cache server, the data information stored in the first cache server to the Mth cache server are different, and the Mth cache server stores all the data information stored in the first cache server to the Mth cache server; n is a positive integer greater than or equal to 2, and M is a positive integer greater than or equal to 3; wherein,
the first proxy server is used for receiving the service request message, and searching the path information of the cache server where the data information corresponding to the service request message is located and the data identifier corresponding to the data information corresponding to the service request message in the proxy service according to the service request message;
the cache server is used for acquiring and sending the data information corresponding to the service request message to the cache server corresponding to the path information according to the path information and the data identifier;
and the cache server is used for determining and sending the data information corresponding to the service request message according to the data identifier.
Preferably, the first proxy server is further configured to send a part of the service request message in the service request message to at least one first proxy server in the other first proxy servers except the first proxy server when the load determined according to the data volume generated by the received service request message is greater than a preset threshold until the load determined according to the data volume generated by the service request message is less than or equal to the preset threshold.
The method, the system and the proxy server for determining the data information provided by the embodiment of the invention make up the defect that the traditional service node deploys a single cache server, improve the cache performance of a cache server layer and disperse the service pressure; in addition, the invention adopts the pressure pointer to judge the load of the proxy server in the proxy server layer, and sends part of the service request message exceeding the load of the proxy server to other proxy servers with smaller load, thus improving the processing speed of the proxy server and realizing the double-layer balanced cluster deployment of the proxy server layer and the cache server layer.
Drawings
Fig. 1 is a first schematic flow chart illustrating an implementation of a method for determining data information according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a first proxy server according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an acquiring and transmitting unit according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a second implementation flow of a method for determining data information according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a cache server according to an embodiment of the present invention;
fig. 6 is a schematic flow chart illustrating an implementation of the method for determining data information according to the embodiment of the present invention;
fig. 7 is a schematic structural diagram of a system for determining data information according to the embodiment shown in fig. 6.
Detailed Description
So that the manner in which the features and aspects of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings.
Example one
Fig. 1 is a first schematic flow chart illustrating an implementation of a method for determining data information according to an embodiment of the present invention; the method is used in a first proxy server; the first proxy server can communicate with N-1 second proxy servers, wherein N is a positive integer greater than or equal to 2; as shown in fig. 1, the method includes:
step 101: receiving a service request message;
here, the first proxy server receives a service request message sent by the client through the service platform.
Step 102: and when the load of the first proxy server is determined to be larger than a preset threshold value according to the data volume generated by the service request message, sending part of the service request message in the service request message to at least one of the N-1 second proxy servers until the load of the first proxy server is determined to be smaller than or equal to the preset threshold value according to the data volume generated by the service request message.
Specifically, when the load of the first proxy server determined by the first proxy server according to the data volume generated by processing the service request message in the first proxy server is greater than q, the first proxy server sends part of the service request message in the service request message to at least one second proxy server in the N-1 second proxy servers until the load of the first proxy server determined by the first proxy server according to the data volume generated by the remaining service request message is less than or equal to q;
here, q is 1.2 times of the data volume generated by the first proxy server processing the service request message in itself when the service is busy; and the q is dynamically adjusted according to the number of the service request messages of the first proxy server and the size of the data volume generated by the service request messages.
When the number of the service request messages sent to the second proxy server is determined, introducing a concept of a pressure pointer P, wherein the pressure pointer P is a standard for judging the load size of the first proxy server; wherein, the P = data volume/q generated by the first proxy server processing the service request message in itself; when P is greater than 1, it indicates that the load of the first proxy server is large, and it is necessary to send out a part of service request messages in the first proxy server to relieve the pressure of the first proxy server; when P is 1 or less, it means that the load of the first proxy server is small.
Specifically, the number X of all the service request messages sent by the first proxy server to the N-1 second proxy servers is equal to or less than the value according toThe maximum integer of the calculated numerical value;
wherein, the C is the number of all the service request messages received by the first proxy server.
Specifically, when the load of the first proxy server, which is determined by the data volume generated by the first proxy server processing the service request message in the first proxy server, is greater than q, the number of the service request messages sent by the first proxy server to each second proxy server is respectively:
the number of the service request messages sent by the first proxy server to the first second proxy server is smallIs equal to or greater thanThe maximum integer of the calculated numerical value;
the number of the service request messages sent by the first proxy server to the second proxy server is smallIs equal to or greater thanThe maximum integer of the calculated numerical value;
and so on, the first proxy server sends the service request message of the (N-1) th second proxy serverIs less than or equal toMaximum of the calculated valueAn integer number;
wherein, the P1Data volume/q generated for first proxy server to process service request message in itself1Said q is11.2 times of data volume generated by the first proxy server processing the service request message in the first proxy server when the service is busy; p2Data volume/q generated for the first second proxy server to process the service request message in itself2Said q is21.2 times of data volume generated when the first second proxy server processes the service request message in the first proxy server when the service is busy; by analogy, PNData volume/q generated for the N-1 st second proxy server to process the service request message in itselfNSaid q isNThe amount of data generated for the N-1 th second proxy server to process the service request message in itself while the service is busy is 1.2 times.
Further, the method further comprises:
searching path information and a data identifier corresponding to the service request message according to the service request message;
and acquiring and sending data information corresponding to the service request message according to the path information and the data identifier.
Here, the first proxy server searches, according to the service request message, path information of a cache server where data information corresponding to the service request message is located, and a data identifier corresponding to the data information corresponding to the service request message in the first proxy server;
specifically, by using a constant Hashing principle, the first proxy server first determines a hash value of a service node where each cache server is located, stores the hash value of the service node where each cache server is located in a storage area in the first proxy server, then determines a hash value of a key of data information corresponding to each service request message in each cache server, and stores the hash value in a storage space in the first proxy server, so that location information of the data information corresponding to the service request message, that is, service node information where the cache server is located, and a data identifier, that is, a hash value, of the data information corresponding to the service request message are stored in the first proxy server.
Further, the first proxy server is capable of communicating with a cache server; correspondingly, the acquiring and sending the data information corresponding to the service request message according to the path information and the data identifier includes:
according to the path information corresponding to the service request message, sending the data identifier corresponding to the service request message to a cache server;
and acquiring and sending data information corresponding to the service request message, which is determined by the cache server according to the data identifier.
Specifically, the first proxy server sends a data identifier corresponding to the service request message to a cache server according to path information corresponding to the service request message, and the cache server determines data information corresponding to the data identifier and corresponding to the service request message according to the data identifier and sends the data information to the first proxy server; and the first proxy server acquires the data information corresponding to the service request message and sends the data information corresponding to the service request message to the client for the user to inquire and use.
Here, the first proxy server stores therein path information of data information corresponding to the service request message and a data identifier of the data information corresponding to the service request message; and the cache server stores the data information corresponding to the service request message, so that the user sends the service request message to the first proxy server, and the data information corresponding to the service request message sent by the user is acquired from the cache server through the first proxy server.
Further, the method comprises:
and receiving a service request message sent by any one of the N-1 second proxy servers, searching path information and a data identifier corresponding to the service request message according to the service request message, and acquiring and sending data information corresponding to the service request message according to the path information and the data identifier.
An embodiment of the present invention further provides a first proxy server corresponding to the method of the first embodiment, where the first proxy server is capable of communicating with N-1 second proxy servers, and as shown in fig. 2, the first proxy server includes:
a message receiving unit 21, configured to receive a service request message;
and a load determining unit 22, configured to send a part of the service request message in the service request message to at least one of the N-1 second proxy servers when the load of the first proxy server determined according to the data amount generated by the service request message is greater than a preset threshold, until the load of the first proxy server determined according to the data amount generated by the service request message is less than or equal to the preset threshold.
Further, the first proxy server further includes:
a first searching unit 23, configured to search, according to the service request message, path information and a data identifier corresponding to the service request message;
and a first obtaining and sending unit 24, configured to obtain and send data information corresponding to the service request message according to the path information and the data identifier.
Further, the first proxy server is capable of communicating with a cache server; in a corresponding manner, the first and second electrodes are,
as shown in fig. 3, the first acquiring and transmitting unit 24 further includes:
a first sending subunit 241, configured to send, according to the path information corresponding to the service request message, the data identifier corresponding to the service request message to the cache server;
and an obtaining and sending subunit 242, configured to obtain and send data information corresponding to the service request message, which is determined by the cache server according to the data identifier.
Further, the message receiving unit 21 is further configured to receive a service request message sent by a second proxy server; correspondingly, the first proxy server further comprises:
a second searching unit 25, configured to search, according to the service request message sent by the second proxy server, path information and a data identifier corresponding to the service request message;
a second obtaining and sending unit 26, configured to obtain and send data information corresponding to the service request message sent by the second proxy server according to the path information and the data identifier; and the path information and the data identification are path information and data identification corresponding to a service request message sent by the second proxy server.
Example two
Fig. 4 is a schematic diagram of an implementation flow of a method for determining data information according to an embodiment of the present invention, where the method is used in a cache server, and as shown in fig. 2, the method includes:
step 401: receiving a data identifier corresponding to the service request message;
step 402: and determining and sending the data information corresponding to the service request message according to the data identifier corresponding to the service request message.
Specifically, the cache server receives a data identifier corresponding to the service request message sent by the first proxy server, determines data information corresponding to the service request message according to the data identifier corresponding to the service request message, and sends the data information corresponding to the service request message to the client through the first proxy server for the user to inquire and use.
Here, the data identifier is a data identifier of data information corresponding to the service request message, which is stored in the first proxy server; the data identification may be a hash value of a key of data information corresponding to the service request message.
The embodiment of the invention also provides a cache server corresponding to the method of the second embodiment, wherein the cache server can be communicated with the first proxy server; as shown in fig. 5, the cache server includes:
a data identifier receiving unit 51, configured to receive a data identifier corresponding to the service request message;
and a determining and sending unit 52, configured to determine and send data information corresponding to the service request message according to the data identifier corresponding to the service request message.
EXAMPLE III
The method for determining data information in the embodiment of the invention relates to N first proxy servers which are respectively a first proxy server A1To the first proxy server AN(ii) a The M cache servers are respectively from a first cache server to an Mth cache server; the N first proxy servers can communicate with each other; the M cache serversThe data information corresponding to the service request message is stored in the data storage module; the data information stored in the first cache server to the M-1 cache server is different from each other, and all the data information stored in the first cache server to the M-1 cache server is stored in the M cache server; n is a positive integer greater than or equal to 2, and M is a positive integer greater than or equal to 3; fig. 6 is a schematic view of a third implementation flow of a method for determining data information according to an embodiment of the present invention, as shown in fig. 6, the method includes:
step 601: any one of the N first proxy servers receives the service request message, and searches for path information of a cache server where the data information of the service request message is located and a data identifier corresponding to the data information of the service request message in the first proxy service according to the service request message;
specifically, any one of the N first proxy servers receives a service request message sent by a client through a service platform.
Step 602: and the first proxy server acquires and sends the data information corresponding to the service request message to the cache server corresponding to the path information according to the path information and the data identifier.
Specifically, the first proxy server acquires and sends data information corresponding to the path information to a cache server corresponding to the path information in the M-1 cache servers according to the path information and the data identifier; the M-1 cache servers are from a first cache server to an M-1 cache server.
Further, the method further comprises:
and when the load determined by any one of the N first proxy servers according to the data volume generated by the received service request message is greater than a preset threshold value, sending part of the service request message in the service request message to at least one of the other first proxy servers except the first proxy server until the load determined according to the data volume generated by the service request message is less than or equal to the preset threshold value.
Specifically, the embodiment of the present invention introduces a concept of a pressure pointer p, where the pressure pointer p is a standard for determining a load size of any one Am of the N first proxy servers; wherein, p = data volume/q generated by the first proxy server Am processing its own service request message; the q is 1.2 times of the data volume generated by the first proxy server Am processing the service request message in the first proxy server Am when the service is busy; when the load determined by the first proxy server Am according to the data volume generated by processing the service request message in the first proxy server Am is greater than q, the first proxy server Am sends part of the service request message in the service request message to other first proxy servers except the first proxy server Am until the load of the first proxy server Am determined according to the data volume generated by the service request message is less than or equal to a preset threshold value; wherein m is a positive integer greater than or equal to 1 and less than or equal to N;
specifically, the number X of all the service request messages sent by the first proxy server Am to N-1 other first proxy servers except for the first proxy server Am is equal to or less than the number XThe maximum integer of the calculated numerical value;
wherein C is the number of all service request messages received by the first proxy server Am.
Specifically, when the load of the first proxy server Am, which is determined by the data volume generated by the first proxy server Am processing the service request message in the first proxy server Am, is greater than q, the number of the service request messages sent by the first proxy server Am to each of the other first proxy servers except the first proxy server Am is respectively:
the first proxy server Am sends to other first proxy servers except the first proxy server AmIn the serverThe number of service request messages of the first proxy server is less than or equal toThe maximum integer of the calculated numerical value;
the first proxy server Am sends to other first proxy servers except the first proxy server AmThe number of service request messages of a second first proxy server in the server is less than or equal toThe maximum integer of the calculated numerical value;
by analogy, the first proxy server Am sends the first proxy server Am to the second proxy server Am except the first proxy server AmThe number of the service request messages of the (N-1) th first proxy server in one proxy server is less than or equal toThe maximum integer of the calculated numerical value;
wherein, the P1Data volume/q generated for the first proxy server Am to process the service request message in itself1Said q is11.2 times of data volume generated by processing a service request message in the first proxy server Am when the service is busy; the P is2Data volume/q generated for the first one of the other first proxy servers except the first proxy server Am to process the service request message in the first proxy server2Said q is2The data volume generated when the first proxy server in other first proxy servers except the first proxy server Am processes the service request message in the first proxy server is 1.2 times of the data volume generated when the service is busy; by analogy, PNData amount/q generated for the N-1 st first proxy server in the other first proxy servers except the first proxy server Am to process the service request message in the first proxy server AmNSaid q isNThe data volume generated when the N-1 th first proxy server in other first proxy servers except the first proxy server Am processes the service request message in the first proxy server is 1.2 times of the data volume generated when the service is busy.
Further, the first proxy server obtains and sends the data information corresponding to the service request message to the cache server corresponding to the service request message according to the path information and the data identifier, and the method includes:
the first proxy server sends the data identifier corresponding to the service request message to a cache server according to the path information corresponding to the service request message;
the cache server determines data information corresponding to the service request message according to the data identifier corresponding to the service request message;
and the cache server sends the data information corresponding to the service request message to the client through the first proxy server.
Further, the method further comprises:
determining any one of the N first proxy servers AiObtaining the first proxy server A when the first proxy server A fails to operate normallyiCurrent service data information and service configuration information;
determining a first proxy server A capable of operating normallyjSending the service data information and the service configuration information to the first proxy server AjMake the first proxy server AjUsing the service configuration information to configure the service, and executing the first proxy server A according to the service data informationjCurrent services that fail to operate normally;
and i and j are positive integers which are more than or equal to 1 and less than or equal to N, and the values of i and j are different.
Further, the method further comprises:
determining that any one of the first cache server to the M-1 cache server fails to operate normally, and acquiring current service data information and service configuration information of the cache server which fails to operate normally;
and sending the service data information and the service configuration information to an Mth cache server, so that the Mth cache server performs service configuration by using the service configuration information, and executing the current service which cannot be operated by the cache server which cannot normally operate according to the service data information.
The embodiment of the present invention further provides a system for determining data information corresponding to the third embodiment, as shown in fig. 7, the system includes: n first proxy servers 71 and M cache servers 72; the N first proxy servers can communicate with each other; the M cache servers all store data information corresponding to the service request message; the M cache servers are respectively a first cache server, a second cache server and an … … Mth cache server, the data information stored in the first cache server to the Mth cache server are different, and the Mth cache server stores all the data information stored in the first cache server to the Mth cache server; n is a positive integer greater than or equal to 2, and M is a positive integer greater than or equal to 3; wherein,
the first proxy server is used for receiving the service request message, and searching the path information of the cache server where the data information corresponding to the service request message is located and the data identifier corresponding to the data information corresponding to the service request message in the proxy service according to the service request message;
the cache server is used for acquiring and sending the data information corresponding to the service request message to the cache server corresponding to the path information according to the path information and the data identifier;
and the cache server is used for determining and sending the data information corresponding to the service request message according to the data identifier.
Further, the first proxy server is further configured to send a part of the service request message in the service request message to at least one first proxy server in the other first proxy servers except the first proxy server when the load determined according to the data volume generated by the received service request message is greater than a preset threshold until the load determined according to the data volume generated by the service request message is less than or equal to the preset threshold.
The system corresponding to the method for fixing the data information comprises a client layer, a proxy server layer, a cache server layer and a database layer, wherein the client layer can communicate with the proxy server layer through a service platform; the proxy server layer comprises N first proxy servers, and the N first proxy servers have the same function and can independently complete tasks; the cache server layer comprises M cache servers which are respectively a first cache server to an Mth cache server, wherein data information in the database layer is uniformly stored in the first cache server to the Mth-1 cache server, the data information stored in the first cache server to the Mth-1 cache server is different from the data information stored in the Mth cache server, and all the data information in the database layer is stored in the Mth cache server, so that the Mth cache server can be called in time to ensure the normal operation of the whole system when other cache servers cannot operate normally, and therefore, the Mth cache server is also called as a standby server.
Specifically, the proxy server layer adopts a consistency Hashing principle, the proxy server layer firstly determines hash values of service nodes of each cache server in the cache server layer, uniformly stores the hash values of the service nodes of each cache server in a storage area of each first proxy server in the proxy server layer, then determines hash values of keys of data information corresponding to each service request message in each cache server in the cache server layer, and correspondingly stores the hash values into a storage space of each first proxy server in the proxy server layer, wherein the first proxy server of the hash values of the service nodes of the cache servers is the same as the first proxy server of the hash values of the keys of the data information corresponding to each service request message in the cache server, in this way, each first proxy server in the proxy server layer stores the service node information where the cache server is located, which is the location information of the data information corresponding to the service request message, and the hash value, which is the data identifier of the data information corresponding to the service request message.
Here, each first proxy server in the proxy server layer stores path information of a cache server where data information corresponding to the service request message is located and a data identifier of the data information corresponding to the service request message; each cache server in the cache server layer stores data information corresponding to the service request message, furthermore, the path information of the cache server where the data information corresponding to the service request message stored in the first proxy server is located corresponds to the specific location of the cache server one by one, the data identifier stored in the first proxy server also corresponds to the data information stored in the cache server one by one, therefore, after the user sends the service request message to any first proxy server in the proxy server layer, the first proxy server determines path information of a cache server where data information corresponding to the service request message is located, and determines a data identifier corresponding to the data information corresponding to the service request message stored in itself, and acquiring data information corresponding to the service request message from a cache server according to the path information and the data identifier.
For example, a user inquires data of a red rice contract machine by logging in a network business hall, at the moment, the user sends a service request message corresponding to the red rice contract machine to a first proxy server in a proxy server layer through a client, the first proxy server receives the service request message, and inquires path information of a cache server where data information corresponding to the service request message is located and a data identifier corresponding to the data information corresponding to the service request message in the first proxy server according to the service request message; and the first proxy server sends the data identifier corresponding to the service request message to a cache server corresponding to the path information, and the cache server determines the data information corresponding to the service request message according to the data identifier corresponding to the service request message and sends the data information corresponding to the service request message to the client through the first proxy server for the user to inquire and use.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (13)

1. A method of determining data information, the method being used in a first proxy server; the first proxy server can communicate with N-1 second proxy servers, wherein N is a positive integer greater than or equal to 2; the method comprises the following steps:
receiving a service request message;
when the load of the first proxy server is determined to be larger than a preset threshold value according to the data volume generated by the service request message, sending part of the service request message in the service request message to at least one of the N-1 second proxy servers until the load of the first proxy server is determined to be smaller than or equal to the preset threshold value according to the data volume generated by the service request message;
the threshold value is dynamically adjusted according to the quantity of the service request messages of the first proxy server and the size of the data volume generated by the service request messages.
2. The method of claim 1, further comprising:
searching path information and a data identifier corresponding to the service request message according to the service request message;
and acquiring and sending data information corresponding to the service request message according to the path information and the data identifier.
3. The method of claim 2, wherein the first proxy server is capable of communicating with a cache server; correspondingly, the acquiring and sending the data information corresponding to the service request message according to the path information and the data identifier includes:
according to the path information corresponding to the service request message, sending the data identifier corresponding to the service request message to a cache server;
and acquiring and sending data information corresponding to the service request message, which is determined by the cache server according to the data identifier.
4. The method according to any one of claims 1 to 3, further comprising:
and receiving a service request message sent by any one of the N-1 second proxy servers, searching path information and a data identifier corresponding to the service request message according to the service request message, and acquiring and sending data information corresponding to the service request message according to the path information and the data identifier.
5. Method for determining data informationCharacterised in that said method involves N first proxy servers, respectively first proxy server A1To the first proxy server AN(ii) a The M cache servers are respectively from a first cache server to an Mth cache server; the N first proxy servers can communicate with each other; the M cache servers all store data information corresponding to the service request message; the data information stored in the first cache server to the M-1 cache server is different from each other, and all the data information stored in the first cache server to the M-1 cache server is stored in the M cache server; n is a positive integer greater than or equal to 2, and M is a positive integer greater than or equal to 3; the method comprises the following steps:
any one of the N first proxy servers receives the service request message, and searches for path information of a cache server where data information corresponding to the service request message is located and data identification corresponding to the data information corresponding to the service request message in the first proxy server according to the service request message;
the first proxy server acquires and sends data information corresponding to the service request message to a cache server corresponding to the path information according to the path information and the data identifier;
when the load determined by any one of the N first proxy servers according to the data volume generated by the received service request message is greater than a preset threshold value, sending part of the service request message in the service request message to at least one of the other first proxy servers except the first proxy server until the load determined according to the data volume generated by the service request message is less than or equal to the preset threshold value;
the threshold value is dynamically adjusted according to the quantity of the service request messages of the first proxy server and the size of the data volume generated by the service request messages.
6. The method of claim 5, wherein the first proxy server obtains and sends the data information corresponding to the service request message to the cache server corresponding to the path information according to the path information and the data identifier, and the method comprises:
the first proxy server sends the data identifier corresponding to the service request message to a cache server according to the path information corresponding to the service request message;
the cache server determines data information corresponding to the service request message according to the data identifier corresponding to the service request message;
and the cache server sends the data information corresponding to the service request message to the client through the first proxy server.
7. The method according to any one of claims 5 to 6, further comprising:
determining any one of the N first proxy servers AiObtaining the first proxy server A when the first proxy server A fails to operate normallyiCurrent service data information and service configuration information;
determining a first proxy server A capable of operating normallyjSending the service data information and the service configuration information to the first proxy server AjMake the first proxy server AjUsing the service configuration information to configure the service, and executing the first proxy server A according to the service data informationiCurrent services that fail to operate normally;
and i and j are positive integers which are more than or equal to 1 and less than or equal to N, and the values of i and j are different.
8. The method according to any one of claims 5 to 6, further comprising:
determining that any one of the first cache server to the M-1 cache server fails to operate normally, and acquiring current service data information and service configuration information of the cache server which fails to operate normally;
and sending the service data information and the service configuration information to an Mth cache server, so that the Mth cache server performs service configuration by using the service configuration information, and executing the current service which cannot be operated by the cache server which cannot normally operate according to the service data information.
9. A first proxy server, wherein the first proxy server is capable of communicating with N-1 second proxy servers, wherein N is a positive integer greater than or equal to 2; the first proxy server includes:
a message receiving unit, configured to receive a service request message;
the load determining unit is used for sending part of the service request messages to at least one second proxy server in the N-1 second proxy servers when the load of the first proxy server is determined to be larger than a preset threshold value according to the data volume generated by the service request messages until the load of the first proxy server is determined to be smaller than or equal to the preset threshold value according to the data volume generated by the service request messages;
the threshold value is dynamically adjusted according to the quantity of the service request messages of the first proxy server and the size of the data volume generated by the service request messages.
10. The first proxy server of claim 9, further comprising:
the first searching unit is used for searching the path information and the data identification corresponding to the service request message according to the service request message;
and the first acquiring and sending unit is used for acquiring and sending the data information corresponding to the service request message according to the path information and the data identifier.
11. The first proxy server of claim 10, wherein the first proxy server is capable of communicating with a cache server; correspondingly, the first acquiring and sending unit further includes:
the first sending subunit is used for sending the data identifier corresponding to the service request message to the cache server according to the path information corresponding to the service request message;
and the obtaining and sending subunit is used for obtaining and sending the data information which is determined by the cache server according to the data identifier and corresponds to the service request message.
12. The first proxy server according to any one of claims 9 to 11, wherein the message receiving unit is further configured to receive a service request message sent by the second proxy server; correspondingly, the first proxy server further comprises:
the second searching unit is used for searching the path information and the data identification corresponding to the service request message according to the service request message sent by the second proxy server;
the second acquiring and sending unit is used for acquiring and sending data information corresponding to the service request message sent by the second proxy server according to the path information and the data identifier; and the path information and the data identification are path information and data identification corresponding to a service request message sent by the second proxy server.
13. A system for determining data information, the system comprising: n first proxy servers and M cache servers; the N first proxy servers can communicate with each other; the M cache servers all store data information corresponding to the service request message; the M cache servers are respectively a first cache server, a second cache server and an … … Mth cache server, the data information stored in the first cache server to the Mth cache server are different, and the Mth cache server stores all the data information stored in the first cache server to the Mth cache server; n is a positive integer greater than or equal to 2, and M is a positive integer greater than or equal to 3; wherein,
the first proxy server is used for receiving the service request message, and searching the path information of the cache server where the data information corresponding to the service request message is located and the data identifier corresponding to the data information corresponding to the service request message in the proxy service according to the service request message;
the cache server is used for acquiring and sending the data information corresponding to the service request message to the cache server corresponding to the path information according to the path information and the data identifier;
the cache server is used for determining and sending data information corresponding to the service request message according to the data identifier;
the first proxy server is further configured to send part of the service request message in the service request message to at least one first proxy server in the other first proxy servers except the first proxy server when the load determined according to the data volume generated by the received service request message is greater than a preset threshold value until the load determined according to the data volume generated by the service request message is less than or equal to the preset threshold value; the threshold value is dynamically adjusted according to the quantity of the service request messages of the first proxy server and the size of the data volume generated by the service request messages.
CN201410153208.7A 2014-04-16 2014-04-16 A kind of method and system of determining data information, proxy server Active CN105025042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410153208.7A CN105025042B (en) 2014-04-16 2014-04-16 A kind of method and system of determining data information, proxy server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410153208.7A CN105025042B (en) 2014-04-16 2014-04-16 A kind of method and system of determining data information, proxy server

Publications (2)

Publication Number Publication Date
CN105025042A CN105025042A (en) 2015-11-04
CN105025042B true CN105025042B (en) 2019-06-28

Family

ID=54414746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410153208.7A Active CN105025042B (en) 2014-04-16 2014-04-16 A kind of method and system of determining data information, proxy server

Country Status (1)

Country Link
CN (1) CN105025042B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550523A (en) * 2015-12-28 2016-05-04 上海携程商务有限公司 Data processing method
CN106060004A (en) * 2016-05-09 2016-10-26 深圳市永兴元科技有限公司 Database access method and database agent node
CN110855786B (en) * 2019-11-18 2022-07-29 天津联想协同科技有限公司 Processing method and device for network data request and computer storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103036994A (en) * 2012-12-18 2013-04-10 曙光信息产业(北京)有限公司 Cloud storage system capable of achieving load balance
CN103516744A (en) * 2012-06-20 2014-01-15 阿里巴巴集团控股有限公司 A data processing method, an application server and an application server cluster

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6438652B1 (en) * 1998-10-09 2002-08-20 International Business Machines Corporation Load balancing cooperating cache servers by shifting forwarded request

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516744A (en) * 2012-06-20 2014-01-15 阿里巴巴集团控股有限公司 A data processing method, an application server and an application server cluster
CN103036994A (en) * 2012-12-18 2013-04-10 曙光信息产业(北京)有限公司 Cloud storage system capable of achieving load balance

Also Published As

Publication number Publication date
CN105025042A (en) 2015-11-04

Similar Documents

Publication Publication Date Title
CN104054316B (en) Systems and methods for conducting load balancing on SMS center and building virtual private network
US10187445B2 (en) System, method and browser client for enabling browser data synchronization
EP3836486A1 (en) Service link selection control method and device
WO2019237594A1 (en) Session persistence method and apparatus, and computer device and storage medium
CN109889567B (en) Implementation method of Internet of things platform supporting mass equipment access
CN108933829A (en) A kind of load-balancing method and device
EP2633667A2 (en) System and method for on the fly protocol conversion in obtaining policy enforcement information
CN104065759A (en) Method for improving utilization efficiency of NAT address pool resource and device thereof
CN103458013A (en) Streaming media server cluster load balancing system and balancing method
CN103581040A (en) Server distributing device and server distributing method
CN110727738A (en) Global routing system based on data fragmentation, electronic equipment and storage medium
CN105025042B (en) A kind of method and system of determining data information, proxy server
CN104618388A (en) Quick registration and login method and corresponding reset server and information server
CN106028311B (en) A kind of terminal registration method and device
CN109413224B (en) Message forwarding method and device
KR20130130295A (en) System and method for assigining server to terminal and efficiently delivering messages to the terminal
CN110798495B (en) Method and server for end-to-end message push in cluster architecture mode
CN105335313A (en) Basic data transmission method and apparatus
US20210037090A1 (en) Systems and Methods for Server Failover and Load Balancing
CN117082029A (en) Access method and device based on line cache, electronic equipment and storage medium
CN101753561B (en) Business cluster processing method and cluster system
CN103118115B (en) Facing cloud calculates virtual machine management method and the device of user
CN103533001A (en) Communication method and communication system based on HTTP multi-proxy, and intermediate proxy server
CN105871972A (en) Video resource distributed cathe method, device and system
CN105721398A (en) Data access method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant