CN109298939A - Access frequency control method, device, system and the server of distributed system - Google Patents
Access frequency control method, device, system and the server of distributed system Download PDFInfo
- Publication number
- CN109298939A CN109298939A CN201811124189.XA CN201811124189A CN109298939A CN 109298939 A CN109298939 A CN 109298939A CN 201811124189 A CN201811124189 A CN 201811124189A CN 109298939 A CN109298939 A CN 109298939A
- Authority
- CN
- China
- Prior art keywords
- access frequency
- distributed system
- service
- node
- frequency control
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5013—Request control
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5022—Workload threshold
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/506—Constraint
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/508—Monitor
Abstract
The invention discloses access frequency control method, device, system and the servers of a kind of distributed system, the described method includes: the service node in distributed system judges whether service processes are in restriction state according to local frequency limit mark in response to the service request received;When the judgment result is no, the corresponding business of service node processing business request, is sent to access frequency control node for the requested access frequency of service request;Access frequency control node judges whether requested access frequency is greater than the current accessed upper frequency limit of the distributed system;When the result judged is is, service node of the access frequency control node into the distributed system sends access limitation message;Service node limits mark according to the local frequency of access limitation message setting.Using technical solution provided in an embodiment of the present invention effective control to the access frequency of distributed system can be realized on the basis of guaranteeing business processing efficiency.
Description
Technical field
The present invention relates to Internet communication technology field more particularly to a kind of access frequency controlling parties of distributed system
Method, device, system and server.
Background technique
With making rapid progress for Internet communication technology, the Internet service system of some large sizes, due to business complexity etc.
Reason can use distributed system.In general, the amount of access of distributed system is larger, in order to protect operation system, limit service
Request needs to access to distributed system the control of frequency.
Currently, the access frequency that distributed system is usually carried out using centralized central node frequency limit is controlled, tool
Body, multiple service nodes in distributed system after receiving service request, to central node send access request so as to
Central node accesses frequency control, causes to increase additional access request step in business procession, influences business
Treatment effeciency.Accordingly, it is desirable to provide more reliable or more efficient scheme.
Summary of the invention
The present invention provides access frequency control method, device, system and the server of a kind of distributed system, Ke Yi
On the basis of guaranteeing business processing efficiency, effective control to the access frequency of distributed system is realized.
In a first aspect, the present invention provides a kind of access frequency control method of distributed system, which comprises
Service node in distributed system takes in response to the service request received according to local frequency limit mark judgement
Whether business process is in restriction state;
When the judgment result is no, the service node in distributed system handles industry corresponding to the service request
Business, is sent to access frequency control node for the requested access frequency of the service request;
Access frequency control node in distributed system judges whether the requested access frequency is greater than described point
The current accessed upper frequency limit of cloth system;
When judging that the requested access frequency is greater than the current accessed upper frequency limit of the distributed system, visit
Ask that service node of the frequency control node into the distributed system sends access limitation message;
Service node in the distributed system limits mark according to the local frequency of the access limitation message setting.
Second aspect, the present invention provides a kind of access frequency control methods of distributed system, which comprises
Receive the requested access frequency that the service node in distributed system is sent;
Judge whether the requested access frequency is greater than the current accessed upper frequency limit of the distributed system;
When the result judged is is, the service node into the distributed business system sends access limitation message,
So that the local frequency of service node setting limits mark.
The third aspect provides a kind of access frequency control method of distributed system, which comprises
In response to the service request received, judge whether service processes are in limitation shape according to local frequency limit mark
State;
When the judgment result is no, business corresponding to the service request is handled, the service request is requested
Access frequency be sent to access frequency control node;
Wherein, frequency limit mark include the access limitation message sent according to access frequency control node be provided that it is no
Carry out the mark of service processes limitation.
Fourth aspect provides a kind of access frequency control device of distributed system, and described device includes:
Access frequency receiving module, for receiving the requested access frequency of the transmission of the service node in distributed system
Rate;
First judgment module, for judging whether the requested access frequency is greater than the current of the distributed system
The access frequency upper limit;
Access limits message transmission module, when the result for judging when the first judgment module is is, to described point
Service node in cloth operation system sends access limitation message, so that the local frequency of service node setting limits mark.
5th aspect provides a kind of access frequency control device of distributed system, and described device includes:
Second judgment module, for the service request in response to receiving, according to local frequency limit mark judgement service into
Whether journey is in restriction state;
Access frequency sending module handles the business when result for judging when second judgment module is no
The corresponding business of request, is sent to access frequency control node for the requested access frequency of the service request;
Wherein, frequency limit mark include the access limitation message sent according to access frequency control node be provided that it is no
Carry out the mark of service processes limitation.
6th aspect provides a kind of access frequency control system of distributed system, the system comprises: access frequency
Control node and at least two service nodes;
Wherein, at least two service node is used for the service request in response to receiving, and limits mark according to local frequency
Knowledge judges whether service processes are in restriction state;And for when the judgment result is no, handling the service request institute
The requested access frequency of the service request is sent to access frequency control node by corresponding business;Wherein, the frequency limit
Mark includes that the access limitation message sent according to access frequency control node is provided that the no mark for carrying out service processes limitation
Know.
The access frequency control node is used to receive the requested access that the service node in distributed system is sent
Frequency;And for judging whether the requested access frequency is greater than the current accessed frequency of the distributed system
Limit;And for when the result judged is is, the service node into the distributed business system to send access limitation and disappears
Breath, so that the local frequency of service node setting limits mark.
7th aspect provides a kind of access frequency control server of distributed system, and the server includes processor
And memory, be stored at least one instruction, at least one section of program, code set or instruction set in the memory, it is described at least
One article of instruction, at least one section of program, the code set or the instruction set are loaded by the processor and are executed to realize such as the
The access frequency control method of distributed system described in two aspects.
Eighth aspect provides a kind of access frequency control server of distributed system, and the server includes processor
And memory, be stored at least one instruction, at least one section of program, code set or instruction set in the memory, it is described at least
One article of instruction, at least one section of program, the code set or the instruction set are loaded by the processor and are executed to realize such as the
The access frequency control method of distributed system described in three aspects.
Access frequency control method, device, system and the server of distributed system provided by the invention have following skill
Art effect:
The present invention can carry out the access frequency of entire distributed system in the access frequency control node of distributed system
Control, meanwhile, by way of setting frequency limit mark at service node in a distributed system, directly in service node local
Can realize whether be more than the system access frequency upper limit judgement.It realizes on the basis of not influencing business processing efficiency, has
Effect carries out the access frequency control of distributed system.
Detailed description of the invention
It in order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology and advantage, below will be to implementation
Example or attached drawing needed to be used in the description of the prior art are briefly described, it should be apparent that, the accompanying drawings in the following description is only
It is only some embodiments of the present invention, for those of ordinary skill in the art, without creative efforts,
It can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is a kind of schematic diagram of distributed system provided in an embodiment of the present invention;
Fig. 2 is a kind of flow diagram of the access frequency control method of distributed system provided in an embodiment of the present invention;
Fig. 3 is provided in an embodiment of the present invention the requested access frequency of the service request to be sent to access frequency control
A kind of flow diagram of node processed;
Fig. 4 is provided in an embodiment of the present invention the requested access frequency of the service request to be sent to access frequency control
Another flow diagram of node processed;
Fig. 5 is a kind of flow diagram of the access frequency control method of distributed system provided in an embodiment of the present invention;
Fig. 6 is a kind of flow diagram of the access frequency control method of distributed system provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of the access frequency control device of distributed system provided in an embodiment of the present invention;
Fig. 8 is the structural representation of the access frequency control device of another distributed system provided in an embodiment of the present invention
Figure;
Fig. 9 is a kind of composition block diagram of access frequency sending module provided in an embodiment of the present invention;
Figure 10 is another composition block diagram of access frequency sending module provided in an embodiment of the present invention;
Figure 11 is a kind of structural schematic diagram of server provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art without making creative work it is obtained it is all its
His embodiment, shall fall within the protection scope of the present invention.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, for example, containing the process, method of a series of steps or units, system, product or server need not limit
In step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produce
The other step or units of product or equipment inherently.
Referring to Fig. 1, Fig. 1 is a kind of schematic diagram of distributed system provided in an embodiment of the present invention, as shown in Figure 1, should
Distributed system includes at least access frequency control node 01, service node 02 and service node 03.
Specifically, the access frequency control node 01 can be used for controlling (the packet of service node in the distributed system
Include service node 01 and service node 02) access frequency.Specifically, the service node 01 and business in distributed system
Node 02 can be used for receiving and processing business request, and requested access frequency is sent to access frequency control node
01。
Specifically, the access frequency control node 01 can be according to the system performance and setting access frequency of distributed system
The rate upper limit is carried out multiple in distributed system based on the requested access frequency that the access frequency upper limit and service node report
The access frequency of service node controls, when the requested access frequencys of service node multiple in distributed system are greater than the distribution
When the access frequency upper limit of system, access frequency control node 01 can send access limitation message to the service node, accordingly
, which can limit the local frequency of message setting according to the access and limit mark, with out of service.
A kind of specific embodiment of the access frequency control method of distributed system of the present invention introduced below, Fig. 2 is this hair
A kind of flow diagram of the access frequency control method for distributed system that bright embodiment provides, present description provides strictly according to the facts
Apply method operating procedure described in example or flow chart, but based on conventional or without creative labor may include more or more
Few operating procedure.The step of enumerating in embodiment sequence is only one of numerous step execution sequences mode, is not represented
Uniquely execute sequence.It, can be according to embodiment or shown in the drawings when system in practice or server product execute
Method sequence executes or parallel execution (such as environment of parallel processor or multiple threads).It is specific as shown in Fig. 2,
The method may include:
S201: the service node in distributed system limits mark according to local frequency in response to the service request received
Judge whether service processes are in restriction state.
In this specification embodiment, after the service node in distributed system receives service request, this can be read
The frequency on ground limits mark, to judge whether service processes are in restriction state.Specifically, the frequency limit mark may include according to visit
The access limitation message for asking that frequency control node is sent is provided that the no mark for carrying out service processes limitation.
In a specific embodiment, the frequency can be limited into mark and is set as 0 or 1, wherein identified when the frequency limits
When being set as 1, it can indicate that the service processes of the service node are in restriction state, correspondingly, service processes are limited;Instead
It can indicate that the service processes of the service node are in unrestricted state when frequency limit mark is set as 0, correspondingly,
Service processes are not limited.
Specifically, the access limitation message that access frequency control node is sent may include the business section in distributed system
The requested access frequency of point is more than the prompt information of the access frequency upper limit of the distributed system, and according to distributed system
In requested access frequency and the service node time of service processes limitation for being arranged of the access frequency upper limit.For example, certain
The access frequency upper limit of one distributed system is 10000/ minute, and the requested access of service node in the distributed system
Frequency is 20000/ minute, correspondingly, the service processes of the service node confined time can be 1 point in the distributed system
Clock.0 or 1 embodiment is set as in conjunction with above-mentioned frequency limit mark, when service node receives the transmission of access frequency control node
When access limitation message, 1 can be set by frequency limit mark, correspondingly, after 1 minute, frequency limit mark can be reset
Knowledge is set as 0.
Specifically, that is, service node is judged according to local frequency limit mark when the result that step S201 judges is no
When service processes are in unrestricted state, step S203 can be executed.Conversely, in further embodiments, when step S201 sentences
Disconnected result is when being, i.e., can be with when service node judges that service processes are in restriction state according to local frequency limit mark
Execute step S213.
S203: the service node in distributed system handles business corresponding to the service request, and the business is asked
Requested access frequency is asked to be sent to access frequency control node.
It is described that the requested access frequency of the service request is sent to access frequency control in this specification embodiment
Node may include that the requested access frequency of the service request is directly sent to access frequency control node.
In further embodiments, the service node in distributed system can be every prefixed time interval to access frequency
Control node sends primary requested access frequency.Correspondingly, as shown in figure 3, described that the service request is requested
Access frequency is sent to access frequency control node
S301: the service node inquiry in distributed system be locally stored in the presence or absence of requested access frequency.
In this specification embodiment, requested access frequency may include each default in being locally stored of service node
The requested access frequency of the service request received in time interval.
Specifically, the prefixed time interval can be configured in conjunction with the performance of distributed system in practical application.One
As, the performance of distributed system is better, which can be set longer;Conversely, the performance of distributed system
Poorer, which can be set shorter.
Specifically, described be locally stored may include high-speed random access memory, it can also include non-volatile memories
Device, for example, at least a disk memory, flush memory device or other volatile solid-state parts.
S303: when the result of inquiry, which is, is, the service node in distributed system is requested by the service request
Access frequency is added with the requested access frequency inquired, and the access frequency after will add up is as requested access frequency
It stores and is locally stored.
S305: when reaching preset time, the service node in distributed system will be locally stored in requested access
Frequency is sent to the access frequency control node, empties requested access frequency in described be locally stored.
In this specification embodiment, the preset time can be in conjunction with the pre- of the transmission requested access frequency of service node
If time interval is configured, time that the preset time, that is, each prefixed time interval reaches.
In further embodiments, as shown in figure 4, the method can be with when the result of step S301 inquiry is no
Include:
S307: the service node in distributed system is using the requested access frequency of the service request as requested
Access frequency storage is to being locally stored.
S309: when reaching preset time, the service node in distributed system will be locally stored in requested access
Frequency is sent to the access frequency control node, empties requested access frequency in described be locally stored.
In addition, it is necessary to which explanation, after step S307, does not reach preset time, service node receives new
When service request, can by the new service request be locally stored in requested access frequency phase adduction storage be added after quilt
The access frequency of request.
S205: access frequency control node judges whether the requested access frequency is greater than the distributed system
Current accessed upper frequency limit.
Specifically, the current accessed upper frequency limit of the distributed system may include being determined using following manner:
Obtain the requested access frequency of permission in being locally stored;
Institute is calculated according to the access frequency upper limit of the requested access frequency of the permission and the distributed system
State current accessed upper frequency limit.
Specifically, the access frequency upper limit of the distributed system can be subtracted allows requested access frequency to obtain
The current accessed upper frequency limit.Specifically, described allow requested access frequency to may include access frequency control node
Be locally stored and middle be stored with have allowed for requested access frequency.Specifically, the access frequency of such as distributed system
The rate upper limit be 10000/ minute, be locally stored in the requested access frequency of permission be 3000/ minute;Correspondingly, described work as
The preceding access frequency upper limit can be 7000/ minute.
In this specification embodiment, when the result that step S205 judges is is, access frequency control node can be executed
Step S207;Conversely, in further embodiments, when the result that step S205 judges is no, step S211 can be executed.
In addition, the access frequency control node judges the requested access frequency in conjunction with the embodiment of Fig. 3 and Fig. 4
The current accessed upper frequency limit whether rate is greater than the distributed system may include that access frequency control node judges the quilt
Whether the access frequency of request is greater than the current accessed upper frequency limit of the distributed system.
S207: service node of the access frequency control node into the distributed system sends access limitation message.
Specifically, it may include that the requested access frequency of service node in distributed system is more than that access, which limits message,
The prompt information of the access frequency upper limit of the distributed system, and according to access frequency requested in distributed system and be somebody's turn to do
The time of the service processes limitation of the access frequency upper limit setting of service node.
S209: the service node in the distributed system limits mark according to the local frequency of the access limitation message setting
Know.
Specifically, may refer to above-mentioned relevant retouch here according to the local frequency limit mark of the access limitation message setting
It states, details are not described herein.
S211: access frequency control node is deposited the requested access frequency as the requested access frequency of permission
Storage is being locally stored.
Specifically, being locally stored for access frequency control node may include high-speed random access memory, can also wrap
Include nonvolatile memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
S213: the service node in the distributed system suspends the processing of business corresponding to the service request to root
Judge that service processes are in unrestricted state according to local frequency limit mark.
In this specification embodiment, judge that service processes are in the specific of unrestricted state according to local frequency limit mark
Step may refer to above-mentioned associated description, and details are not described herein.
In further embodiments, it is contemplated that since processing terminate for service request, will lead to allows requested access
Frequency can be expired, correspondingly, the method can also include:
Access frequency control node is deleted be locally stored in expired access frequency information, wherein the expired access
Frequency information includes the access frequency for allowing the requested time to reach expired time.
In practical applications, the requested access frequency of permission in being locally stored for access frequency control node is set
Expired time is set, specifically, the expired time can be configured in conjunction with practical application request, in general, the expired time
Greater than the time that distributed system has gone out a service request.Such as it is set as 1 hour.Correspondingly, once a certain permission is asked
The access frequency asked reaches expired time, and the requested access frequency of the permission is expired access frequency information.
In addition, it should be noted that, illustrate only access frequency in distributed system in this specification embodiment in Fig. 2
The interactive process of access frequency control in control node and distributed system between a service node, in practical applications,
It further include the friendship of the access frequency control in the distributed system between other service nodes and access frequency control node
Mutual process.
The technical solution provided by above this specification embodiment is as it can be seen that this specification embodiment passes through in distributed system
Service node report requested accessed node to access frequency control node, guarantee in access frequency control node
The access frequency control of entire distributed system is carried out, meanwhile, it is limited by the way that frequency is arranged at service node in a distributed system
The mode of mark, directly service node can locally realize whether be more than the system access frequency upper limit judgement.Utilize this
The technical solution that specification embodiment provides can effectively carry out distributed system on the basis of not influencing business processing efficiency
Access frequency control, realize shared, systematicness, the access frequency concentrated controls management.
It is executing subject below based on access frequency control node, a kind of distribution of this specification embodiment offer is provided
The access frequency control method of system, Fig. 5 are a kind of access frequency controlling parties of distributed system provided in an embodiment of the present invention
The flow diagram of method, present description provides the method operating procedures as described in embodiment or flow chart, but based on conventional or
Person may include more or less operating procedure without creative labor.The step of enumerating in embodiment sequence is only crowd
One of multi-step execution sequence mode does not represent and unique executes sequence.System or server product in practice is held
When row, can be executed according to embodiment or method shown in the drawings sequence or it is parallel execute (such as parallel processor or
The environment of multiple threads).It is specific as shown in figure 5, the method may include:
S501: the requested access frequency that the service node in distributed system is sent is received.
S503: judge whether the requested access frequency is greater than in the current accessed frequency of the distributed system
Limit.
Specifically, the current accessed upper frequency limit of the distributed system may include being determined using following manner:
Obtain the requested access frequency of permission in being locally stored;
Institute is calculated according to the access frequency upper limit of the requested access frequency of the permission and the distributed system
State current accessed upper frequency limit.
S505: when the result judged is is, the service node into the distributed business system sends access limitation
Message, so that the local frequency of service node setting limits mark.
In further embodiments, the method can also include:
When the judgment result is no, it is stored the requested access frequency as the requested access frequency of permission
It is being locally stored.
In further embodiments, the method can also include:
Delete access frequency information expired in being locally stored, wherein the expired access frequency information includes allowing
The requested time reaches expired time.
On the other hand this specification embodiment also provides a kind of access frequency control server of distributed system, the distribution
The access frequency control server of formula system includes processor and memory, and at least one instruction, extremely is stored in the memory
Few one section of program, code set or instruction set, at least one instruction, at least one section of program, the code set or the instruction set are by this
Processor loads and executes the access frequency control method to realize the distributed system as provided by above method embodiment.
It is executing subject below based on the service node in distributed system, one kind of this specification embodiment offer is provided
The access frequency control method of distributed system, Fig. 6 are a kind of access frequencys of distributed system provided in an embodiment of the present invention
The flow diagram of control method, present description provides the method operating procedures as described in embodiment or flow chart, but are based on
Routine may include more or less operating procedure without creative labor.The step of enumerating in embodiment sequence is only
Only one of numerous step execution sequence mode does not represent and unique executes sequence.System or server in practice
When product executes, can be executed according to embodiment or the execution of method shown in the drawings sequence or parallel (such as parallel processing
The environment of device or multiple threads).It is specific as shown in fig. 6, the method may include:
S601: in response to the service request received, judge whether service processes are in limit according to local frequency limit mark
State processed.
S603: when the judgment result is no, business corresponding to the service request is handled.
S605: the requested access frequency of the service request is sent to access frequency control node.
Wherein, frequency limit mark include the access limitation message sent according to access frequency control node be provided that it is no
Carry out the mark of service processes limitation.
On the other hand this specification embodiment also provides a kind of access frequency control server of distributed system, the distribution
The access frequency control server of formula system includes processor and memory, and at least one instruction, extremely is stored in the memory
Few one section of program, code set or instruction set, at least one instruction, at least one section of program, the code set or the instruction set are by this
Processor loads and executes the access frequency control method to realize the distributed system as provided by above method embodiment.
In this specification embodiment, the memory can be used for storing software program and module, and processor passes through operation
It is stored in the software program and module of memory, thereby executing various function application and data processing.Memory can be main
Including storing program area and storage data area, wherein storing program area can application program needed for storage program area, function
Deng;Storage data area, which can be stored, uses created data etc. according to the equipment.In addition, memory may include high speed with
Machine access memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or its
His volatile solid-state part.Correspondingly, memory can also include Memory Controller, to provide processor to memory
Access.
The embodiment of the invention also provides a kind of access frequency control devices of distributed system, as shown in fig. 7, the dress
It sets and includes:
Access frequency receiving module 710 can be used for receiving the requested of the service node transmission in distributed system
Access frequency;
First judgment module 720, can be used for judging whether the requested access frequency is greater than the distributed system
The current accessed upper frequency limit of system;
Access limitation message transmission module 730, can be used for when the result that the first judgment module judges is is, to
Service node in the distributed business system sends access limitation message, so as to the local frequency limit of service node setting
Mark.
In another embodiment, the current accessed upper frequency limit of the distributed system is determined using following units:
Access frequency acquiring unit, for obtaining the requested access frequency of the permission in being locally stored;
Access frequency upper limit computing unit, for according to the requested access frequency of the permission and the distributed system
The access frequency upper limit current accessed upper frequency limit is calculated.
In another embodiment, described device can also include:
Access frequency memory module will be described requested when the result for judging when the first judgment module is no
Access frequency be locally stored as allowing requested access frequency to be stored in.
In another embodiment, described device can also include:
Access frequency information deletion module, for delete be locally stored in expired access frequency information, wherein the mistake
The access frequency information of phase includes the access frequency for allowing the requested time to reach expired time.
Apparatus and method embodiment in the Installation practice is based on similarly inventive concept.
The embodiment of the invention also provides a kind of access frequency control devices of distributed system, as shown in figure 8, the dress
It sets and may include:
Second judgment module 810, can be used for the service request in response to receiving, according to local frequency limit mark judgement
Whether service processes are in restriction state;
Access frequency sending module 820 can be used for when the result that second judgment module judges is no, handle institute
Business corresponding to service request is stated, the requested access frequency of the service request is sent to access frequency control node;
Wherein, frequency limit mark include the access limitation message sent according to access frequency control node be provided that it is no
Carry out the mark of service processes limitation.
In another embodiment, as shown in figure 9, the access frequency sending module 820 may include:
Query unit 821, can be used for inquiring be locally stored in the presence or absence of requested access frequency;
First access frequency storage unit 822 can be used for when the result that the query unit is inquired, which is, is, will be described
The requested access frequency of service request is added with the requested access frequency inquired, the access frequency storage after will add up
To being locally stored;
First access frequency transmission unit 823 can be used for when reaching preset time, will be locally stored in it is requested
Access frequency is sent to the access frequency control node;
First access frequency empties unit 824, for emptying requested access frequency in described be locally stored;
Correspondingly, described be sent to access frequency control node including inciting somebody to action for the requested access frequency of the service request
The requested access frequency is sent to access frequency control node.
In another embodiment, as shown in Figure 10, the access frequency sending module 820 can also include:
Second access frequency storage unit 825 can be used for when the result that the query unit is inquired is no, will be described
The requested access frequency of service request is stored as requested access frequency to being locally stored;
Second access frequency transmission unit 826 can be used for when reaching preset time, will be locally stored in it is requested
Access frequency is sent to the access frequency control node;
Second access frequency empties unit 827, can be used for emptying requested access frequency in described be locally stored.
In another embodiment, described device can also include:
Business processing suspends module, can be used for when the result that second judgment module judges is is, described in pause
The processing of business corresponding to service request judges that service processes are in unrestricted state to according to local frequency limit mark.
Apparatus and method embodiment in the Installation practice is based on similarly inventive concept.
Embodiment of the method provided by the embodiment of the present invention can be in mobile terminal, terminal, server or class
As execute in arithmetic unit.For running on the server, Figure 11 is a kind of distributed system provided in an embodiment of the present invention
The hardware block diagram of the server of the access frequency control method of system.As shown in figure 11, the server 1100 can because configuration or
Performance is different and generates bigger difference, may include one or more central processing units (Central
Processing Units, CPU) 1110 (processor 1110 can include but is not limited to Micro-processor MCV or programmable logic device
The processing unit of part FPGA etc.), memory 1130 for storing data, one or more storage application programs 1123 or
The storage medium 1120 (such as one or more mass memory units) of data 1122.Wherein, memory 1130 and storage
Medium 1120 can be of short duration storage or persistent storage.Be stored in storage medium 1120 program may include one or one with
Upper module, each module may include to the series of instructions operation in server.Further, central processing unit 1110 can
To be set as communicating with storage medium 1120, the series of instructions operation in storage medium 1120 is executed on server 1100.
Server 1100 can also include one or more power supplys 1160, one or more wired or wireless network interfaces
1150, one or more input/output interfaces 1140, and/or, one or more operating systems 1121, such as
Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
Input/output interface 1140 can be used for that data are received or sent via a network.Above-mentioned network is specifically real
Example may include the wireless network that the communication providers of server 1100 provide.In an example, input/output interface 1140 wraps
A network adapter (Network Interface Controller, NIC) is included, base station and other network equipments can be passed through
It is connected so as to be communicated with internet.In an example, input/output interface 1140 can be radio frequency (Radio
Frequency, RF) module, it is used to wirelessly be communicated with internet.
It will appreciated by the skilled person that structure shown in Figure 11 is only to illustrate, above-mentioned electronics is not filled
The structure set causes to limit.For example, server 1100 may also include more perhaps less component or tool than shown in Figure 11
There is the configuration different from shown in Figure 11.
Another aspect of the present invention also provides a kind of access frequency control system of distributed system, and the system can wrap
It includes: access frequency control node and at least two service nodes;
Wherein, at least two service node can be used for the service request in response to receiving, according to local frequency
Limit mark judges whether service processes are in restriction state;And for when the judgment result is no, handling the business and asking
Corresponding business is sought, the requested access frequency of the service request is sent to access frequency control node;Wherein, described
Frequency limit mark includes that the access limitation message sent according to access frequency control node is provided that no progress service processes limitation
Mark.
The access frequency control node can be used for receiving the requested of the transmission of the service node in distributed system
Access frequency;And for judging whether the requested access frequency is greater than the current accessed frequency of the distributed system
The upper limit;And for when the result judged is is, the service node into the distributed business system to send access limitation
Message, so that the local frequency of service node setting limits mark.
The embodiments of the present invention also provide a kind of storage medium, the storage medium be may be disposed among server to protect
It deposits and is instructed, at least for realizing the access frequency control method relevant at least one of distributed system a kind of in embodiment of the method
One section of program, code set or instruction set, at least one instruction, at least one section of program, the code set or the instruction set are by this
The access frequency control method that reason device is loaded and executed to realize the distributed system of above method embodiment offer.
Optionally, in the present embodiment, above-mentioned storage medium can be located in multiple network servers of computer network
At least one network server.Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to: USB flash disk, only
Read memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), movement
The various media that can store program code such as hard disk, magnetic or disk.
By the reality of the access frequency control method of the distributed system of aforementioned present invention offer, device, server or system
Example is applied as it can be seen that reporting requested access to access frequency control node by the service node in distributed system in the present invention
Node, guarantee access frequency control node can be carried out entire distributed system access frequency control, meanwhile, by
The mode of setting frequency limit mark, directly locally can realize whether surpass in service node at service node in distributed system
Cross the judgement of the system access frequency upper limit.Business processing can be not being influenced using the technical solution that this specification embodiment provides
On the basis of efficiency, the access frequency control of distributed system is effectively carried out, realizes shared, systematicness, the access frequency concentrated
Control management.
It should be understood that embodiments of the present invention sequencing is for illustration only, do not represent the advantages or disadvantages of the embodiments.
And above-mentioned this specification specific embodiment is described.Other embodiments are within the scope of the appended claims.One
In a little situations, the movement recorded in detail in the claims or step can be executed according to the sequence being different from embodiment and
Still desired result may be implemented.In addition, process depicted in the drawing not necessarily requires the particular order shown or company
Continuous sequence is just able to achieve desired result.In some embodiments, multitasking and parallel processing it is also possible or
It may be advantageous.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device,
For system and server example, since it is substantially similar to the method embodiment, so being described relatively simple, related place
Illustrate referring to the part of embodiment of the method.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can store 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 in spirit of the invention and
Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (14)
1. a kind of access frequency control method of distributed system, which is characterized in that the described method includes:
Service node in distributed system in response to the service request that receives, according to local frequency limit mark judgement service into
Whether journey is in restriction state;
When the judgment result is no, the service node in distributed system handles business corresponding to the service request, will
The requested access frequency of service request is sent to access frequency control node;
Access frequency control node in distributed system judges whether the requested access frequency is greater than the distribution
The current accessed upper frequency limit of system;
When judging that the requested access frequency is greater than the current accessed upper frequency limit of the distributed system, access frequency
Service node of the rate control node into the distributed system sends access limitation message;
Service node in the distributed system limits mark according to the local frequency of the access limitation message setting.
2. a kind of access frequency control method of distributed system, which is characterized in that the described method includes:
Receive the requested access frequency that the service node in distributed system is sent;
Judge whether the requested access frequency is greater than the current accessed upper frequency limit of the distributed system;
When the result judged is is, the service node into the distributed business system sends access limitation message, so as to
The local frequency of the service node setting limits mark.
3. according to the method described in claim 2, it is characterized in that, the current accessed upper frequency limit of the distributed system includes
It is determined using following manner:
Obtain the requested access frequency of permission in being locally stored;
Described work as is calculated according to the access frequency upper limit of the requested access frequency of the permission and the distributed system
The preceding access frequency upper limit.
4. according to the method in claim 2 or 3, which is characterized in that the method also includes:
When the judgment result is no, this is stored in using the requested access frequency as the requested access frequency of permission
Ground storage.
5. according to the method in claim 2 or 3, which is characterized in that the method also includes:
Delete access frequency information expired in being locally stored, wherein the expired access frequency information includes allowing to be asked
The time asked reaches expired time.
6. a kind of access frequency control method of distributed system, which is characterized in that the described method includes:
In response to the service request received, judge whether service processes are in restriction state according to local frequency limit mark;
When the judgment result is no, business corresponding to the service request is handled, by the requested visit of the service request
Ask that frequency is sent to access frequency control node;
Wherein, the frequency limit mark includes that the access limitation message sent according to access frequency control node is provided that no progress
The mark of service processes limitation.
7. according to the method described in claim 6, it is characterized in that, described send out the requested access frequency of the service request
Giving access frequency control node includes:
Inquiry whether there is requested access frequency in being locally stored;
When the result of inquiry, which is, is, by the requested access frequency of the service request and the requested access inquired frequency
Rate is added, and the storage of access frequency after will add up is to being locally stored;
When reaching preset time, will be locally stored in requested access frequency be sent to the access frequency control node,
Empty requested access frequency in described be locally stored;
Correspondingly, it is described by the requested access frequency of the service request be sent to access frequency control node include will be described
Requested access frequency is sent to access frequency control node.
8. the method according to the description of claim 7 is characterized in that the method also includes:
When the result of inquiry is no, stored using the requested access frequency of the service request as requested access frequency
To being locally stored;
When reaching preset time, will be locally stored in requested access frequency be sent to the access frequency control node,
Empty requested access frequency in described be locally stored.
9. according to the method described in claim 6, it is characterized in that, the method also includes:
When the result judged is is, suspend the processing of business corresponding to the service request to according to local frequency limit mark
Judge that service processes are in unrestricted state.
10. a kind of access frequency control device of distributed system, which is characterized in that described device includes:
Access frequency receiving module, for receiving the requested access frequency of the transmission of the service node in distributed system;
First judgment module, for judging whether the requested access frequency is greater than the current accessed of the distributed system
Upper frequency limit;
Access limits message transmission module, when the result for judging when the first judgment module is is, to the distribution
Service node in operation system sends access limitation message, so that the local frequency of service node setting limits mark.
11. a kind of access frequency control device of distributed system, which is characterized in that described device includes:
Second judgment module judges that service processes are according to local frequency limit mark for the service request in response to receiving
It is no to be in restriction state;
Access frequency sending module handles the service request when result for judging when second judgment module is no
The requested access frequency of the service request is sent to access frequency control node by corresponding business;
Wherein, the frequency limit mark includes that the access limitation message sent according to access frequency control node is provided that no progress
The mark of service processes limitation.
12. a kind of access frequency control system of distributed system, which is characterized in that the system comprises: access frequency control
Node and at least two service nodes;
Wherein, at least two service node is used for the service request in response to receiving, and is sentenced according to local frequency limit mark
Whether disconnected service processes are in restriction state;And for when the judgment result is no, handling corresponding to the service request
Business, the requested access frequency of the service request is sent to access frequency control node;Wherein, the frequency limit mark
Access limitation message including being sent according to access frequency control node is provided that the no mark for carrying out service processes limitation;
The access frequency control node is used to receive the requested access frequency that the service node in distributed system is sent;
And for judging whether the requested access frequency is greater than the current accessed upper frequency limit of the distributed system;And
For when the result judged is is, the service node into the distributed business system sends access limitation message, so as to
The local frequency of the service node setting limits mark.
13. a kind of access frequency control server of distributed system, which is characterized in that the server includes processor and deposits
Reservoir, is stored at least one instruction, at least one section of program, code set or instruction set in the memory, and described at least one
Instruction, at least one section of program, the code set or the instruction set are loaded by the processor and are executed to realize as right is wanted
Seek the access frequency control method of 2 to 5 any distributed systems.
14. a kind of access frequency control server of distributed system, which is characterized in that the server includes processor and deposits
Reservoir, is stored at least one instruction, at least one section of program, code set or instruction set in the memory, and described at least one
Instruction, at least one section of program, the code set or the instruction set are loaded by the processor and are executed to realize as right is wanted
Seek the access frequency control method of 6 to 9 any distributed systems.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811124189.XA CN109298939B (en) | 2018-09-26 | 2018-09-26 | Access frequency control method, device and system of distributed system and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811124189.XA CN109298939B (en) | 2018-09-26 | 2018-09-26 | Access frequency control method, device and system of distributed system and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109298939A true CN109298939A (en) | 2019-02-01 |
CN109298939B CN109298939B (en) | 2021-04-20 |
Family
ID=65164124
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811124189.XA Active CN109298939B (en) | 2018-09-26 | 2018-09-26 | Access frequency control method, device and system of distributed system and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109298939B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110825791A (en) * | 2019-11-14 | 2020-02-21 | 北京京航计算通讯研究所 | Data access performance optimization system based on distributed system |
CN111770126A (en) * | 2019-06-28 | 2020-10-13 | 北京京东尚科信息技术有限公司 | Service request processing method, device and storage medium |
CN115242808A (en) * | 2022-07-13 | 2022-10-25 | 山东浪潮超高清智能科技有限公司 | Distributed system current limiting control system and method |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130232346A1 (en) * | 2012-03-05 | 2013-09-05 | Advanced Micro Devices, Inc. | Method and apparatus with stochastic control based power saving operation |
CN104219069A (en) * | 2013-05-30 | 2014-12-17 | 腾讯科技(深圳)有限公司 | Access frequency control method, device and control system |
CN107436835A (en) * | 2017-06-21 | 2017-12-05 | 北京小度信息科技有限公司 | Access control method and device |
CN107704765A (en) * | 2017-08-28 | 2018-02-16 | 深圳市诚壹科技有限公司 | A kind of interface access method, server and computer-readable recording medium |
CN107872491A (en) * | 2016-09-28 | 2018-04-03 | 腾讯科技(深圳)有限公司 | A kind of data processing method and device |
CN107979580A (en) * | 2016-10-24 | 2018-05-01 | 腾讯科技(深圳)有限公司 | A kind of access control method, device and server |
CN108494703A (en) * | 2018-03-08 | 2018-09-04 | 腾讯科技(深圳)有限公司 | A kind of access frequency control method, device and storage medium |
-
2018
- 2018-09-26 CN CN201811124189.XA patent/CN109298939B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130232346A1 (en) * | 2012-03-05 | 2013-09-05 | Advanced Micro Devices, Inc. | Method and apparatus with stochastic control based power saving operation |
CN104219069A (en) * | 2013-05-30 | 2014-12-17 | 腾讯科技(深圳)有限公司 | Access frequency control method, device and control system |
CN107872491A (en) * | 2016-09-28 | 2018-04-03 | 腾讯科技(深圳)有限公司 | A kind of data processing method and device |
CN107979580A (en) * | 2016-10-24 | 2018-05-01 | 腾讯科技(深圳)有限公司 | A kind of access control method, device and server |
CN107436835A (en) * | 2017-06-21 | 2017-12-05 | 北京小度信息科技有限公司 | Access control method and device |
CN107704765A (en) * | 2017-08-28 | 2018-02-16 | 深圳市诚壹科技有限公司 | A kind of interface access method, server and computer-readable recording medium |
CN108494703A (en) * | 2018-03-08 | 2018-09-04 | 腾讯科技(深圳)有限公司 | A kind of access frequency control method, device and storage medium |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111770126A (en) * | 2019-06-28 | 2020-10-13 | 北京京东尚科信息技术有限公司 | Service request processing method, device and storage medium |
CN111770126B (en) * | 2019-06-28 | 2023-08-04 | 北京京东尚科信息技术有限公司 | Service request processing method, device and storage medium |
CN110825791A (en) * | 2019-11-14 | 2020-02-21 | 北京京航计算通讯研究所 | Data access performance optimization system based on distributed system |
CN115242808A (en) * | 2022-07-13 | 2022-10-25 | 山东浪潮超高清智能科技有限公司 | Distributed system current limiting control system and method |
CN115242808B (en) * | 2022-07-13 | 2024-03-08 | 山东浪潮超高清智能科技有限公司 | Distributed system current limiting control system and method |
Also Published As
Publication number | Publication date |
---|---|
CN109298939B (en) | 2021-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109298939A (en) | Access frequency control method, device, system and the server of distributed system | |
JP6892729B2 (en) | Code execution request routing | |
US20080115190A1 (en) | Methods, network services, and computer program products for dynamically assigning users to firewall policy groups | |
CN108268318A (en) | A kind of method and apparatus of distributed system task distribution | |
EP3101494B1 (en) | Control apparatus and control system | |
JP6481415B2 (en) | Data storage management device and data storage management method | |
Kalyaev et al. | Adaptive multiagent organization of the distributed computations | |
GB2523568A (en) | Method for processing requests and server device processing requests | |
US20190308317A1 (en) | Information processing apparatus and information processing method | |
CN109254835A (en) | Processing method, device, server and the readable storage medium storing program for executing of batch processing task | |
CN106095843B (en) | Social account method for digging and device | |
CA2439007C (en) | Method and system for distributed processing management | |
CN104239125A (en) | Object processing method, distributive file system and client device | |
Younes et al. | New load balancing framework based on mobile AGENT and ant-colony optimization technique | |
CN115334010B (en) | Query information processing method and device, storage medium and electronic device | |
JP6064720B2 (en) | Electronic device and script generation device | |
CN108540503A (en) | A kind of data interactive method and relevant apparatus | |
CN107209492A (en) | Programmable logic controller (PLC) sets file generated servicing unit | |
Emfinger et al. | Analysis, verification, and management toolsuite for cyber-physical applications on time-varying networks | |
CN109991967A (en) | A kind of control method of robot motion, system and terminal device | |
CN109375987B (en) | Method and system for selecting physical machine by virtual machine | |
CN108520025B (en) | Service node determination method, device, equipment and medium | |
Ray et al. | Preference-Aware Computation Offloading for IoT in Multi-access Edge Computing Using Probabilistic Model Checking | |
Fisher et al. | Dynamic allocation of servers in a grid hosting environment | |
Smith et al. | Agent behavior and agent models in unregulated markets |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |