CN104580113B - A kind of method and device of processing external request - Google Patents
A kind of method and device of processing external request Download PDFInfo
- Publication number
- CN104580113B CN104580113B CN201310512421.8A CN201310512421A CN104580113B CN 104580113 B CN104580113 B CN 104580113B CN 201310512421 A CN201310512421 A CN 201310512421A CN 104580113 B CN104580113 B CN 104580113B
- Authority
- CN
- China
- Prior art keywords
- type system
- garbage reclamation
- external request
- concentrating type
- access server
- 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
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
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of method and devices of processing external request, belong to field of Internet communication.The method includes:Access server obtains the garbage reclamation frequency of concentrating type system, and the concentrating type system includes the access server and multiple service servers;If the garbage reclamation frequency is less than predetermined threshold value, the external request that the access server sends client is handled;If the garbage reclamation frequency is greater than or equal to the predetermined threshold value, then the external request that the client is sent is transmitted to the service server that the concentrating type system includes by the access server, and the service server that the concentrating type system includes is made to handle the external request.Described device includes:First acquisition module, sending module and the first forwarding module.The present invention reduces the times that client receives response message, save network flow, and reduce the load of concentrating type system.
Description
Technical field
The present invention relates to field of Internet communication, more particularly to a kind of method and device of processing external request.
Background technology
With the fast development of Internet communication technology, more and more users are entertained using internet, work and
The projects such as communication.More due to the use of the user of internet, same time server receives the external request of client transmission
Quantity it is more, cause individual server that can not handle all external requests, thus generally using concentrating type system processing visitor
The external request that family end is sent.
Wherein, concentrating type system includes an access server and multiple service servers.Access server receives client
The external request sent is held, according to the quantity of the quantity of the external request of reception and service server, by the external request of reception
It is averagely allocated to each service server, each service server is made to handle the external request.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:
Since the external request that client is sent needs access server to be transmitted to service server, and work as service server
It has handled the external request and has been also required to be transmitted to client by access server when sending response message to client, such as
This, forwards the information between client and service server that can waste more time and network flow by access server,
It increases client and receives the time of response message, and increase the load of concentrating type system.
Invention content
In order to solve problems in the prior art, an embodiment of the present invention provides a kind of methods and dress of processing external request
It sets.The technical solution is as follows:
On the one hand, a kind of method of processing external request is provided, the method includes:
Access server obtains the garbage reclamation frequency of concentrating type system, and the concentrating type system includes the access service
Device and multiple service servers;
If the garbage reclamation frequency is less than predetermined threshold value, the outside that the access server sends client asks
It asks and is handled;
If the garbage reclamation frequency is greater than or equal to the predetermined threshold value, the access server is by the client
The external request that end is sent is transmitted to the service server that the concentrating type system includes, the industry for making the concentrating type system include
Business server handles the external request.
On the other hand, a kind of device of processing external request is provided, described device includes:
First acquisition module, the garbage reclamation frequency for obtaining concentrating type system, the concentrating type system include described
Access server and multiple service servers;
Sending module, if being less than predetermined threshold value for the garbage reclamation frequency, the outside sent to client asks
It asks and is handled;
First forwarding module will be described if being greater than or equal to the predetermined threshold value for the garbage reclamation frequency
The external request that client is sent is transmitted to the service server that the concentrating type system includes, and makes the concentrating type system include
Service server the external request is handled.
In embodiments of the present invention, when access server judges that the garbage reclamation frequency of the concentrating type system is less than default threshold
When value, the external request which directly sends the client is handled, and need not forward the external request
To the service server that the concentrating type system includes, avoid access server to service server forward external request when
Between, and avoid access server and receive the time of service server transmission response message, and then reduce client reception
The time of response message;And the external request that access server directly sends the client is handled, and saves network
Flow also reduces the load of concentrating type system.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings
Attached drawing.
Fig. 1 is a kind of method flow diagram for processing external request that the embodiment of the present invention one provides;
Fig. 2 is a kind of method flow diagram of processing external request provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of apparatus structure schematic diagram for processing external request that the embodiment of the present invention three provides.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
Embodiment one
An embodiment of the present invention provides a kind of methods of processing external request, and referring to Fig. 1, this method includes:
Step 101:Access server obtains the garbage reclamation frequency of concentrating type system, which includes the access
Server and multiple service servers;
Step 102:If the garbage reclamation frequency is less than predetermined threshold value, which sends client outer
Portion's request is handled;
Step 103:If the garbage reclamation frequency is greater than or equal to the predetermined threshold value, the access server is by the client
The external request that end is sent is transmitted to the service server that the concentrating type system includes, the business clothes for making the concentrating type system include
Business device handles the external request.
Wherein, which obtains the garbage reclamation frequency of concentrating type system, including:
Access server is obtained from the first garbage reclamation in first predetermined time period nearest from current time
Number;
Each service server that access server acquisition concentrating type system includes is nearest from current time first
The second garbage reclamation number in predetermined time period;
The access server according to the first garbage reclamation number, the second garbage reclamation number and the first predetermined time period,
Calculate the garbage reclamation frequency of the concentrating type system.
Wherein, the external request which sends client is handled, including:
The access server loads the first class file for handling external request for itself including, and passes through first kind text
The external request that part sends client is handled.
Wherein, which is transmitted to the business that the concentrating type system includes by the external request that the client is sent
Server, including:
The access server loads the second class file for forwarding request for itself including, and will by the second class file
The external request that the client is sent is transmitted to the service server that the concentrating type system includes.
Further, this method further includes:
In the second predetermined time period after loading the second class file, which will by the second class file
The external request is transmitted to the service server that the concentrating type system includes.
Further, this method further includes:
After the second predetermined time period, which reacquires the garbage reclamation frequency of the concentrating type system
Rate.
In embodiments of the present invention, when access server judges that the garbage reclamation frequency of the concentrating type system is less than default threshold
When value, the external request which directly sends the client is handled, and need not forward the external request
To the service server that the concentrating type system includes, avoid access server to service server forward external request when
Between, and avoid access server and receive the time of service server transmission response message, and then reduce client reception
The time of response message;And the external request that access server directly sends the client is handled, and saves network
Flow also reduces the load of concentrating type system.
Embodiment two
An embodiment of the present invention provides a kind of methods of processing external request, and referring to Fig. 2, this method includes:
Step 201:Access server obtains the garbage reclamation frequency of concentrating type system, which includes the access
Server and multiple service servers;
Specifically, this step can be by as follows(1)-(3)The step of realize, including:
(1), access server be obtained from the first rubbish in first predetermined time period nearest from current time
Recovered frequency;
Wherein, access server creates a data text in advance, the initial value of garbage reclamation number is arranged and by setting
The initial value of garbage reclamation number is stored in the data text.When free memory can not be distributed in the heap memory of the access server
When, access server triggering garbage reclamation, real-time geo-statistic garbage reclamation number, and every a time interval, it will be from the beginning of
The time for counting garbage reclamation number is primary to the garbage reclamation number record counted between current time, and is stored in the data
The garbage reclamation number stored in text and in the data text is stored sequentially in time.For example, the time interval is
One minute, the real-time geo-statistic garbage reclamation number of access server obtained the garbage reclamation number counted every one minute, according to
The garbage reclamation number of statistics is stored in the data text of access server by time sequencing.
Wherein, which can be one minute, or two minutes, the embodiment of the present invention was to the time interval
Size is not specifically limited.
Wherein, the initial value of garbage reclamation number could be provided as 0, will when access server carries out a garbage reclamation
Garbage reclamation number increases by 1.For example, a counter can be arranged in access server, by the counting initial value of the counter
It is set as 0;When carrying out a garbage reclamation, the count value of the counter is increased by 1, to obtain access server in real time
Garbage reclamation number.
Specifically, access server is obtained from the first rubbish in first predetermined time period nearest from current time
The concrete operations of rubbish recovered frequency are:The corresponding rubbish of current time is obtained in the data text that access server includes from itself
Recovered frequency, i.e., the last one data stored in the data text of access server;And obtain before current time and with
Difference between current time is the time point corresponding garbage reclamation number of the first predetermined time period;Current time is corresponded to
Garbage reclamation number subtract the difference before current time and between current time be the first predetermined time period when
Between put corresponding garbage reclamation number, obtain the of access server in first predetermined time period nearest from current time
One garbage reclamation number.
Wherein, the first predetermined time period is the integral multiple of above-mentioned time interval, i.e. the first predetermined time period is above-mentioned
N times of time interval, the embodiment of the present invention are not specifically limited the size of N.
As N=1, access server is obtained from first in first predetermined time period nearest from current time
The concrete operations of garbage reclamation number are:Most latter two garbage reclamation is obtained in the data text that access server includes from itself
Number;Two garbage reclamation numbers of acquisition are subtracted each other, obtain access server when nearest from current time first is default
Between the first garbage reclamation number in length.
(2), access server obtain concentrating type system each service server for including nearest from current time the
The second garbage reclamation number in one predetermined time period;
Wherein, each service server which includes can also create a data text in advance, setting
The initial value of the garbage reclamation number of setting is simultaneously stored in the data text of itself by the initial value of garbage reclamation number.When the cluster
When can not distribute free memory in the heap memory for some service server that formula system includes, which triggers rubbish and returns
Receive, real-time geo-statistic garbage reclamation number, and every a time interval, by from start to count time of garbage reclamation number to
The garbage reclamation number record counted between current time is primary, and is stored in the data text of the service server and the industry
The garbage reclamation number for being engaged in storing in the data text of server is stored sequentially in time.For example, the time interval is
One minute, the real-time geo-statistic garbage reclamation number of the service server was pressed every the garbage reclamation number that one minute obtains statistics
According to time sequencing, the garbage reclamation number of statistics is stored in the data text of the service server.
Wherein, which can be JAVA virtual machine concentrating type system, class of the present invention to the concentrating type system
Type is not specifically limited.
Wherein, which can be one minute, or two minutes, the embodiment of the present invention was to the time interval
Size is not specifically limited.
Wherein, access server starts to count the time of garbage reclamation number and service server starts to count garbage reclamation
The time of number is identical.
Wherein, the initial value of garbage reclamation number could be provided as 0, when each service server carries out a garbage reclamation
When, the garbage reclamation number in each service server is increased by 1.For example, one can be arranged in each service server
The counting initial value of each counter is both configured to 0 by counter;It, will when each service server carries out a garbage reclamation
The count value of its corresponding counter increases by 1, to obtain the garbage reclamation number of each service server in real time.
Specifically, each service server that access server acquisition concentrating type system includes is nearest from current time
The concrete operations of the second garbage reclamation number in first predetermined time period are:Access server includes from the concentrating type system
The corresponding garbage reclamation number of current time, i.e., the number of each service server are obtained in the data text of each service server
According to the last one data stored in text;And it is first pre- to obtain the difference before current time and between current time
If the time point of time span corresponding garbage reclamation number;The corresponding garbage reclamation number of current time is subtracted when current
Between before and difference between current time be the time point of the first predetermined time period corresponding garbage reclamation number, obtain
Second garbage reclamation number of each service server in first predetermined time period nearest from current time.
Wherein, the first predetermined time period is the integral multiple of above-mentioned time interval, i.e. the first predetermined time period is above-mentioned
N times of time interval, the embodiment of the present invention are not specifically limited the size of N.
As N=1, access server obtains each service server that the concentrating type system includes most from current time
The concrete operations of the second garbage reclamation number in the first close predetermined time period are:Access server is from the concentrating type system
Most latter two garbage reclamation number is obtained in data text including each service server;By two garbage reclamations of acquisition time
Number subtracts each other, and obtains second garbage reclamation time of each service server in first predetermined time period nearest from current time
Number, for example, the concentrating type system includes 4 service servers, access server is obtained from the data text of service server 1
Most latter two garbage reclamation number be 34 and 58, access server obtains last from the data text of service server 2
Two garbage reclamation numbers are 23 and 45, most latter two rubbish that access server is obtained from the data text of service server 3
Rubbish recovered frequency is 40 and 78, most latter two garbage reclamation that access server is obtained from the data text of service server 4
Number is 30 and 58.Access server subtracts each other obtained from each service server two garbage reclamation numbers, obtains
It is 24 to garbage reclamation number of the service server 1 in first predetermined time period nearest from current time, business service
Garbage reclamation number of the device 2 in first predetermined time period nearest from current time is 22, and service server 3 is from current
Garbage reclamation number in time nearest the first predetermined time period is 38, and service server 4 is nearest from current time
Garbage reclamation number in first predetermined time period is 28.
(3), according to the first garbage reclamation number, the second garbage reclamation number and the first predetermined time period, calculate the collection
The garbage reclamation frequency of group's formula system.
Specifically, the first garbage reclamation by access server in first predetermined time period nearest from current time
Each service server that number and the concentrating type system include is in first predetermined time period nearest from current time
Second garbage reclamation number is added, and the numerical value divided by the first predetermined time period that will add up obtain the concentrating type system
The garbage reclamation frequency of system.
Step 202:Judge whether the garbage reclamation frequency of the concentrating type system is less than predetermined threshold value, if it is, executing
Step 203, otherwise, step 204 is executed;
Specifically, the garbage reclamation frequency of the concentrating type system is compared with predetermined threshold value, if the concentrating type system
The garbage reclamation frequency of system is less than predetermined threshold value, thens follow the steps 203, otherwise, executes step 204.
Wherein, when the garbage reclamation frequency of the concentrating type system is less than predetermined threshold value, it is determined that the concentrating type system
Load is smaller;When the garbage reclamation frequency of the concentrating type system is greater than or equal to predetermined threshold value, it is determined that the concentrating type system
Load it is larger.
Since external request can generally be related to multiple business, the corresponding business processing of some external requests is got up very simple
It is single, for example check that some data whether there is;And the corresponding business processing of some external requests is got up unusual complexity, such as
Then inquiry mass data is ranked up and exports to the mass data of inquiry.So cannot be simply by the number of external request
Amount judges the load of the concentrating type system, is judged in embodiments of the present invention by the garbage reclamation frequency of concentrating type system
The load of the concentrating type system.
When in the heap memory during the concentrating type system is idle or the concentrating type system free memory can not be distributed, the collection
Group's formula system can trigger garbage reclamation.Due to using the user of internet more and more at present, so the concentrating type system occurs
Idle state is few, which triggers garbage reclamation when generally can not all distribute free memory in heap memory.
When the corresponding business processing of an external request gets up relative complex, server can call more method, root
More variable and object are handled according to the method for calling, so, can be quickly reached in the heap memory of server can not distribute it is available
The case where memory, to trigger garbage reclamation.When the corresponding business processing of an external request is opposite gets up simple, server
The quantity of the method for calling can be less than the quantity for the method that complicated business calls far away, and the variable that is related to of simple business and
The quantity of object can also be less than the quantity of variable and object that complicated business is related to far away, so, when external request is corresponding
The number for triggering garbage reclamation when business processing gets up relatively easy in server can be relatively fewer, thus, it is possible to use rubbish
Recycling frequency weighs the load of the concentrating type system, and judges that the load of the concentrating type system is big using garbage reclamation frequency
It is small, improve the accuracy that access server judges the load of the concentrating type system.
Step 203:The external request that access server sends client is handled, and executes step 206;
Specifically, which loads the first class file for handling external request for itself including, by adding
The external request that the first class file carried sends client is handled.
Wherein, in JAVA technologies, which includes bytecode, can be by executing first class file
The external request that bytecode sends client is handled.
Wherein, when the load of the concentrating type system is smaller, the outside which directly sends client asks
It asks and is handled, which need not be transmitted to service server, so that the service server handles the external request,
The time that access server is consumed to service server forwarding external request is avoided, and avoids access server and receives industry
The time that server transmission response message of being engaged in consumes, in this way, reducing user end to server sends external request and the client
End receives the time interval between the response message that server is sent, that is, reduces the time that client receives response message, carry
The high response speed of website.And the external request that access server directly sends client is handled, and need not be incited somebody to action
The external request is transmitted to service server, and need not receive the response message of service server transmission, saves network
Resource.
Step 204:The external request that client is sent is transmitted to the business that the concentrating type system includes by access server
Server;
Specifically, access server load itself include for forward the second class file asked, pass through the of load
The external request that the client is sent is transmitted to the service server that the concentrating type system includes by two class files.
Wherein, after access server loads second class file, second class file is made to pass through procotol by the visitor
The external request that family end is sent is transmitted to the service server that the concentrating type system includes.
In order to avoid the server of processing external request is ceaselessly cut between access server and service server
It changes, and in order to avoid the influence that frequency fluctuation is brought, when second after access server loads second class file is default
Between in length, which no longer obtains the garbage reclamation frequency of the concentrating type system, directly passes through second class file
The external request of reception is transmitted to the service server that the concentrating type system includes.
Wherein, the second predetermined time period is more than the first predetermined time period, for example, the second predetermined time period can be
Ten minutes.
Wherein, when the quantity for the external request that access server receives simultaneously includes more than or equal to the concentrating type system
When the quantity of service server, the access server by the external request of reception be averagely allocated to that the concentrating type system includes it is every
A service server.
Wherein, access server and service server are all virtual machines in embodiments of the present invention, and access server and
All include the first class file and the second class file, the first class file on access server and service server on service server
External request can be handled, and the second class file on access server and service server can forward request.
Step 205:The service server that the concentrating type system includes receives the external request of access server transmission, and
The external request is handled, step 206 is executed;
Step 206:After the second predetermined time period, the rubbish that access server reacquires the concentrating type system returns
Receive frequency, return to step 202.
Wherein, in embodiments of the present invention, access server can load a virtual machine and adjust plug-in unit, virtual by this
Machine adjusts the method that plug-in unit executes above-mentioned processing external request.
In order to realize the optimization to network, for example the network is optimized when some numerical value reaches preset condition;
Or when some server in the concentrating type system breaks down, in order to no longer be carried out to external request by the server
Processing, technical staff may add some codes to realize in access server and/or service server.If to network
The number of optimization it is more or break down server it is more when, technical staff can repeatedly add code, lead to size of code
Expansion, and then increase the maintenance cost in later stage.And load a virtual machine in embodiments of the present invention and adjust plug-in unit, work as appearance
It is more when occurring by loading a corresponding virtual machine plug-in unit for meeting condition when primary network optimization or server failure
When the secondary network optimization or server failure, the virtual machine plug-in unit of load cannot be met the requirements, and can be unloaded the plug-in unit at this time, be added
Carry another plug-in unit for meeting condition.Due to load another meet the size of code in the plug-in unit of condition can be far smaller than multiple
The quantity of the code of addition, so being asked by loading virtual machine adjusting plug-in unit and adjusting plug-in unit processing outside by the virtual machine
The maintenance cost in later stage can be reduced by asking.
In embodiments of the present invention, when access server judges that the garbage reclamation frequency of the concentrating type system is less than default threshold
When value, the external request which directly sends the client is handled, and need not forward the external request
To the service server that the concentrating type system includes, avoid access server to service server forward external request when
Between, and avoid access server and receive the time of service server transmission response message, and then reduce client reception
The time of response message.And access server judges the concentrating type system according to the garbage reclamation frequency of the concentrating type system
Load improves the accuracy for the load for judging the concentrating type system;And access server is directly to the client
The external request that end is sent is handled, and is saved network flow, is also reduced the load of concentrating type system.
Embodiment three
Referring to Fig. 3, an embodiment of the present invention provides a kind of device of processing external request, which includes:
First acquisition module 301, the garbage reclamation frequency for obtaining concentrating type system, the concentrating type system connect including this
Enter server and multiple service servers;
Sending module 302, if being less than predetermined threshold value for the garbage reclamation frequency, the outside sent to client asks
It asks and is handled;
First forwarding module 303, if being greater than or equal to the predetermined threshold value for the garbage reclamation frequency, by the client
The external request that end is sent is transmitted to the service server that the concentrating type system includes, the business clothes for making the concentrating type system include
Business device handles the external request.
Wherein, the first acquisition module 301 includes:
First acquisition unit, the first rubbish for being obtained from first predetermined time period nearest from current time
Rubbish recovered frequency;
Second acquisition unit, for obtaining each service server that concentrating type system includes nearest from current time
The second garbage reclamation number in first predetermined time period;
Computing unit is used for according to the first garbage reclamation number, the second garbage reclamation number and the first predetermined time period,
Calculate the garbage reclamation frequency of the concentrating type system.
Wherein, sending module 302 includes:
First transmission unit loads the first kind text for handling external request for itself including for the access server
Part, and handled by the external request that the first class file sends client.
Wherein, the first forwarding module 303 includes:
Second transmission unit loads the second class file for forwarding request for itself including for the access server,
And the external request that the client is sent is transmitted to by the service server that the concentrating type system includes by the second class file.
Further, which further includes:
Second forwarding module is used in the second predetermined time period after loading the second class file, the access service
The external request is transmitted to the service server that the concentrating type system includes by device by the second class file.
Further, which further includes:
Second acquisition module, for after the second predetermined time period, which to reacquire the concentrating type
The garbage reclamation frequency of system.
In embodiments of the present invention, when access server judges that the garbage reclamation frequency of the concentrating type system is less than default threshold
When value, the external request which directly sends the client is handled, and need not forward the external request
To the service server that the concentrating type system includes, avoid access server to service server forward external request when
Between, and avoid access server and receive the time of service server transmission response message, and then reduce client reception
The time of response message.And access server judges the concentrating type system according to the garbage reclamation frequency of the concentrating type system
Load improves the accuracy for the load for judging the concentrating type system;And access server is directly to the client
The external request that end is sent is handled, and is saved network flow, is also reduced the load of concentrating type system.
It should be noted that:Above-described embodiment provide processing external request device when handling external request, only with
The division progress of above-mentioned each function module, can be as needed and by above-mentioned function distribution by not for example, in practical application
Same function module is completed, i.e., the internal structure of device is divided into different function modules, to complete whole described above
Or partial function.In addition, the device for the processing external request that above-described embodiment provides and the method for processing external request are implemented
Example belongs to same design, and specific implementation process refers to embodiment of the method, and which is not described herein again.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.
Claims (10)
1. a kind of method of processing external request, which is characterized in that the method includes:
Access server obtain concentrating type system garbage reclamation frequency, the concentrating type system include the access server and
Multiple service servers;
If the garbage reclamation frequency is less than predetermined threshold value, the external request that the access server sends client into
Row processing;
If the garbage reclamation frequency is greater than or equal to the predetermined threshold value, the access server sends out the client
The external request sent is transmitted to the service server that the concentrating type system includes, the business clothes for making the concentrating type system include
Business device handles the external request;
Wherein, the access server obtains the garbage reclamation frequency of concentrating type system, including:
Access server is obtained from the first garbage reclamation number in first predetermined time period nearest from current time;
It is pre- nearest from current time first that the access server obtains each service server that concentrating type system includes
If the second garbage reclamation number in time span;
The access server is preset according to the first garbage reclamation number, the second garbage reclamation number and described first
Time span calculates the garbage reclamation frequency of the concentrating type system.
2. the method as described in claim 1, which is characterized in that the external request that the access server sends client into
Row processing, including:
The access server loads the first class file for handling external request for itself including, and passes through the first kind
The external request that file sends client is handled.
3. the method as described in claim 1, which is characterized in that the access server asks the outside that the client is sent
It asks and is transmitted to the service server that the concentrating type system includes, including:
The access server loads the second class file for forwarding request for itself including, and passes through second class file
The external request that the client is sent is transmitted to the service server that the concentrating type system includes.
4. method as claimed in claim 3, which is characterized in that the method further includes:
In the second predetermined time period after loading second class file, the access server passes through second class
The external request is transmitted to the service server that the concentrating type system includes by file.
5. method as claimed in claim 4, which is characterized in that the method further includes:
After second predetermined time period, the access server reacquires the garbage reclamation of the concentrating type system
Frequency.
6. a kind of device of processing external request, which is characterized in that described device includes:
First acquisition module, the garbage reclamation frequency for obtaining concentrating type system, the concentrating type system includes access service
Device and multiple service servers;
Sending module, if for the garbage reclamation frequency be less than predetermined threshold value, to client send external request into
Row processing;
First forwarding module, if being greater than or equal to the predetermined threshold value for the garbage reclamation frequency, by the client
The external request that end is sent is transmitted to the service server that the concentrating type system includes, the industry for making the concentrating type system include
Business server handles the external request;
Wherein, first acquisition module includes:
First acquisition unit is returned for being obtained from the first rubbish in the first predetermined time period nearest from current time
Receive number;
Second acquisition unit, for obtaining each service server that concentrating type system includes nearest from current time first
The second garbage reclamation number in predetermined time period;
Computing unit, for being preset according to the first garbage reclamation number, the second garbage reclamation number and described first
Time span calculates the garbage reclamation frequency of the concentrating type system.
7. device as claimed in claim 6, which is characterized in that the sending module includes:
First transmission unit loads the first kind text for handling external request for itself including for the access server
Part, and handled by the external request that first class file sends client.
8. device as claimed in claim 6, which is characterized in that first forwarding module includes:
Second transmission unit loads the second class file for forwarding request for itself including for the access server, and
The external request that the client is sent the business that the concentrating type system includes is transmitted to by second class file to take
Business device.
9. device as claimed in claim 8, which is characterized in that described device further includes:
Second forwarding module, in the second predetermined time period after loading second class file, the access to take
The external request is transmitted to the service server that the concentrating type system includes by business device by second class file.
10. device as claimed in claim 9, which is characterized in that described device further includes:
Second acquisition module, for after second predetermined time period, the access server to reacquire the collection
The garbage reclamation frequency of group's formula system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310512421.8A CN104580113B (en) | 2013-10-25 | 2013-10-25 | A kind of method and device of processing external request |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310512421.8A CN104580113B (en) | 2013-10-25 | 2013-10-25 | A kind of method and device of processing external request |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104580113A CN104580113A (en) | 2015-04-29 |
CN104580113B true CN104580113B (en) | 2018-09-04 |
Family
ID=53095309
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310512421.8A Active CN104580113B (en) | 2013-10-25 | 2013-10-25 | A kind of method and device of processing external request |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104580113B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108494703B (en) * | 2018-03-08 | 2022-05-06 | 腾讯科技(深圳)有限公司 | Access frequency control method, device and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1645330A (en) * | 2004-01-21 | 2005-07-27 | 国际商业机器公司 | Method and system for grid-enabled virtual machines with distributed management of applications |
CN101459886A (en) * | 2008-12-23 | 2009-06-17 | 中兴通讯股份有限公司 | MMS gateway and method for implementing flow control |
CN102622303A (en) * | 2011-01-30 | 2012-08-01 | 国际商业机器公司 | Memory overload control method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070100919A1 (en) * | 2005-11-01 | 2007-05-03 | Electronics And Telecommunications Research Institute | Garbage collection unit and method thereof |
-
2013
- 2013-10-25 CN CN201310512421.8A patent/CN104580113B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1645330A (en) * | 2004-01-21 | 2005-07-27 | 国际商业机器公司 | Method and system for grid-enabled virtual machines with distributed management of applications |
CN100418057C (en) * | 2004-01-21 | 2008-09-10 | 国际商业机器公司 | Method and system for grid-enabled virtual machines with distributed management of applications |
CN101459886A (en) * | 2008-12-23 | 2009-06-17 | 中兴通讯股份有限公司 | MMS gateway and method for implementing flow control |
CN102622303A (en) * | 2011-01-30 | 2012-08-01 | 国际商业机器公司 | Memory overload control method and device |
Also Published As
Publication number | Publication date |
---|---|
CN104580113A (en) | 2015-04-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108494703B (en) | Access frequency control method, device and storage medium | |
CN107832126B (en) | Thread adjusting method and terminal thereof | |
CN110474852B (en) | Bandwidth scheduling method and device | |
CN102711139B (en) | A kind of data flow statistic method and terminal | |
CN113285884B (en) | Flow control method and system | |
CN110417838A (en) | A kind of method of data synchronization and synchronous service equipment | |
CN110471749A (en) | Task processing method, device, computer readable storage medium and computer equipment | |
CN110647392A (en) | Intelligent elastic expansion method based on container cluster | |
CN112383585A (en) | Message processing system and method and electronic equipment | |
WO2016119389A1 (en) | Management method, device and system for system docking | |
CN108540356B (en) | Processing method and processing apparatus | |
CN109902103A (en) | Service data management method, device, equipment and computer readable storage medium | |
CN115811537A (en) | Resource adjusting method and device, computer equipment and storage medium | |
CN113905091B (en) | Method and device for processing access request | |
CN105988886A (en) | Fault processing method and device in operation and maintenance process | |
CN106933673B (en) | Method and device for adjusting number of logical threads of component | |
CN106407636B (en) | Integration result statistical method and device | |
CN104580113B (en) | A kind of method and device of processing external request | |
CN115484167B (en) | Network slice shutdown method in communication network, computer device and storage medium | |
CN102546734B (en) | Data information processing system and method | |
CN108124021A (en) | Internet protocol IP address obtains, the method, apparatus and system of website visiting | |
CN108154343B (en) | Emergency processing method and system for enterprise-level information system | |
CN105357060A (en) | Method, device and system for obtaining network equipment performance data | |
CN111176848B (en) | Cluster task processing method, device, equipment and storage medium | |
CN111090627B (en) | Log storage method and device based on pooling, computer equipment and storage medium |
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 |