A method and device for processing external requests
An external request and cluster technology, applied in the field of Internet communication, can solve the problems of increasing the time for the client to receive response information, increasing the load of the cluster system, multi-time and network traffic, etc., so as to avoid the time of sending response information and reduce The time to receive response information and the effect of saving network traffic
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0022] The embodiment of the present invention provides a method for processing external requests, see figure 1 , the method includes:
[0023] Step 101: The access server obtains the garbage collection frequency of the cluster system, and the cluster system includes the access server and multiple service servers;
[0024] Step 102: If the garbage collection frequency is less than the preset threshold, the access server processes the external request sent by the client;
[0025] Step 103: If the garbage collection frequency is greater than or equal to the preset threshold, the access server forwards the external request sent by the client to the service server included in the cluster system, so that the service server included in the cluster system can The external request is processed.
[0026] Wherein, the access server obtains the garbage collection frequency of the cluster system, including:
[0027] The access server obtains the first number of garbage collections by i...
Embodiment 2
[0040] The embodiment of the present invention provides a method for processing external requests, see figure 2 , the method includes:
[0041] Step 201: The access server obtains the garbage collection frequency of the cluster system, and the cluster system includes the access server and multiple service servers;
[0042] Specifically, this step can be achieved through the following steps (1)-(3), including:
[0043] (1) The access server obtains the first number of garbage collections by itself within the first preset time period closest to the current time;
[0044] Wherein, the access server creates a data text in advance, sets an initial value of the number of times of garbage collection, and stores the set initial value of the number of times of garbage collection in the data text. When the available memory cannot be allocated in the heap memory of the access server, the access server triggers garbage collection, counts the number of garbage collections in real time, ...
Embodiment 3
[0084] see image 3 , an embodiment of the present invention provides a device for processing external requests, the device includes:
[0085] The first obtaining module 301 is used to obtain the garbage collection frequency of the cluster system, which includes the access server and multiple service servers;
[0086] A sending module 302, configured to process the external request sent by the client if the garbage collection frequency is less than a preset threshold;
[0087] The first forwarding module 303 is configured to forward the external request sent by the client to the service server included in the cluster system if the garbage collection frequency is greater than or equal to the preset threshold, so that the service server included in the cluster system Process the external request.
[0088] Wherein, the first acquisition module 301 includes:
[0089] The first acquisition unit is configured to acquire the first number of garbage collections by itself within the...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


