WO2015101000A1 - 报文流量控制方法及相关装置和计算节点 - Google Patents

报文流量控制方法及相关装置和计算节点 Download PDF

Info

Publication number
WO2015101000A1
WO2015101000A1 PCT/CN2014/081642 CN2014081642W WO2015101000A1 WO 2015101000 A1 WO2015101000 A1 WO 2015101000A1 CN 2014081642 W CN2014081642 W CN 2014081642W WO 2015101000 A1 WO2015101000 A1 WO 2015101000A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
flow control
host
control policy
negotiation
Prior art date
Application number
PCT/CN2014/081642
Other languages
English (en)
French (fr)
Inventor
王福海
何冠森
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to KR1020167020644A priority Critical patent/KR101875710B1/ko
Priority to EP14812400.1A priority patent/EP2905948B1/en
Priority to JP2016543577A priority patent/JP6336602B2/ja
Priority to US14/586,121 priority patent/US9921867B2/en
Publication of WO2015101000A1 publication Critical patent/WO2015101000A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/53Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a packet flow control method, a related device, and a computing node. Background technique
  • Virtualization technology is a decoupling technology that separates the underlying hardware devices from the upper operating system and applications.
  • the virtual machine monitor (VMM) layer is directly managed to manage the underlying hardware. Resources, create a virtual machine (English: virtual machine, abbreviated: VM) that is independent of the underlying hardware for use by upper operating systems and applications.
  • VM virtual machine monitor
  • Virtualization technology as one of the underlying important supporting technologies of the current popular cloud computing platform, can greatly improve the resource utilization efficiency of physical devices. Virtual machines have better isolation and encapsulation than traditional physical servers.
  • the host limits the bandwidth of the virtual machine in the outbound direction or access control based on other policies. For example, after the VM sends a packet, the host first copies the packet from the VM address space to the host address space. The host determines whether the packet exceeds the sending limit. If the packet exceeds the sending limit, the packet is directly discarded or cached first. Packets that exceed the cache limit are usually discarded directly.
  • the embodiment of the present invention provides a flow control method, a related device, and a computing node, so as to reduce the occupation of the host address space by the packet traffic in the outbound direction of the virtual machine.
  • the embodiment of the present invention provides the following technical solutions:
  • a first aspect of the embodiments of the present invention provides a packet flow control method, which may include: The virtual machine-based flow control capability negotiates an execution party of the flow control policy between the virtual machine and the host Host;
  • the virtual machine performs forwarding processing on the packet to be forwarded based on the flow control policy
  • the virtual machine sends the packet to be forwarded to the host, so that the host receives the received message based on the traffic control policy.
  • the message is forwarded.
  • the executing the flow control policy based on the flow control capability of the virtual machine between the virtual machine and the host host includes:
  • the virtual machine sends an executor negotiation request to the host that carries the description information of the flow control capability of the virtual machine;
  • the virtual machine determines the executed flow control policy execution.
  • the party is the virtual machine
  • the virtual machine determines the negotiated traffic control policy.
  • the executive is the host;
  • the executing the flow control policy based on the flow control capability of the virtual machine between the virtual machine and the host host includes:
  • the virtual machine sends, to the Host, an executive negotiation request that carries the description information of the traffic control capability of the virtual machine, where the description information of the traffic control capability is used to describe a version of the traffic control policy supported by the virtual machine.
  • the virtual machine receives the negotiation confirmation indication sent by the host after determining, according to the description information of the flow control capability, that the virtual machine supports executing the current latest version or the preset version of the flow control policy, the virtual machine Determining that the negotiated flow control policy executor is the virtual machine;
  • the virtual machine receives the Host, it is determined according to the description information of the flow control capability.
  • the virtual machine does not support the negotiation denial indication sent after the current latest version or the preset version of the traffic control policy, and the virtual machine determines that the negotiated flow control policy executor is the Host;
  • the executing the flow control policy based on the flow control capability of the virtual machine between the virtual machine and the host host includes:
  • the virtual machine sends an executor negotiation request to the host that carries the description information of the flow control capability of the virtual machine;
  • the virtual machine determines the executed flow control policy execution.
  • the party is the virtual machine
  • the virtual machine determines that the negotiated flow control policy executor is Host
  • the executing the flow control policy based on the flow control capability of the virtual machine between the virtual machine and the host host includes:
  • the virtual machine sends, to the Host, an executive negotiation request that carries the description information of the traffic control capability of the virtual machine, where the description information of the traffic control capability is used to describe a version of the traffic control policy supported by the virtual machine.
  • the virtual machine receives the negotiation confirmation indication sent by the host after determining, according to the description information of the flow control capability, that the virtual machine supports executing the current latest version or the preset version of the flow control policy, the virtual machine Determining that the negotiated flow control policy executor is the virtual machine;
  • the virtual machine determines that the negotiated flow control policy executor is Host
  • the flow control capability based on the virtual machine is between the virtual machine and the host Host
  • the executor of the business flow control strategy including:
  • the virtual machine sends an executor negotiation request to the host that carries the description information of the flow control capability of the virtual machine;
  • the virtual machine determines the negotiated traffic control policy.
  • the executive is the host;
  • the virtual machine determines that the negotiated flow control policy executor is the virtual machine
  • the executing the flow control policy based on the flow control capability of the virtual machine between the virtual machine and the host host includes:
  • the virtual machine sends, to the Host, an executive negotiation request that carries the description information of the traffic control capability of the virtual machine, where the description information of the traffic control capability is used to describe a version of the traffic control policy supported by the virtual machine.
  • the virtual machine receives the negotiation denial indication sent by the host after determining, according to the description information of the traffic control capability, that the virtual machine supports executing the current latest version or the preset version of the traffic control policy, the virtual machine Determining that the negotiated flow control policy executor is the Host; if the virtual machine does not receive the negotiation denial indication sent by the Host for responding to the executor negotiation request within the second set duration, the virtual machine The virtual machine determines that the negotiated flow control policy executor is the virtual machine.
  • the negotiation confirmation indication includes the flow control policy
  • the virtual machine performs forwarding processing on the packet to be forwarded based on the traffic control policy included in the negotiation confirmation indication.
  • the virtual machine sends a The executor negotiation request for the description of the flow control capability includes:
  • the virtual machine After receiving the negotiation initiation request initiated by the user state process, the virtual machine sends an execution party negotiation request carrying the description information of the flow control capability of the virtual machine to the host; or the virtual machine receives the negotiation start from the host. After the request, an executor negotiation request carrying the description information of the flow control capability of the virtual machine is sent to the foregoing Host.
  • the execution of the flow control policy between the virtual machine and the host host based on the flow control capability of the virtual machine includes: a preloaded client deployed in the virtual machine and a preload deployed in the host After the connection between the server ends is established, the preloading client negotiates a traffic control policy between the virtual machine and the host based on the established connection and the preloading server based on the flow control capability of the virtual machine. Executive party.
  • the method further includes:
  • the preloading client After determining that the negotiated flow control policy executor is the virtual machine, the preloading client periodically sends a heartbeat message to the preloaded server based on the connection.
  • the traffic control policy is a quality of service based traffic control policy and/or an access control list based traffic control policy.
  • a second aspect of the embodiments of the present invention provides a packet flow control method, which may include:
  • the virtual machine based flow control capability negotiates an execution party of the flow control policy between the virtual machine and the host host;
  • the Host forwards the received packet based on the traffic control policy after receiving the packet from the virtual machine. .
  • the host host and the virtual machine negotiate a flow control policy between the virtual machine and the host based on the flow control capability of the virtual machine.
  • Executive including:
  • Executing a flow control policy executor between the virtual machine and the host Host based on the flow control capability of the virtual machine including:
  • the Host receives an executor negotiation request sent by the virtual machine that carries description information of the flow control capability of the virtual machine;
  • the host determines, according to the description information of the traffic control capability, that the virtual machine supports performing a traffic control policy, sending a negotiation confirmation indication to the virtual machine, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy is executed.
  • the party is the virtual machine;
  • the host determines that the virtual machine does not support the execution of the traffic control policy according to the description of the traffic control capability, the host sends a negotiation denial indication to the virtual machine, where the negotiation denial indication is used to indicate the negotiated traffic control policy.
  • the executive is the host;
  • Executing a flow control policy executor between the virtual machine and the host Host based on the flow control capability of the virtual machine including:
  • the host receives the executor negotiation request that is sent by the virtual machine and carries the description information of the flow control capability of the virtual machine, where the description information of the flow control capability is used to describe the version of the flow control policy supported by the virtual machine. ;
  • the host determines, according to the description information of the flow control capability, that the virtual machine supports the flow control policy of the current latest version or the preset version, sending a negotiation confirmation indication to the virtual machine, where the negotiation confirmation indication is Used to indicate that the negotiated flow control policy executor is the virtual machine;
  • the host determines, according to the description information of the flow control capability, that the virtual machine does not support the flow control policy of the current latest version or the preset version, sending a negotiation denial indication to the virtual machine, where the negotiation denies
  • the indication is used to indicate that the negotiated flow control policy executor is the Host.
  • the virtual machine based traffic control capability is negotiated between the virtual machine and the host Host
  • the executor of the flow control policy includes: after the connection between the preloaded server in the host and the preloaded client in the virtual machine is established, the preloaded server passes the connection with the preloaded guest
  • the client negotiates a performer of the flow control policy between the virtual machine and the host Host based on the flow control capability of the virtual machine.
  • the method further includes:
  • the Host After determining that the executor of the negotiated flow control policy is the virtual machine, if the heartbeat message from the virtual machine is not received within the set duration, the Host sends the virtual machine to indicate the traffic. The executor of the control policy switches to the indication message of the Host.
  • the traffic control policy is a quality of service based traffic control policy and/or an access control list based traffic control policy.
  • a third aspect of the present invention provides a packet flow control method, which may include:
  • the processor negotiates the execution of the flow control policy between the host Host and the virtual machine based on the flow control capability of the virtual machine;
  • the executed flow control policy executor is the virtual machine
  • the executor of the flow control policy negotiated by the processor based on the flow is the Host
  • the processor treats the virtual machine
  • the packet processed by the forwarding is sent to the host from the virtual machine.
  • the processor performs forwarding processing on the packet to be forwarded, which is received by the host, according to the traffic control policy.
  • the executing, by the processor, the execution of the traffic control policy between the host Host and the virtual machine, based on the flow control capability of the virtual machine includes: the processor sending the virtual machine to the host to be sent to the host The executor negotiation request, where the executor negotiation request carries description information of the flow control capability of the virtual machine;
  • the processor After the host receives the executor negotiation request, if the processor determines, according to the description information of the flow control capability, that the virtual machine supports executing a flow control policy, the processor sends the virtual machine to the virtual machine. a negotiation confirmation indication that the host is to be sent to the virtual machine, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or, the processor is Descriptive information of the flow control capability determines that the virtual machine does not support execution flow The quantity control policy, the processor sends a negotiation denial indication sent by the host to the virtual machine to the virtual machine, where the negotiation denial indication is used to indicate that the negotiated flow control policy executor is the host ;
  • the executing, by the processor, the execution of the traffic control policy between the host Host and the virtual machine, based on the flow control capability of the virtual machine includes: the processor sending the virtual machine to the host to be sent to the host
  • the executor negotiation request, the executor negotiation request carries the description information of the flow control capability of the virtual machine, where the description information of the flow control capability is used to describe a version of the flow control policy supported by the virtual machine;
  • the processor determines, according to the description information of the traffic control capability, that the virtual machine supports the current latest version or the preset version of the traffic control policy, Sending, by the processor, the negotiation confirmation indication sent by the host to the virtual machine, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or If the processor determines that the virtual machine does not support the current latest version or the preset version of the flow control policy according to the description of the flow control capability, the processor sends the Host to the virtual machine to the virtual machine.
  • the negotiation confirmation indication includes the flow control policy
  • the forwarding process of the packet to be forwarded by the virtual machine based on the flow control policy includes: reporting, by the flow control policy included in the negotiation confirmation indication, the virtual machine to be forwarded The text is forwarded.
  • the executed execution of the flow control policy is After the virtual machine does not receive the heartbeat message from the virtual machine within the set duration, the processor sends the host to the virtual machine to be sent to the virtual machine, The indication message indicating that the executor of the flow control policy switches to the Host.
  • the traffic control policy is a quality of service based traffic control policy and/or a traffic control policy based on an access control list.
  • the sending, by the host, the execution party negotiation request that is sent by the virtual machine to the host includes:
  • the virtual machine After receiving the negotiation initiation request initiated by the user state process, the virtual machine sends an execution party negotiation request sent by the virtual machine to the host to the host; or, the virtual machine receives the negotiation start from the host. After the request, the host sends an executive negotiation request to be sent to the host by the virtual machine.
  • the flow control policy is negotiated between the host host and the virtual machine based on the flow control capability of the virtual machine
  • the executor includes: after the connection between the pre-loaded client deployed in the virtual machine and the pre-loaded server deployed in the host is completed, the virtual machine-based flow control capability is established through the established connection.
  • the execution of the traffic control policy is negotiated between the host Host and the virtual machine.
  • a fourth aspect of the present invention provides a packet flow control method, which may include:
  • the processor negotiates the execution of the flow control policy between the host Host and the virtual machine based on the flow control capability of the virtual machine;
  • the processor treats the virtual machine
  • the packet processed by the forwarding is sent to the host; the processor performs forwarding processing on the packet to be forwarded, which is received by the host, based on the traffic control policy.
  • the processor is based on a flow control capability of the virtual machine between the host Host and the virtual machine Executing the executor of the flow control policy includes: the processor sending, to the Host, an executor negotiation request that is sent by the virtual machine to the host, where the executor negotiation request carries a description of the flow control capability of the virtual machine information;
  • the processor After the host receives the executor negotiation request, if the processor determines, according to the description information of the flow control capability, that the virtual machine supports executing a flow control policy, the processor sends the virtual machine to the virtual machine. a negotiation confirmation indication that the host is to be sent to the virtual machine, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or, the processor is Descriptive information of the flow control capability, determining that the virtual machine does not support the execution of the flow control policy, the processor sending, to the virtual machine, a negotiation denial indication sent by the host to the virtual machine, where The negotiation denial indication is used to indicate that the negotiated flow control policy executor is the Host;
  • the executing, by the processor, the execution of the traffic control policy between the host Host and the virtual machine, based on the flow control capability of the virtual machine includes: the processor sending the virtual machine to the host to be sent to the host
  • the executor negotiation request, the executor negotiation request carries the description information of the flow control capability of the virtual machine, where the description information of the flow control capability is used to describe a version of the flow control policy supported by the virtual machine;
  • the processor determines, according to the description information of the traffic control capability, that the virtual machine supports the current latest version or the preset version of the traffic control policy, Sending, by the processor, the negotiation confirmation indication sent by the host to the virtual machine, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or If the processor determines that the virtual machine does not support the current latest version or the preset version of the flow control policy according to the description of the flow control capability, the processor sends the Host to the virtual machine to the virtual machine.
  • the negotiation confirmation indication includes the flow control policy
  • the process of forwarding, by the processor, the packet to be forwarded by the virtual machine based on the flow control policy includes: the processor is configured to perform the flow control included in the negotiation confirmation indication The policy forwards the packet processed by the virtual machine to be forwarded.
  • the method further includes: After the executor of the control policy is the virtual machine, if the host does not receive a heartbeat message from the virtual machine within a set duration, the processor sends the host to the virtual machine to the The indication message sent by the virtual machine to indicate that the executor of the flow control policy switches to the Host.
  • the traffic control policy is a quality of service based traffic control policy and/or a traffic control policy based on an access control list.
  • the sending, by the processor, the executive negotiation request sent by the virtual machine to the host to the host includes:
  • the processor After the virtual machine receives the negotiation start request initiated by the user state process, the processor sends an execution party negotiation request sent by the virtual machine to the host to the host; or, the virtual machine receives the After the negotiation of the Host initiates the request, the processor sends an Execution Negotiation Request sent by the virtual machine to the Host to the Host.
  • the virtual machine-based flow control capability negotiates flow control between the host host and the virtual machine
  • the executor of the policy includes: after the connection between the pre-loaded client deployed in the virtual machine and the pre-loaded server deployed in the host is completed, the processor establishes the connection, based on the virtual machine
  • the flow control capability negotiates the execution of the flow control policy between the host Host and the virtual machine.
  • a fifth aspect of the present invention provides a virtual machine, which may include:
  • a first negotiating unit configured to be based on the flow control capability of the virtual machine in the virtual machine and the host Negotiating the execution of the flow control policy between the hosts;
  • a packet processing unit configured to: if the executor of the negotiated flow control policy is the virtual machine, forward the packet to be forwarded based on the flow control policy; and determine the negotiated flow control policy
  • the querier is the host, and the packet to be forwarded is sent to the host, so that the host performs forwarding processing on the received packet based on the traffic control policy.
  • the first negotiating unit is configured to send, to the Host, an executive negotiation request that carries the description information of the flow control capability of the virtual machine, and if the host receives the description information according to the flow control capability, The virtual machine supports the negotiation confirmation indication sent after the flow control policy is executed, and determines that the negotiated flow control policy executor is the virtual machine; if the host receives the description information according to the flow control capability, the virtual The machine does not support the negotiation denial indication sent after the execution of the flow control policy, and determines that the negotiated flow control policy executor is the Host;
  • the first negotiation unit is configured to send, to the Host, an executive negotiation request that carries the description information of the flow control capability of the virtual machine, where the description information of the flow control capability is used to describe the virtual machine support.
  • a version of the executed flow control policy if the host receives the negotiation confirmation indication sent after the virtual machine supports executing the current latest version or the preset version of the flow control policy according to the description information of the flow control capability, Determining that the negotiated flow control policy executor is the virtual machine; if the host receives the description information according to the flow control capability, determining that the virtual machine does not support performing the current latest version or the preset version of the flow control policy After the negotiation denial indication sent, it is determined that the negotiated flow control policy executor is the Host;
  • the first negotiating unit is configured to send, to the Host, an executive negotiation request that carries the description information of the flow control capability of the virtual machine, and if the host receives the description information according to the flow control capability,
  • the virtual machine supports the negotiation confirmation indication sent after the execution of the flow control policy, and determines that the negotiated flow control policy executor is the virtual machine; if the host sends the response for the response within the first set duration Determining the negotiation confirmation indication of the executor negotiation request, determining that the negotiated flow control policy executor is the Host; or,
  • the first negotiation unit is configured to send, to the Host, an executive negotiation request that carries the description information of the flow control capability of the virtual machine, where the description information of the flow control capability is used to describe the virtual machine support.
  • a version of the executed flow control policy if the host receives the negotiation confirmation indication sent after the virtual machine supports executing the current latest version or the preset version of the flow control policy according to the description information of the flow control capability, Determining that the negotiated flow control policy executor is the virtual machine; if the negotiation confirmation indication sent by the host for responding to the executor negotiation request is not received within the first set duration, determining to negotiate The flow control policy executor is the Host;
  • the first negotiating unit is configured to send, to the Host, an executive negotiation request that carries the description information of the flow control capability of the virtual machine, and if the host receives the description information according to the flow control capability, The virtual machine does not support the negotiation denial indication sent after the execution of the traffic control policy, and determines that the negotiated flow control policy executor is the Host; if the host sends the response for the response within the second set duration Determining the negotiation denial indication of the executor negotiation request, determining that the negotiated flow control policy executor is the virtual machine;
  • the first negotiation unit is configured to send, to the Host, an executive negotiation request that carries the description information of the flow control capability of the virtual machine, where the description information of the flow control capability is used to describe the virtual machine support.
  • a version of the executed flow control policy if the host receives the negotiation denial indication sent after the virtual machine supports executing the current latest version or the preset version of the flow control policy according to the description information of the flow control capability, Determining that the negotiated flow control policy executor is the Host; if the negotiation denied indication sent by the Host for responding to the executor negotiation request is not received within the second set duration, determining the negotiated The flow control policy executor is the virtual machine.
  • the virtual machine further includes:
  • the sending unit is configured to periodically send a heartbeat message to the host after determining that the executor of the negotiated flow control policy is the virtual machine.
  • the traffic control policy is a quality of service based traffic control policy and/or a traffic control policy based on an access control list.
  • a fourth possible implementation Sending, to the Host, the executor negotiation request that carries the description information of the flow control capability of the virtual machine, where the negotiation unit is configured to: after receiving the negotiation initiation request initiated by the user state process, send the carrying An executor negotiation request for describing the flow control capability of the virtual machine; or, after receiving the negotiation initiation request from the host, sending an execution party negotiation request carrying the description information of the flow control capability of the virtual machine to the host .
  • a sixth aspect of the present invention provides a host machine, including:
  • a second negotiating unit configured to negotiate an execution party of the flow control policy between the virtual machine and the host based on a flow control capability of the virtual machine
  • a message processing unit configured to: if it is determined that the executed party of the negotiated flow control policy is the host, after receiving the message from the virtual machine, the received report is received based on the flow control policy The text is forwarded.
  • the second negotiating unit is configured to: receive an executive negotiation request that is sent by the virtual machine and carry the description information of the flow control capability of the virtual machine, and determine, according to the description information of the flow control capability, that the virtual machine supports execution And the flow control policy sends a negotiation confirmation indication to the virtual machine, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and if the description is performed according to the description information of the flow control capability The virtual machine does not support the execution of the traffic control policy, and sends a negotiation denial indication to the virtual machine, where the negotiation denial indication is used to indicate that the negotiated flow control policy executor is the host;
  • the second negotiating unit is configured to receive, by the virtual machine, an executive negotiation request that carries the description information of the flow control capability of the virtual machine, where the description information of the flow control capability is used to describe the The version of the flow control policy supported by the virtual machine, if it is controlled according to the flow
  • the description of the capability determines that the virtual machine supports the flow control policy of the current latest version or the preset version, and sends a negotiation confirmation indication to the virtual machine, where the negotiation confirmation indication is used to indicate the negotiated flow control policy.
  • the executor is the virtual machine; if it is determined that the virtual machine does not support the current latest version or the preset version of the flow control policy according to the description information of the flow control capability, the negotiation denial indication is sent to the virtual machine, where The negotiation denial indication is used to indicate that the negotiated flow control policy executor is the host.
  • the packet processing unit is further configured to: determine, in the execution of the negotiated flow control policy, After the virtual machine is not received, if the heartbeat message from the virtual machine is not received within the set time period, an indication message indicating that the flow control policy executor switches to the Host is sent to the virtual machine.
  • the traffic control policy is a quality of service based traffic control policy and/or a traffic control policy based on an access control list.
  • a seventh aspect of the present invention provides a computing node, which may include: a hardware layer, a host Host running on the hardware layer, and at least one virtual machine running on the Host,
  • the virtual machine is configured to negotiate, according to the flow control capability of the virtual machine, an execution party of the traffic control policy between the virtual machine and the host; if it is determined that the negotiated flow control policy executor is the virtual machine Transmitting, according to the flow control policy, the packet to be forwarded and processed; if the executor of the negotiated flow control policy is the host, sending the packet to be forwarded to the host;
  • the Host is configured to: after determining that the negotiated flow control policy executor is the Host, after receiving the packet from the virtual machine, forwarding the received packet according to the traffic control policy. deal with.
  • the virtual machine is specifically configured to send, by the host, the flow control that carries the virtual machine, in the aspect that the flow control function of the virtual machine is used to negotiate the execution of the flow control policy between the virtual machine and the host.
  • An executor negotiation request of the capability description information if the host receives the description according to the flow control capability, determining that the virtual machine supports executing a flow control policy, and then sending And confirming the negotiation confirmation indication, determining that the negotiated flow control policy executor is the virtual machine; and if the host receives the description according to the flow control capability, determining that the virtual machine does not support performing a flow control policy, and then sending Negotiating the denial indication, determining that the negotiated flow control policy executor is the Host;
  • the virtual machine is specifically configured to send, by the host, the flow control that carries the virtual machine, in the aspect that the flow control function of the virtual machine is used to negotiate the execution of the flow control policy between the virtual machine and the host.
  • the executor negotiation request of the capability description information where the description information of the flow control capability is used to describe a version of the traffic control policy supported by the virtual machine, and if the host is received according to the traffic control capability
  • the description information determines that the virtual machine supports the negotiation confirmation indication sent after executing the current latest version or the preset version of the flow control policy, and determines that the negotiated flow control policy executor is the virtual machine; if the host is received Determining, according to the description information of the flow control capability, that the virtual machine does not support the negotiation of the current latest version or the default version of the flow control policy, determining that the negotiated flow control policy executor is the host ;
  • the virtual machine is specifically configured to send, by the host, the flow control that carries the virtual machine, in the aspect that the flow control function of the virtual machine is used to negotiate the execution of the flow control policy between the virtual machine and the host.
  • the executor negotiation request of the capability description information if the host receives the negotiation confirmation indication sent after the virtual machine supports executing the flow control policy according to the description information of the flow control capability, determining the negotiated flow control
  • the policy executor is the virtual machine; if the negotiation acknowledgment indication sent by the host for responding to the executor negotiation request is not received within the first set duration, determining that the negotiated flow control policy executor is The Host;
  • the virtual machine is specifically configured to send, by the host, the flow control that carries the virtual machine, in the aspect that the flow control function of the virtual machine is used to negotiate the execution of the flow control policy between the virtual machine and the host.
  • the executor negotiation request of the capability description information where the description information of the flow control capability is used to describe a version of the traffic control policy supported by the virtual machine, and if the host is received according to the traffic control capability Descriptive information determines that the virtual machine supports execution of the current most
  • the negotiation confirmation indication sent after the new version or the preset version of the flow control policy determines that the negotiated flow control policy executor is the virtual machine; if the host is not received within the first set duration Determining, by the acknowledgment, the negotiated confirmation indication of the executor negotiation request, determining that the negotiated flow control policy executor is the Host;
  • the virtual machine is specifically configured to send, by the host, the flow control that carries the virtual machine, in the aspect that the flow control function of the virtual machine is used to negotiate the execution of the flow control policy between the virtual machine and the host.
  • the executor negotiation request of the capability description information if the host receives the negotiation denial indication sent after the virtual machine does not support the execution of the traffic control policy according to the description information of the traffic control capability, determining the negotiated traffic
  • the control policy executor is the Host; if the negotiation denied indication sent by the Host for responding to the executor negotiation request is not received within the second set duration, it is determined that the negotiated flow control policy executor is The virtual machine;
  • the virtual machine is specifically configured to send, by the host, the flow control that carries the virtual machine, in the aspect that the flow control function of the virtual machine is used to negotiate the execution of the flow control policy between the virtual machine and the host.
  • the executor negotiation request of the capability description information where the description information of the flow control capability is used to describe a version of the traffic control policy supported by the virtual machine, and if the host is received according to the traffic control capability
  • the description information determines that the virtual machine supports the negotiation denial indication sent after executing the current latest version or the preset version of the flow control policy, and determines that the negotiated flow control policy executor is the Host; If the negotiation denied indication sent by the Host for responding to the executor negotiation request is not received, it is determined that the negotiated flow control policy executor is the virtual machine.
  • the Host is further configured to: after determining that the executed party of the negotiated flow control policy is the virtual machine, if the heartbeat message from the virtual machine is not received within the set duration, send the message to the virtual machine.
  • An eighth aspect of the present invention provides a computing node, including:
  • the processor is configured to: negotiate, according to the flow control capability of the virtual machine, the execution party of the flow control policy between the host Host and the virtual machine; if the negotiated flow control policy performer is the virtual machine Transmitting, according to the traffic control policy, the packet to be forwarded and processed by the virtual machine; if the executor of the negotiated traffic control policy is the host, the packet to be forwarded by the virtual machine is forwarded The packet is sent to the host from the virtual machine, and the packet to be forwarded processed by the host is forwarded according to the traffic control policy.
  • the processor is configured to send, to the Host, an executive negotiation request that is sent by the virtual machine to the host, where the performer negotiation request carries description information of the flow control capability of the virtual machine; After the executor negotiation request, if the virtual machine supports the execution of the flow control policy according to the description information of the flow control capability, the negotiation confirmation indication sent by the host to the virtual machine is sent to the virtual machine.
  • the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or, if the description of the flow control capability is determined, the virtual machine does not support the execution of the flow control policy.
  • the processor is configured to send, to the Host, an executive negotiation request that is sent by the virtual machine to the host, where the performer negotiation request carries description information of the flow control capability of the virtual machine, where the flow control capability is The description information is used to describe a version of the flow control policy that the virtual machine supports to perform; after the host receives the execution party negotiation request, if the description information of the flow control capability is determined, the virtual machine support is determined. And executing a current control policy of the latest version or the preset version, and sending, to the virtual machine, a negotiation confirmation indication that is sent by the host to the virtual machine, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy is executed.
  • the virtual machine is the virtual machine; and/or if the virtual machine does not support performing the current latest version or the preset version of the flow control policy according to the description information of the flow control capability, sending the host to the virtual machine a negotiation denial indication to be sent to the virtual machine, where the negotiation denial indication is used to indicate a protocol
  • the traffic control policy executor of the quotient is the Host.
  • the negotiation confirmation indication includes the flow control policy
  • the processor is configured to perform forwarding processing on the packet to be forwarded by the virtual machine based on the traffic control policy included in the negotiation confirmation indication.
  • the processor is further used to After the executor of the negotiated flow control policy is the virtual machine, if the host does not receive a heartbeat message from the virtual machine within a set duration, the host sends the host to the virtual machine. The indication message sent by the virtual machine to indicate that the executor of the flow control policy switches to the host.
  • the execution of the traffic control policy is negotiated between the virtual machine and the host based on the traffic control capability of the virtual machine; In the virtual machine, the virtual machine forwards the packet to be forwarded based on the traffic control policy; if the executor of the negotiated traffic control policy is the host, the virtual machine sends the packet to be forwarded.
  • the foregoing Host is configured to forward the received packet to the host according to the foregoing traffic control policy.
  • the flow control of the packet flow is beneficial to reduce invalid processing and reduce the occupation of bandwidth and host address space by invalid packet traffic. It can be seen that the above solution is beneficial for reducing the occupation of the host address space by the packet traffic in the outbound direction of the virtual machine. Moreover, since the flow control strategy executor is determined through negotiation, the execution ability of the flow control policy executor is guaranteed to a certain extent, thereby improving the reliability of the flow control strategy execution.
  • FIG. 1 is a schematic diagram of a virtualization architecture provided by an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of another virtualization architecture provided by an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a packet flow control method according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart of another packet forwarding control method according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart of another packet forwarding control method according to an embodiment of the present invention
  • It is a schematic flowchart of another packet forwarding control method provided by the embodiment of the present invention
  • FIG. 5-b is a schematic structural diagram of a computing node according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of an effect of packet flow control according to an embodiment of the present invention.
  • FIG. 6 is a schematic flowchart of another packet forwarding control method according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of another packet flow control effect according to an embodiment of the present invention
  • FIG. 8 is a schematic flowchart of another packet forwarding control method according to an embodiment of the present invention
  • FIG. 9 is a schematic diagram of a packet forwarding control method according to an embodiment of the present invention. Schematic diagram of the structure;
  • FIG. 10 is a schematic structural diagram of a host machine according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a computing node according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of another computing node according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of another computing node according to an embodiment of the present invention.
  • the embodiment of the present invention provides a flow control method, a related device, and a computing node, so as to reduce the occupation of the host address space by the packet traffic in the outbound direction of the virtual machine.
  • Virtual machine VM
  • Virtual machine software can simulate one or more virtual computers on a single physical computer. These virtual machines work like real computers.
  • the virtual machine can be installed with operating systems and applications.
  • the virtual machine can also be used. Access network resources.
  • the virtual machine is like working on a real computer.
  • Hardware layer :
  • the hardware layer may include a variety of hardware.
  • the hardware layer of a computing node may include a CPU and a memory, and may also include a high speed/low speed input/output of a network card, a memory, etc.
  • I/O input/output, abbreviation: I/O
  • IOMMU Input/Output Memory Management Unit
  • Host may be a virtual machine monitor (VMM); in this case, sometimes VMM and a privileged virtual machine cooperate, and the two combine to form a Host.
  • VMM virtual machine monitor
  • the virtual hardware platform provides various hardware resources for each virtual machine running on it, such as a virtual central processing unit (English: Central Processing Unit, abbreviated: CPU), memory, a virtual disk, a virtual network card, and the like.
  • the virtual disk can correspond to one file of Host or one logical block device.
  • the virtual machine runs on the virtual hardware platform that Host prepares for it, and one or more virtual machines run on the Host.
  • FIG. 2 is a schematic diagram of a virtualization architecture of a computing node according to an embodiment of the present invention.
  • the architecture mainly includes three layers: a hardware layer, a Host, and a virtual machine (VM).
  • the hardware layer includes the network card.
  • the host has a back-end instance corresponding to the network card (English: Back-End, abbreviated as BE), and the VM has a front-end instance corresponding to the network card (English: Front-End, abbreviation: FE); wherein the BE in the VM can Considered as the front-end driver of the network card, the FE in the Host can be regarded as the back-end driver of the network card.
  • BE Back-End
  • FE Front-End
  • the method for controlling the flow of a packet includes: performing, according to the flow control capability of the virtual machine, the execution party of the flow control policy between the virtual machine and the host; and determining the negotiated flow control policy If the executor is the virtual machine, the virtual machine forwards the packet to be forwarded based on the traffic control policy; if the executor of the negotiated traffic control policy is the host, the virtual machine is to be forwarded.
  • the packet is sent to the host, so that the host performs forwarding processing on the received packet according to the foregoing traffic control policy.
  • FIG. 3 is a schematic flowchart diagram of a packet flow control method according to an embodiment of the present invention. As shown in FIG. 3, a packet flow control according to an embodiment of the present invention is provided. The method can include the following:
  • the virtual machine-based flow control capability negotiates the execution of the flow control policy between the virtual machine and the host.
  • the virtual machine and the host host can negotiate the execution of the traffic control policy between the virtual machine and the host based on the traffic control capability of the virtual machine in multiple manners.
  • the virtual machine-based flow control capability negotiates the execution of the flow control policy between the virtual machine and the host, and the method includes: the virtual machine sends an executive negotiation to the host that carries the description information of the flow control capability of the virtual machine. If the virtual machine receives the negotiation confirmation indication sent by the host after determining that the virtual machine supports the execution of the flow control policy according to the description information of the traffic control capability, the virtual machine determines that the negotiated flow control policy executor is the foregoing a virtual machine, if the virtual machine receives the negotiation denial indication sent by the host after determining that the virtual machine does not support the execution of the traffic control policy according to the description information of the traffic control capability, the virtual machine determines the negotiated flow control policy executor For the above Host.
  • the virtual machine-based traffic control capability negotiates the execution of the traffic control policy between the virtual machine and the host, including: the virtual machine sends an executive negotiation to the host that carries the description information of the traffic control capability of the virtual machine.
  • the request where the description information of the flow control capability is used to describe a version of the flow control policy supported by the virtual machine, and the virtual machine determines that the virtual machine supports execution according to the description information of the traffic control capability.
  • the virtual machine determines that the negotiated flow control policy executor is the virtual machine, if the negotiation confirmation indication sent after the current version or the preset version of the flow control policy is sent.
  • the virtual machine determines the negotiated The execution of the flow control policy is the above Host;
  • the execution of the flow control policy between the virtual machine and the host is performed by the virtual machine based on the flow control capability of the virtual machine, and the method includes: the virtual machine sending the description of the flow control capability of the virtual machine to the host If the virtual machine receives the negotiation confirmation indication sent by the host after determining that the virtual machine supports the execution of the flow control policy according to the description information of the traffic control capability, the virtual machine determines that the negotiated flow control policy executor is The virtual machine; if the virtual machine does not receive the host sent by the host within the first set duration, in response to the executing If the negotiation confirmation indication of the pedestrian negotiation request is performed, the virtual machine determines that the negotiated flow control policy executor is the foregoing Host.
  • the virtual machine-based flow control capability negotiates the execution of the flow control policy between the virtual machine and the host, and the method includes: the virtual machine sends an execution party that carries the description information of the flow control capability of the virtual machine to the host.
  • the negotiation request where the description of the traffic control capability is used to describe a version of the traffic control policy supported by the virtual machine; and the virtual machine determines that the host supports the virtual machine according to the description information of the traffic control capability.
  • the virtual machine After executing the negotiation confirmation indication sent after the latest version or the preset version of the flow control policy, the virtual machine determines that the negotiated flow control policy executor is the virtual machine; if the virtual machine does not receive within the first set duration And the virtual machine determines that the negotiated flow control policy executor is the host, to the negotiation confirmation indication sent by the host to respond to the executor negotiation request.
  • the virtual machine-based flow control capability negotiates the execution of the flow control policy between the virtual machine and the host, and the method includes: the virtual machine sends an execution party that carries the description information of the flow control capability of the virtual machine to the host.
  • the virtual machine determines the negotiated flow control policy executor If the virtual machine does not receive the negotiation denial indication sent by the host for responding to the performer negotiation request within the second set duration, the virtual machine determines that the negotiated flow control policy executor is the virtual machine.
  • the virtual machine-based flow control capability negotiates the execution of the flow control policy between the virtual machine and the host, and the method includes: the virtual machine sends an execution party that carries the description information of the flow control capability of the virtual machine to the host.
  • the negotiation request where the description of the traffic control capability is used to describe a version of the traffic control policy supported by the virtual machine; and the virtual machine determines that the host supports the virtual machine according to the description information of the traffic control capability.
  • the virtual machine After performing the negotiation denial indication sent by the latest version or the preset version of the traffic control policy, the virtual machine determines that the negotiated flow control policy executor is the foregoing Host; if the virtual machine does not receive the second set duration The virtual machine determines that the negotiated flow control policy executor is the virtual machine sent by the host, in response to the negotiation denial indication in response to the executor negotiation request.
  • the description information of the above flow control capability is used to describe The version of the flow control policy that the virtual machine supports is executed. Therefore, the determining, by the host, whether the virtual machine supports the current latest version or the preset version of the traffic control policy according to the description of the traffic control capability may include: comparing the traffic control capability.
  • the description information describes whether the version of the flow control policy supported by the virtual machine is the same as the current latest version or the preset version of the flow control policy. If yes, it may be determined that the virtual machine supports executing the current latest version or the preset version. The flow control policy; if not, it can be determined that the virtual machine does not support the current latest version or the preset version of the flow control policy.
  • the determining, by the host, whether the virtual machine supports the current latest version or the preset version of the traffic control policy according to the description of the traffic control capability may include: comparing the description information of the traffic control capability to describe that the virtual machine supports execution. Whether each version of the k (in which k is a positive integer) version of the flow control policy is the same as the current latest version or the preset version of the flow control policy, if one of the above k versions is compared If the current version or the preset version of the flow control policy is the same, it can be determined that the virtual machine supports the current latest version or the preset version of the flow control policy; if any one of the above k versions is compared with the flow control If the current version or the preset version of the policy is different, it may be determined that the virtual machine does not support the current latest version or the preset version of the flow control policy.
  • the virtual machine may perform forwarding processing on the packet to be forwarded based on the traffic control policy.
  • the virtual machine sends the packet to be forwarded to the host, so that the host receives the received packet according to the traffic control policy. Perform forwarding processing.
  • the traffic control policy mentioned in this embodiment may be, for example, a quality of service based traffic control policy and/or an access control list based traffic control policy.
  • the traffic control policy may also be a traffic control policy that refers to other factors.
  • the QoS-based traffic control policy is based on the service priority of the packet to be forwarded to determine the specific forwarding processing mode of the packet.
  • the specific forwarding processing mode may be delayed sending of packets or delayed transmission. Packets or discarded packets, etc.). For example, if there are multiple packets to be forwarded in the current cache, the packet transmission delay with the higher priority of the corresponding service may be shorter. The delay in sending packets with the lower priority of the corresponding service may be longer, and even the quality of the guaranteed high priority service can be discarded. That is, the forwarding of the packet to be forwarded by the QoS-based traffic control policy may include: forwarding the packet to be forwarded according to the forwarding processing mode corresponding to the service priority of the packet to be forwarded.
  • the traffic control policy based on the ACL is mainly based on whether the information carried in the packet to be forwarded and the record included in the ACL are matched to determine the specific forwarding processing mode of the packet.
  • the access control list is a restricted access control list (like a blacklist), a source/destination address of the packet to be forwarded, an application layer protocol type, a transport layer protocol type, and/or a specific keyword included in the header. If the information in the ACL is matched, the forwarding processing of the packet to be forwarded may be directly discarded. Otherwise, the source/destination address of the packet to be forwarded and the application layer protocol.
  • the forwarding processing of the packet to be forwarded may be forwarded.
  • the access control list is an access control list (like a whitelist)
  • the source/destination address, the application layer protocol type, the transport layer protocol type, and/or the packet header of the packet to be forwarded are included.
  • the forwarding processing of the packet to be forwarded may be directly discarded, and the source/destination address of the packet to be forwarded is
  • the information of the application layer protocol type, the transport layer protocol type, and/or the keyword included in the packet header may be forwarded by the forwarding control packet if the ACL is matched. The message. Other cases and so on.
  • the foregoing negotiation confirmation indication includes the foregoing flow control policy; and the forwarding, by the virtual machine, the packet to be forwarded based on the traffic control policy, includes: the virtual machine is configured to use the traffic included in the negotiation confirmation indication.
  • the control policy forwards the packet processed by the forwarding process.
  • the Host can also pass the traffic control policy to the virtual machine in other manners, so that the virtual machine can report the forwarding process based on the traffic control policy transmitted by the Host after determining that the negotiated flow control policy executor is the virtual machine.
  • the text is forwarded.
  • the flow control policy may be pre-configured in the virtual machine, and when the virtual machine determines that the negotiated flow control policy is executed by the above-mentioned The virtual machine forwards the processed packet based on the pre-configured traffic control policy.
  • the executing, by the virtual machine, the execution party negotiation request that carries the description information of the traffic control capability of the virtual machine to the host includes: the virtual machine receives the negotiation initiation request initiated by the user state process (ie, the user may After the state application or the user command is triggered, the executor negotiation request for carrying the description information of the flow control capability of the virtual machine is sent to the host; or the virtual machine may send the bearer to the host after receiving the negotiation start request from the host.
  • the executor of the description information of the flow control capability of the virtual machine negotiates a request.
  • the virtual machine may also send an executor negotiation request carrying the description information of the flow control capability of the virtual machine to the host autonomously or under the trigger of other conditions.
  • the virtual machine may be deployed on the preloaded client, and the host may be deployed on the preloaded server.
  • the preloaded client and the preloaded server may be based on the flow control capability of the virtual machine.
  • the executor of the traffic control policy is negotiated between the virtual machine and the host.
  • the execution of the traffic control policy based on the virtual machine's traffic control capability between the virtual machine and the host may include: a preloaded client deployed in the virtual machine and a preloaded server deployed in the host.
  • the preloading client negotiates the execution of the flow control policy between the virtual machine and the host based on the established connection and the preloading server based on the flow control capability of the virtual machine.
  • the preloading client after determining that the negotiated flow control policy executor is the virtual machine, sends a heartbeat message to the preloading server based on the connection periodically.
  • One of the purposes of sending a heartbeat message is to notify the host that the virtual machine is working normally. If the host does not receive the heartbeat message from the virtual machine within the set duration, the host may default to the virtual machine may be faulty. For example, after determining that the executor of the negotiated flow control policy is the virtual machine, if the host does not receive the heartbeat message from the virtual machine within the set duration, the Host may switch the executor of the flow control policy to the foregoing.
  • the host (that is, whether the virtual machine forwards the processed packet based on the traffic control policy, the host also forwards the packet from the virtual machine based on the traffic control policy, because the traffic control policy is executed in the host and the virtual machine.
  • the final packet output is basically the same, and may or may not send the flow control to the virtual machine.
  • the executor of the policy switches to the indication message of the above Host.
  • the preloaded client may also send an indication to the preloading server when the virtual machine performs a flow control policy failure.
  • the virtual machine performs the indication message of the flow control policy failure, and the host receives the indication message from the virtual machine to indicate that the virtual machine performs the flow control policy failure after determining that the executed execution of the flow control policy is the virtual machine.
  • the above Host can switch the executor of the flow control policy to the above Host.
  • the preloaded server may also send the queried virtual machine to the preloaded client periodically or aperiodically. If the flow control policy is normal, the status query message does not receive the status indication message from the virtual machine for responding to the status query message within the set duration, or receives the virtual machine from the virtual machine to indicate the virtual machine execution flow.
  • An indication message for controlling a policy failure may determine that the virtual machine performs a flow control policy failure.
  • the preloaded server can also monitor whether the virtual machine performs a flow control policy failure by other means. If it is determined that the virtual machine performs a flow control policy failure, Host can switch the executor of the flow control policy to the above Host.
  • the execution of the flow control policy is negotiated between the virtual machine and the host based on the flow control capability of the virtual machine; and if the executed flow control policy execution party is determined to be the virtual machine, The virtual machine forwards the packet to be forwarded based on the traffic control policy. If the executor of the negotiated traffic control policy is the host, the virtual machine sends the packet to be forwarded to the host.
  • the foregoing Host performs forwarding processing on the received packet according to the foregoing traffic control policy.
  • the virtual machine and the host have the opportunity to become the flow control policy executor, which makes it possible to implement the virtual machine flow control policy, which is beneficial as early as possible.
  • the flow control of the packet flow is beneficial to reduce invalid processing and reduce the occupation of bandwidth and host address space by invalid packet traffic. It can be seen that the foregoing solution is beneficial to reduce the occupation of the packet address in the outbound direction of the virtual machine. And because the flow control strategy executor is determined through negotiation, it is beneficial to improve the reliability of the flow control strategy execution.
  • another packet flow control method includes: performing, according to a virtual machine-based flow control capability, an execution party of the flow control policy between the virtual machine and the host;
  • the ACL executor is the host, and after receiving the packet from the virtual machine, the host forwards the received packet based on the traffic control policy.
  • FIG. 4-a is a schematic flowchart diagram of another packet flow control method according to another embodiment of the present invention.
  • another packet flow control method provided by another embodiment of the present invention may include the following content:
  • the virtual machine-based traffic control capability negotiates a flow control policy executor between the virtual machine and the host.
  • the Host and the virtual machine can negotiate the execution of the traffic control policy between the virtual machine and the Host based on the traffic control capability of the virtual machine in multiple manners.
  • the host host and the virtual machine negotiate the flow control policy between the virtual machine and the host based on the traffic control capability of the virtual machine, and may include: the host receives the traffic that is sent by the virtual machine and carries the virtual machine. If the host determines that the virtual machine supports the execution of the flow control policy according to the description information of the flow control capability, the host sends a negotiation confirmation indication to the virtual machine, where the negotiation confirmation indication is used to indicate the negotiation. And executing the flow control policy executor is the virtual machine; and/or, if the host determines, according to the description information of the traffic control capability, that the virtual machine does not support the execution of the traffic control policy, sending a negotiation denial indication to the virtual machine, where the negotiation is performed. The denial indication is used to indicate that the negotiated flow control policy executor is the above Host.
  • the host host and the virtual machine negotiate the flow control policy between the virtual machine and the host based on the traffic control capability of the virtual machine, and may include: the host receiving the virtual machine and carrying the virtual machine.
  • the execution party negotiation request of the flow control capability description information where the description information of the flow control capability is used to describe a version of the flow control policy supported by the virtual machine; if the host determines the foregoing according to the description information of the flow control capability
  • the virtual machine supports the current latest version or the preset version of the traffic control policy, and then sends the negotiation to the virtual machine.
  • the foregoing confirmation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or if the Hos according to the description information of the traffic control capability determines that the virtual machine does not support executing the current latest version. Or the default version of the traffic control policy sends a negotiation denial indication to the virtual machine, where the negotiation denial indication is used to indicate that the negotiated flow control policy executor is the foregoing Host.
  • the Host forwards the received packet according to the traffic control policy.
  • the virtual machine may perform forwarding processing on the packet to be forwarded based on the traffic control policy.
  • the traffic control policy mentioned in this embodiment may be, for example, a quality of service based traffic control policy and/or an access control list based traffic control policy.
  • the traffic control policy may also be a traffic control policy that refers to other factors.
  • the QoS-based traffic control policy is based on the service priority of the packet to be forwarded to determine the specific forwarding processing mode of the packet.
  • the specific forwarding processing mode may be delayed sending of packets or delayed transmission. Packets or discarded packets, etc.). For example, if there are multiple packets to be forwarded in the current cache, the packet transmission delay with the higher priority of the corresponding service may be shorter or even no delay. The lower the packet priority of the corresponding service, the longer the packet transmission delay may be. It is even possible to discard the quality of service guaranteed for high priority services. That is, the forwarding of the packet to be forwarded by the QoS-based traffic control policy may include: forwarding the packet to be forwarded according to the forwarding processing mode corresponding to the service priority of the packet to be forwarded.
  • the traffic control policy based on the ACL is mainly based on whether the information carried in the packet to be forwarded and the record included in the ACL are matched to determine the specific forwarding processing mode of the packet.
  • the access control list is restricted access control list (like blacklist), for to be forwarded If the source/destination address of the packet, the application layer protocol type, the transport layer protocol type, and/or the specific keyword included in the packet header are processed, if there is a record matching the access control list, the candidate
  • the forwarding processing of the forwarding processing packet may be directly discarding, and vice versa, the source/destination address of the packet to be forwarded, the application layer protocol type, the transport layer protocol type, and/or the keyword included in the packet header.
  • the forwarding process of the packet to be forwarded may be forwarded.
  • the access control list is an access control list (like a whitelist)
  • the source/destination address, the application layer protocol type, the transport layer protocol type, and/or the packet header of the packet to be forwarded are included.
  • the specific keyword and the like if the access control list does not have a matching record, the forwarding processing of the packet to be forwarded may be directly discarded, and the source/destination address of the packet to be forwarded is The information of the application layer protocol type, the transport layer protocol type, and/or the keyword included in the packet header may be forwarded by the forwarding control packet if the ACL is matched. The message. Other cases and so on.
  • the foregoing negotiation confirmation indication includes the foregoing flow control policy; and the forwarding, by the virtual machine, the packet to be forwarded based on the flow control policy includes: the flow control included in the virtual machine based on the negotiation confirmation indication The policy forwards the processed packet to be forwarded.
  • the Host can also pass the traffic control policy to the virtual machine in other manners, so that the virtual machine can report the forwarding process based on the traffic control policy transmitted by the Host after determining that the negotiated flow control policy executor is the virtual machine.
  • the text is forwarded.
  • the traffic control policy may be pre-configured in the virtual machine.
  • the virtual machine forwards the packet to be forwarded based on the pre-configured traffic control policy. deal with.
  • the virtual machine may be deployed on the preloaded client, and the host may be deployed on the preloaded server.
  • the preloaded client and the preloaded server may be based on the flow control capability of the virtual machine.
  • the executor of the traffic control policy is negotiated between the virtual machine and the host.
  • the execution of the flow control policy between the virtual machine and the host based on the traffic control capability of the virtual machine and the host host may include: the preloaded server deployed in the host and deployed in the virtual machine.
  • the above preloaded server is based on the established connection and The preloading client negotiates the execution of the traffic control policy between the virtual machine and the Host based on the traffic control capability of the virtual machine.
  • the preloading client may periodically send a heartbeat message to the preloading server based on the connection.
  • One of the purposes of sending a heartbeat message is to notify the host that the virtual machine is working normally. If the host does not receive the heartbeat message from the virtual machine within the set time, the host can assume that the virtual machine may be faulty. For example, after determining that the executor of the negotiated flow control policy is the virtual machine, if the host does not receive the heartbeat message from the virtual machine within the set duration, the Host may execute the flow control policy.
  • the switch is forwarded to the host (that is, whether the virtual machine performs forwarding processing based on the traffic control policy to forward the packet, and the host also forwards the packet from the virtual machine based on the traffic control policy, which is executed by the host and the virtual machine.
  • the traffic control policy is the same. Therefore, for the same packet flow, if the host and/or the virtual machine executes the traffic control policy, the final packet output is basically the same, the indication may be sent to the virtual machine.
  • the executor of the flow control policy switches to the indication message of the above Host.
  • the host and the virtual machine negotiate the flow control policy execution party between the virtual machine and the host based on the flow control capability of the virtual machine; and if the host determines the negotiated flow control policy execution After the host receives the packet from the virtual machine, the host forwards the received packet based on the traffic control policy.
  • the virtual machine and the host have the opportunity to become the traffic control policy executor, which makes it possible to implement the virtual machine flow control policy, which is beneficial as early as possible.
  • the flow control of the packet flow is beneficial to reduce invalid processing and reduce the occupation of bandwidth and host address space by invalid packet traffic.
  • the virtual machine when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy.
  • the embodiment of the invention further provides a packet flow control method, which may include: virtual machine based traffic Controlling, the executor of the flow control policy is negotiated between the host Host and the virtual machine; if the negotiated flow control policy executor is the virtual machine, the virtual machine is based on the flow control policy The packet to be forwarded is forwarded to the host; if the executor of the negotiated flow control policy is the host, the packet to be forwarded by the virtual machine is sent to the host; The packet received by the host to be forwarded is forwarded.
  • a packet flow control method may include: virtual machine based traffic Controlling, the executor of the flow control policy is negotiated between the host Host and the virtual machine; if the negotiated flow control policy executor is the virtual machine, the virtual machine is based on the flow control policy The packet to be forwarded is forwarded to the host; if the executor of the negotiated flow control policy is the host, the packet to be forwarded by the virtual machine is sent to the host; The packet received by the host to be for
  • the virtual machine-based flow control capability, the execution party that negotiates the flow control policy between the host host and the virtual machine includes:
  • the host After the host receives the executor negotiation request, if the virtual machine supports the execution of the flow control policy according to the description information of the flow control capability, the host sends the host to the virtual machine to the virtual machine.
  • the negotiation confirmation indication sent by the machine where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or, if the virtual machine is determined according to the description information of the flow control capability If the flow control policy is not supported, the negotiation is performed to send the negotiation denied indication sent by the host to the virtual machine, where the negotiation denial indication is used to indicate that the negotiated flow control policy executor is the Host;
  • the virtual machine-based flow control capability, the execution party of the flow control policy negotiated between the host host and the virtual machine includes:
  • the host After the host receives the executor negotiation request, if it is determined according to the description information of the traffic control capability that the virtual machine supports the current latest version or the preset version of the traffic control policy, the virtual machine is sent to the virtual machine. Sending, by the host, a negotiation confirmation indication to be sent to the virtual machine, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or according to the description of the flow control capability Determining that the virtual machine does not support the flow control policy of the current latest version or the preset version, and sends a negotiation denial indication sent by the host to the virtual machine to the virtual machine, where the negotiation denial indication is Used to indicate the negotiated flow control policy
  • the execution is the Host.
  • the negotiation confirmation indication includes the flow control policy, where the forwarding the packet to be forwarded by the virtual machine based on the flow control policy includes: The traffic control policy included in the negotiation confirmation instruction forwards the packet to be forwarded by the virtual machine.
  • the virtual The device sends an indication message that is sent by the host to the virtual machine to indicate that the executor of the traffic control policy switches to the host.
  • the traffic control policy based on the foregoing processor for processing the packet to be forwarded in the foregoing embodiment may be, for example, a quality of service based traffic control policy and/or a traffic control policy based on an access control list, and of course, the traffic control policy However, refer to the flow control strategy of other factors.
  • the QoS-based traffic control policy is based on the service priority of the packet to be forwarded to determine the specific forwarding processing mode of the packet.
  • the specific forwarding processing mode may be delayed sending of packets or delayed transmission. Packets or discarded packets, etc.). For example, if there are multiple packets to be forwarded in the current cache, the packet transmission delay with the higher priority of the corresponding service may be shorter or even no delay. The lower the packet priority of the corresponding service, the longer the packet transmission delay may be. It is even possible to discard the quality of service guaranteed for high priority services. That is, the forwarding of the packet to be forwarded by the QoS-based traffic control policy may include: forwarding the packet to be forwarded according to the forwarding processing mode corresponding to the service priority of the packet to be forwarded.
  • the traffic control policy based on the ACL is mainly based on whether the information carried in the packet to be forwarded and the record included in the ACL are matched to determine the specific forwarding processing mode of the packet.
  • the access control list is a restricted access control list (like a blacklist), a source/destination address of the packet to be forwarded, an application layer protocol type, a transport layer protocol type, and/or a specific keyword included in the header. If the information in the ACL is matched, the forwarding processing of the packet to be forwarded may be directly discarded. Otherwise, the source/destination address of the packet to be forwarded and the application layer protocol. Information such as the type, the transport layer protocol type, and/or the keyword included in the packet header.
  • the forwarding processing mode may be forwarding the packet.
  • the access control list is an access control list (like a whitelist)
  • the source/destination address, the application layer protocol type, the transport layer protocol type, and/or the packet header of the packet to be forwarded are included.
  • the specific keyword and the like if the access control list does not have a matching record, the forwarding processing of the packet to be forwarded may be directly discarded, and the source/destination address of the packet to be forwarded is
  • the information of the application layer protocol type, the transport layer protocol type, and/or the keyword included in the packet header may be forwarded by the forwarding control packet if the ACL is matched. The message. Other cases and so on.
  • the sending, by the host, the execution party negotiation request sent by the virtual machine to the host includes: sending, after the virtual machine receives the negotiation initiation request initiated by the user state process, to the host After the virtual machine receives the negotiation start request from the host, the virtual machine sends the execution of the virtual machine to be sent to the host after the virtual machine receives the negotiation start request from the host. Party negotiation request.
  • the execution of the flow control policy between the host Host and the virtual machine includes: preloading the client and deploying in the virtual machine. After the connection establishment between the preloaded servers in the Host is completed, the execution of the flow control policy is negotiated between the host Host and the virtual machine through the established connection and the virtual machine based flow control capability.
  • FIG. 4-b is a schematic flowchart of another packet flow control method according to another embodiment of the present invention.
  • another packet flow control method provided by another embodiment of the present invention may include the following content:
  • the processor negotiates a flow control policy execution party between the host host and the virtual machine based on the flow control capability of the virtual machine.
  • the processor is based on s403. If the executor of the negotiated flow control policy is the host, the processor sends the virtual machine to be forwarded and processed. The text is sent to the above Host; the above processor is based on the above traffic control policy The foregoing processing of the packet to be forwarded received by the host is forwarded.
  • the foregoing processor based on the flow control capability of the virtual machine, negotiates the execution of the flow control policy between the host host and the virtual machine, and may include:
  • the foregoing processor is configured to perform, according to the flow control capability of the virtual machine, the execution of the flow control policy between the host host and the virtual machine, and the processor sends the execution negotiation request sent by the virtual machine to the host to the host.
  • the execution party negotiation request carries the description information of the flow control capability of the virtual machine;
  • the processor After the foregoing host receives the foregoing executor negotiation request, if the processor determines that the virtual machine supports the execution of the flow control policy according to the description information of the traffic control capability, the processor sends the host to the virtual machine to the virtual machine. a negotiation confirmation indication sent, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or, the processor determines that the virtual machine is not based on the description information of the traffic control capability. Supporting the execution of the flow control policy, the processor sends the negotiation denial indication sent by the host to the virtual machine to the virtual machine, where the negotiation denial indication is used to indicate that the negotiated flow control policy executor is the host;
  • the foregoing processor is configured to perform, according to the flow control capability of the virtual machine, the execution of the flow control policy between the host host and the virtual machine, and the processor sends the execution negotiation request sent by the virtual machine to the host to the host.
  • the execution party negotiation request carries the description information of the flow control capability of the virtual machine, and the description information of the flow control capability is used to describe a version of the flow control policy supported by the virtual machine;
  • the processor After the foregoing host receives the foregoing execution party negotiation request, if the processor determines, according to the description information of the traffic control capability, that the virtual machine supports the current latest version or the preset version of the flow control policy, the processor sends the virtual control policy to the virtual
  • the device sends a negotiation confirmation indication that is sent by the host to the virtual machine, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or the processor is configured according to the description of the flow control capability.
  • the processor sends the negotiation denial indication sent by the host to the virtual machine to the virtual machine, where the negotiation denial indication is used to indicate
  • the negotiated flow control policy executor is the above Host.
  • the foregoing negotiation confirmation indication includes the foregoing flow control policy.
  • the process of forwarding, by the processor, the packet to be forwarded by the virtual machine based on the traffic control policy includes: the processor is configured to use the traffic control included in the negotiation confirmation indication, and the host may also control the traffic by using other methods.
  • the policy is delivered to the virtual machine, so that after determining that the negotiated flow control policy executor is the virtual machine, the processor forwards the packet to be forwarded by the virtual machine based on the traffic control policy transmitted by the host.
  • the flow control policy may be pre-configured in the virtual machine, and when the executed flow control policy executor is determined to be the virtual machine, the processor performs the packet to be forwarded and processed by the virtual machine based on the pre-configured flow control policy. Forward processing.
  • the processor goes to the virtual The device sends an indication message that is sent by the host to the virtual machine to indicate that the executor of the traffic control policy switches to the foregoing Host.
  • the traffic control policy is a quality of service based traffic control policy and/or a traffic control policy based on an access control list.
  • the sending, by the processor, the executor negotiation request sent by the virtual machine to the host to the host may include:
  • the processor After the virtual machine receives the negotiation start request initiated by the user state process, the processor sends an execution party negotiation request sent by the virtual machine to the host to the host; or, the virtual machine receives the negotiation start from the host. After the request, the processor sends an execution party negotiation request sent by the virtual machine to the host to the host.
  • the traffic control policy based on the foregoing processor for processing the packet to be forwarded in the foregoing embodiment may be, for example, a quality of service based traffic control policy and/or a traffic control policy based on an access control list, and of course, the traffic control policy However, refer to the flow control strategy of other factors.
  • the QoS-based traffic control policy is based on the service priority of the packet to be forwarded to determine the specific forwarding processing mode of the packet.
  • the specific forwarding processing mode may be delayed sending of packets or delayed transmission. Packets or discarded packets, etc.). For example, if there are multiple packets to be forwarded in the current cache, the packet transmission delay with the higher priority of the corresponding service may be shorter. The delay in sending packets with the lower priority of the corresponding service may be longer, and even the quality of the guaranteed high priority service can be discarded. That is, the forwarding of the packet to be forwarded by the QoS-based traffic control policy may include: forwarding the packet to be forwarded according to the forwarding processing mode corresponding to the service priority of the packet to be forwarded.
  • the traffic control policy based on the ACL is mainly based on whether the information carried in the packet to be forwarded and the record included in the ACL are matched to determine the specific forwarding processing mode of the packet.
  • the access control list is a restricted access control list (like a blacklist), a source/destination address of the packet to be forwarded, an application layer protocol type, a transport layer protocol type, and/or a specific keyword included in the header. If the information in the ACL is matched, the forwarding processing of the packet to be forwarded may be directly discarded. Otherwise, the source/destination address of the packet to be forwarded and the application layer protocol.
  • the forwarding processing of the packet to be forwarded may be forwarded.
  • the access control list is an access control list (like a whitelist)
  • the source/destination address, the application layer protocol type, the transport layer protocol type, and/or the packet header of the packet to be forwarded are included.
  • the forwarding processing of the packet to be forwarded may be directly discarded, and the source/destination address of the packet to be forwarded is
  • the information of the application layer protocol type, the transport layer protocol type, and/or the keyword included in the packet header may be forwarded by the forwarding control packet if the ACL is matched. The message. Other cases and so on.
  • the virtual machine-based flow control capability, the execution party of the traffic control policy is negotiated between the host host and the virtual machine, and may include: a preloaded client deployed in the virtual machine After the connection between the pre-loaded server deployed in the Host is completed, the processor negotiates a flow control policy between the host Host and the virtual machine based on the established connection and the flow control capability of the virtual machine. Execution.
  • the virtual machine and the host host negotiate the execution of the flow control policy between the virtual machine and the host based on the flow control capability of the virtual machine;
  • the virtual machine determines that the negotiated flow control policy executor is the above virtual machine, The virtual machine forwards the packet to be forwarded based on the traffic control policy; if the virtual machine determines that the executor of the negotiated traffic control policy is the host, the virtual machine sends the packet to be forwarded to the foregoing Host, so that the foregoing Host performs forwarding processing on the received packet based on the foregoing traffic control policy.
  • the virtual machine and the host have the opportunity to become the flow control policy executor, which makes it possible to implement the virtual machine flow control policy, which is beneficial to the end. It is possible to perform traffic control on the packet flow earlier, which is beneficial to reduce invalid processing and reduce the occupation of bandwidth and host address space by invalid packet traffic. It can be seen that the foregoing solution is beneficial for reducing the occupation of the packet address in the outbound direction of the virtual machine to the host address space. And because the flow control strategy executor is determined through negotiation, it is beneficial to improve the reliability of the flow control strategy execution.
  • the virtual machine when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic In order to facilitate a better understanding and implementation of the above aspects of the embodiments of the present invention, the following is exemplified by some specific examples.
  • FIG. 5-a is a schematic flowchart of another packet flow control method according to another embodiment of the present invention.
  • FIG. 5-b is a schematic structural diagram of a computing node that can be used to implement the flow control method shown in FIG. 5-a according to an embodiment of the present invention.
  • Figure 5-b shows a specific internal logical architecture of Host and virtual machine deployed in the compute node.
  • Host and virtual machine can also have other internal logical architectures as shown in Figure 5-b.
  • the flow control method is mainly described as an example in the architecture shown in FIG. 5-b.
  • another packet flow control method provided by another embodiment of the present invention may include the following content:
  • the preloaded client deployed in the VM-m (English: preload client) establishes a connection with the preloaded server (English: preload server) deployed in the host. Wherein the connection transmits a control protocol connection or other type of communication connection.
  • the existing communication connection between the preload client deployed in the virtual machine VM-m and the preload server deployed in the host may be directly communicated, and step 501 may be omitted. 502.
  • the preload client deployed in the virtual machine VM-m receives the negotiation start request sent by the preload server deployed in the host.
  • the preload client deployed in the virtual machine VM-m sends an executive negotiation request that carries the description information of the flow control capability of the virtual machine VM-m to the preload server deployed in the host.
  • the preload server deployed in the host sends a negotiation start request to the preload client deployed in the VM-m.
  • the main purpose is to trigger the preload client deployed in the VM-m to initiate the negotiation flow control policy.
  • the preload client deployed in the virtual machine VM-m may also be triggered by other conditions (for example, receiving a negotiation start request initiated by the user state process (ie, may be triggered by a user mode application or a user instruction)) Initiate a negotiation flow control policy executor. If the preload client deployed in the virtual machine VM-m initiates the negotiation of the flow control policy executor, step 502 may be omitted.
  • the preload server deployed in the host receives the executor negotiation request that carries the description information of the traffic control capability of the virtual machine VM-m, where the description information of the traffic control capability carried in the executor negotiation request is used to indicate the virtual machine. Whether the VM-m supports the execution of the traffic control policy. Therefore, the preload server deployed in the host can determine the virtual machine according to the description of the traffic control capability.
  • VM-m supports the execution of traffic control policies.
  • the preload server deployed in the Host is used as an example to determine that the VM-m supports the execution of the traffic control policy. Therefore, the preload server deployed in the host may send a negotiation confirmation indication to the preload client deployed in the virtual machine VM-m, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine VM-m, The traffic control policy may be carried in the negotiation confirmation indication.
  • the preload server deployed in the Host also notifies the preloaded kernel deployed in the Host (English: preload kernel) that the flow control policy is not executed.
  • the preload client deployed in the virtual machine VM-m determines that the negotiated flow control policy executor is the virtual machine VM-m. Therefore, the virtual machine VM-m The pre-loaded client sends the traffic control policy carried in the negotiation confirmation indication to the FE corresponding to the network card deployed in the virtual machine VM-m to notify the FE corresponding to the network card deployed in the virtual machine VM-m to execute the traffic control policy.
  • the execution of the traffic control policy is negotiated between the preload client deployed in the virtual machine VM-m and the preload server deployed in the host by performing steps 503-505. 506.
  • the FE corresponding to the network card deployed in the VM-m is forwarded according to the received traffic control policy, and the packet to be forwarded processed by the user-mode application deployed in the virtual machine VM-m is forwarded. deal with.
  • the traffic control policy is a service quality based traffic control policy or an access control list based traffic control policy.
  • the QoS-based traffic control policy is based on the service priority of the packet to be forwarded to determine the specific forwarding processing mode of the packet.
  • the specific forwarding processing mode may be delayed sending of packets or delayed transmission. Packets or discarded packets, etc.). For example, if there are multiple packets to be forwarded in the current cache, the packet transmission delay with the higher priority of the corresponding service may be shorter or even no delay. The lower the packet priority of the corresponding service, the longer the packet transmission delay may be. It is even possible to discard the quality of service guaranteed for high priority services.
  • the traffic control policy based on the ACL is mainly based on whether the information carried in the packet to be forwarded and the record included in the ACL are matched to determine the specific forwarding processing mode of the packet.
  • the access control list is a restricted access control list (like a blacklist), a source/destination address of the packet to be forwarded, an application layer protocol type, a transport layer protocol type, and/or a specific keyword included in the header. If the information in the ACL is matched, the forwarding processing of the packet to be forwarded may be directly discarded. Otherwise, the source/destination address of the packet to be forwarded and the application layer protocol.
  • the forwarding processing of the packet to be forwarded may be forwarded.
  • the access control list is an access control list (like a whitelist)
  • the source/destination address, the application layer protocol type, the transport layer protocol type, and/or the packet header of the packet to be forwarded are included.
  • the information about the specific keyword and the like, if the access control list does not have a matching record, the forwarding processing of the packet to be forwarded may be directly discarded.
  • the forwarding processing manner of the packet to be forwarded may be forwarding the packet. Other cases and so on.
  • the FE corresponding to the NIC deployed in the VM-m virtual machine is based on the traffic control policy.
  • the FE corresponding to the NIC deployed in the virtual machine VM-m discards the packet to be forwarded from the user-mode application deployed in the VM-m; or the FE corresponding to the NIC deployed in the VM-m.
  • the delay (the degree of delay may be related to the service priority of the packet to be forwarded and the number of packets to be forwarded) is sent from the user mode application deployed in the VM-m to be forwarded; or the virtual machine
  • the FE corresponding to the NIC deployed in the VM-m sends the packets to be forwarded from the user-mode application deployed in the VM-m without delay.
  • the other methods are not listed here.
  • the BE corresponding to the NIC deployed in the host receives the FE from the NIC deployed in the VM-m, it forwards the received packet to the preload kernel deployed in the host.
  • the preload kernel deployed in the host does not need to implement the traffic control policy. Therefore, the preload kernel deployed in the host can directly forward the received packets to the NIC through the NIC driver. The NIC forwards the received packets accordingly.
  • the preload client may periodically send a heartbeat message to the preload server based on the connection.
  • the purpose of sending the heartbeat message is to notify the preload server that the virtual machine VM-m is working normally. If the preload server does not receive the heartbeat message from the preload client within the set duration, the preload server may default. There may be a failure for VM-m. For example, after the preload server determines that the executor of the negotiated flow control policy is the virtual machine VM-m, if the heartbeat message from the preload client is not received within the set duration, the preload server may use the traffic control policy.
  • the executor switches to the above Host (that is, whether the FE corresponding to the NIC deployed in the VM-m is forwarded based on the traffic control policy, and the preload kernel is based on the traffic control policy.
  • the packet of the VM-m is forwarded.
  • the host and the VM-m perform the same traffic control policy. Therefore, if the same packet flows, the preload kernel and/or the VM-m are deployed.
  • the FE corresponding to the NIC performs the same flow control policy, and the output of the final message of the preload kernel is basically the same.
  • the indication message that the executor of the flow control policy is switched to the host may be sent to the preload client.
  • the preload client may also be the FE corresponding to the NIC deployed in the virtual machine VM-m.
  • the flow control policy is faulty
  • an indication message for instructing the virtual machine VM-m to perform a flow control policy failure is sent to the preload server.
  • the preload server after determining that the executor of the negotiated flow control policy is the virtual machine, if receiving an indication message from the preload client for instructing the virtual machine VM-m to perform a flow control policy failure, the preload server
  • the executor of the flow control policy can be switched to Host, and the preload server can notify the preload kernel to execute the flow control policy.
  • the preload server may also send the query to the preload client periodically or aperiodically.
  • the virtual machine VM-m performs a status query message indicating whether the flow control policy is normal, and does not receive the status indication message from the preload client for responding to the status query message within the set duration, or receives the message from the preload client.
  • Instructing the virtual machine VM-m to perform a flow control policy failure may determine that the virtual machine VM-m performs a flow control policy failure.
  • the preload server can also monitor whether the VM-m execution flow control policy is faulty by other means. If the virtual machine VM-m performs a flow control policy failure, the preload server may switch the executor of the flow control policy to the host, and the preload server may notify the preload kernel to execute the flow control policy.
  • the preload kernel After being notified of the execution of the flow control policy, the preload kernel forwards the to-be-processed processing packet from the virtual machine VM-m based on the foregoing flow control policy.
  • FIG. 5-c is a schematic diagram of a flow control effect provided by an embodiment of the present invention
  • FIG. 5-c shows a large bandwidth packet traffic from a user mode application in the virtual machine VM-m.
  • the bandwidth of the packet traffic becomes smaller. It can be seen that the traffic control is reduced as early as possible to reduce resource consumption.
  • the mechanism for the virtual machine and the host to negotiate the flow control policy executor is introduced, so that both the virtual machine and the host have the opportunity to become the flow control policy executor, which enables the virtual machine flow control policy to be executed.
  • This becomes possible which is beneficial to the flow control of the packet flow as early as possible, which is beneficial to reduce invalid processing and reduce the occupation of bandwidth and host address space by invalid packet traffic.
  • the foregoing solution is beneficial for reducing the occupation of the packet address in the outbound direction of the virtual machine to the host address space.
  • the flow control policy executor is determined through negotiation, it is beneficial to improve the reliability of the flow control policy execution.
  • the virtual machine when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy.
  • FIG. 6-a is a schematic flowchart diagram of another packet flow control method according to another embodiment of the present invention.
  • FIG. 5-b is a schematic structural diagram of a computing node that can be used to implement the flow control method shown in FIG. 6 according to an embodiment of the present invention.
  • Figure 5-b illustrates a specific internal logical architecture of the Host and virtual machines deployed in the compute nodes.
  • the Host and the virtual machines can also have other internal logical architectures different from the one shown in Figure 5-b.
  • the flow control method is mainly described in the architecture shown in FIG. 5-b as an example.
  • another packet flow control method provided by another embodiment of the present invention may include the following content:
  • the preload client deployed in the virtual machine VM-m establishes a connection with the preload server deployed in the host. Wherein the connection transmits a control protocol connection or other type of communication connection.
  • step 601 may also be omitted.
  • the preload client deployed in the virtual machine VM-m receives the negotiation start request sent by the preload server deployed in the host.
  • the preload client deployed in the virtual machine VM-m sends an executive negotiation request that carries the description information of the flow control capability of the virtual machine VM-m to the preload server deployed in the host.
  • the preload server deployed in the host sends a negotiation start request to the preload client deployed in the VM-m.
  • the main purpose is to trigger the preload client deployed in the VM-m to initiate the negotiation flow control policy.
  • the preload client deployed in the virtual machine VM-m may also be triggered by other conditions (for example, receiving a negotiation start request initiated by the user state process (ie, may be triggered by a user mode application or a user instruction)) Initiate a negotiation flow control policy executor. If the preload client deployed in the virtual machine VM-m initiates the negotiation of the flow control policy executor, step 602 may be omitted. 604.
  • the preload server deployed in the host receives the executor negotiation request that carries the description information of the traffic control capability of the virtual machine VM-m, where the description information of the traffic control capability carried in the executor negotiation request is used to indicate the virtual machine. Whether the VM-m supports the execution of the traffic control policy, the preload server deployed in the host can determine whether the VM-m supports the traffic control policy according to the description of the traffic control capability.
  • the preload server deployed in the host is used as an example to determine that the VM-m does not support the traffic control policy. Therefore, the preload server deployed in the host may send a negotiation denial indication to the preload client deployed in the virtual machine VM-m, where the negotiation denial indication is used to indicate that the negotiated flow control policy executor is the above Host. The preload server deployed in the Host also notifies the preload kernel deployed in the Host to execute the traffic control policy.
  • the preload client deployed in the virtual machine VM-m receives the negotiation denial indication sent by the preload server deployed in the host, and determines that the negotiated flow control policy executor is the foregoing Host. Therefore, the preload deployed in the virtual machine VM-m The client notifies the FE corresponding to the NIC deployed in the VM-m to not perform the traffic control policy.
  • the execution of the traffic control policy is negotiated between the preload client deployed in the virtual machine VM-m and the preload server deployed in the host by executing the steps 603 to 605.
  • the FE corresponding to the NIC deployed in the VM-m forwards the packets to be forwarded from the user-mode application deployed in the VM-m.
  • the FE corresponding to the NIC deployed in the VM-m does not control the forwarding of packets.
  • the BE corresponding to the network card deployed in the host receives the FE packet corresponding to the network card deployed in the VM-m, the packet is forwarded to the preload kernel deployed in the host.
  • the preload kernel forwards the received packet based on the traffic control policy.
  • the traffic control policy is a service quality based traffic control policy or an access control list based traffic control policy.
  • the QoS-based traffic control policy is based on the service priority of the packet to be forwarded to determine the specific forwarding processing mode of the packet.
  • the specific forwarding processing mode may be delayed sending of packets or delayed transmission. Packets or discarded packets, etc.). For example, if there are multiple packets to be forwarded in the current cache, the packet transmission delay with the higher priority of the corresponding service may be shorter or even no delay. The lower the packet priority of the corresponding service, the longer the packet transmission delay may be. Can even discard the right The quality of service for high priority services is guaranteed.
  • the traffic control policy based on the ACL is mainly based on whether the information carried in the packet to be forwarded and the record included in the ACL are matched to determine the specific forwarding processing mode of the packet.
  • the access control list is a restricted access control list (like a blacklist), a source/destination address of the packet to be forwarded, an application layer protocol type, a transport layer protocol type, and/or a specific keyword included in the header. If the information in the ACL is matched, the forwarding processing of the packet to be forwarded may be directly discarded. Otherwise, the source/destination address of the packet to be forwarded and the application layer protocol.
  • the forwarding processing of the packet to be forwarded may be forwarded.
  • the access control list is an access control list (like a whitelist)
  • the source/destination address, the application layer protocol type, the transport layer protocol type, and/or the packet header of the packet to be forwarded are included.
  • the information about the specific keyword and the like, if the access control list does not have a matching record, the forwarding processing of the packet to be forwarded may be directly discarded.
  • the forwarding processing manner of the packet to be forwarded may be forwarding the packet. Other cases and so on.
  • the preloading of the packet to be forwarded by the preloading kernel based on the traffic control policy may include: preloading the kernel to discard the packet to be forwarded from the virtual machine VM-m; or, preloading the kernel There is a delay (the degree of delay may be related to the service priority of the packet to be forwarded and the number of packets to be forwarded), and the packet to be forwarded from the VM-m is sent; or the preload kernel is sent without delay.
  • the packets to be forwarded by the VM-m are not listed here.
  • the NIC If the NIC receives the packet sent by the preload kernel through the NIC driver, the NIC forwards the received packet accordingly.
  • FIG. 6-b is another schematic diagram of the flow control effect provided by the embodiment of the present invention.
  • FIG. 6-b shows that the user mode application in the virtual machine VM-m sends a large bandwidth to the traffic.
  • the traffic controller corresponding to the NIC does not execute the traffic control policy
  • the preload kernel in the host executes the traffic control policy. The bandwidth of the traffic is getting smaller.
  • the mechanism for the virtual machine and the host to negotiate the flow control policy executor is introduced, so that both the virtual machine and the host have the opportunity to become the flow control policy executor, which enables the virtual machine flow control policy to be executed.
  • This becomes possible which is beneficial to the flow control of the packet flow as early as possible, which is beneficial to reduce invalid processing and reduce the occupation of bandwidth and host address space by invalid packet traffic.
  • the foregoing solution is beneficial to reduce the occupation of the packet address in the outbound direction of the virtual machine.
  • the flow control policy executor is determined through negotiation, it is beneficial to improve the reliability of the flow control policy execution.
  • the virtual machine when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy.
  • FIG. 7 is a schematic flowchart diagram of another packet flow control method according to another embodiment of the present invention.
  • FIG. 5-b is a schematic structural diagram of a computing node that can be used to implement the flow control method shown in FIG. 7 according to an embodiment of the present invention.
  • Figure 7 illustrates a specific internal logical architecture of Hosts and virtual machines deployed in a compute node.
  • Hosts and virtual machines may also have other internal logical architectures that differ from the examples in Figure 5-b.
  • the flow control method is mainly described in the architecture shown in FIG. 5-b as an example.
  • another packet flow control method provided by another embodiment of the present invention may include the following contents:
  • the preload client deployed in the virtual machine VM-m establishes a connection with the preload server deployed in the host. Wherein the connection transmits a control protocol connection or other type of communication connection.
  • step 501 may be omitted.
  • the preload client deployed in the virtual machine VM-m receives the negotiation start request sent by the preload server deployed in the host.
  • the preload client deployed in the virtual machine VM-m is deployed to the preload server in the host.
  • An executor negotiation request that carries description information of the flow control capability of the virtual machine VM-m is transmitted.
  • the preload server deployed in the host sends a negotiation start request to the preload client deployed in the virtual machine VM-m, and the main purpose is to trigger the preload client deployed in the virtual machine VM-m to initiate a negotiation flow control policy execution party.
  • the preload client deployed in the virtual machine VM-m may also be triggered by other conditions (for example, receiving a negotiation start request initiated by the user state process (ie, may be triggered by a user mode application or a user instruction)) Initiate a negotiation flow control policy executor. If the preload client deployed in the virtual machine VM-m initiates the negotiation of the flow control policy executor, step 702 may be omitted.
  • the preload server deployed in the host receives the executor negotiation request that carries the description information of the traffic control capability of the virtual machine VM-m, where the description information of the traffic control capability carried in the executor negotiation request is used to indicate the virtual machine.
  • the VM-m supports the version of the traffic control policy. Therefore, the preload server deployed in the host can determine whether the VM-m supports the current version or the preset version of the traffic control based on the description of the traffic control capability. Strategy.
  • the description information of the traffic control capability is used to describe the version of the traffic control policy supported by the virtual machine, and the preload server determines whether the virtual machine is based on the description information of the traffic control capability.
  • the flow control policy that supports the current version or the preset version may include: comparing the description of the traffic control capability to describe whether the version of the traffic control policy supported by the virtual machine is current and the latest version of the traffic control policy or The preset version is the same. If yes, it can be determined that the virtual machine supports the current latest version or the preset version of the flow control policy; if not, it can be determined that the virtual machine does not support the current latest version or the preset version of the flow control policy. .
  • the determining, by the preload server, whether the virtual machine supports the current latest version or the preset version of the traffic control policy according to the description of the traffic control capability may include: comparing the description of the traffic control capability to describe the virtual machine support. Whether each version of the k (positive integer) versions of the executed flow control policy is the same as the current latest version or the preset version of the flow control policy.
  • the preload server deployed in the host is used as an example to determine that the VM-m supports the latest current version or the preset version of the traffic control policy. Therefore, the preload server deployed in the host may send a negotiation confirmation indication to the preload client deployed in the virtual machine VM-m, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine VM-m, The traffic confirmation policy of the current latest version or the preset version may be carried in the negotiation confirmation indication.
  • the preload server deployed in the Host also notifies the preload kernel deployed in the Host not to execute the traffic control policy.
  • the preload client deployed in the virtual machine VM-m determines that the negotiated flow control policy executor is the virtual machine VM-m. Therefore, the virtual machine VM-m The pre-loaded client sends the traffic control policy carried in the negotiation confirmation indication to the FE corresponding to the NIC deployed in the VM-m.
  • the execution of the traffic control policy is negotiated between the preload client deployed in the virtual machine VM-m and the preload server deployed in the host by performing steps 703-705.
  • the FE corresponding to the network card deployed in the virtual machine VM-m forwards the to-be-transferred packet sent by the user-mode application deployed in the VM-m based on the received traffic control policy. deal with.
  • the traffic control policy is a service quality based traffic control policy or an access control list based traffic control policy.
  • the QoS-based traffic control policy is based on the service priority of the packet to be forwarded to determine the specific forwarding processing mode of the packet.
  • the specific forwarding processing mode may be delayed sending of packets or delayed transmission. Packets or discarded packets, etc.). For example, if there are multiple packets to be forwarded in the current cache, the packet transmission delay with the higher priority of the corresponding service may be shorter or even no delay. The lower the packet priority of the corresponding service, the longer the packet transmission delay may be. It is even possible to discard the quality of service guaranteed for high priority services.
  • the traffic control policy based on the ACL is mainly based on whether the information carried in the packet to be forwarded and the record included in the ACL are matched to determine the specific forwarding processing mode of the packet.
  • the access control list is restricted access control list (like blacklist), for to be forwarded If the source/destination address of the packet, the application layer protocol type, the transport layer protocol type, and/or the specific keyword included in the packet header are processed, if there is a record matching the access control list, the candidate
  • the forwarding processing of the forwarding processing packet may be directly discarding, and vice versa, the source/destination address of the packet to be forwarded, the application layer protocol type, the transport layer protocol type, and/or the keyword included in the packet header.
  • the forwarding process of the packet to be forwarded may be forwarded.
  • the access control list is an access control list (like a whitelist)
  • the source/destination address, the application layer protocol type, the transport layer protocol type, and/or the packet header of the packet to be forwarded are included.
  • the information about the specific keyword and the like, if the access control list does not have a matching record, the forwarding processing of the packet to be forwarded may be directly discarded.
  • the forwarding processing manner of the packet to be forwarded may be forwarding the packet. Other cases and so on.
  • the FE corresponding to the network card deployed in the virtual machine VM-m discards the FE corresponding to the network card deployed in the virtual machine VM-m from the user-mode application deployed in the virtual machine VM-m.
  • the processed message; or the FE corresponding to the network card deployed in the VM-m of the virtual machine has a delay (the delay may be related to the service priority of the packet to be forwarded and the number of packets to be forwarded).
  • the packet to be forwarded by the user-mode application deployed in the VM-m; or the FE corresponding to the NIC deployed in the VM-m, without delay, sending the user-mode application deployed from the VM-m Forwarding processed packets, other methods are not listed here.
  • the BE corresponding to the NIC deployed in the host receives the FE from the NIC deployed in the VM-m, it forwards the received packet to the preload kernel deployed in the host.
  • the preload kernel deployed in the host does not need to implement the traffic control policy. Therefore, the preload kernel deployed in the host can directly forward the received packets to the NIC through the NIC driver. The NIC forwards the received packets accordingly.
  • the preload client may periodically send a heartbeat message to the preload server based on the connection.
  • one of the purposes of sending a heartbeat message is to make the virtual machine VM-m work normally.
  • the status informs the preload server that if the preload server does not receive the heartbeat message from the preload client within the set duration, the preload server may default to VM-m may be faulty.
  • the preload server may use the traffic control policy.
  • the executor switches to the above Host (that is, whether the FE corresponding to the NIC deployed in the VM-m is forwarded based on the traffic control policy, and the preload kernel is based on the traffic control policy.
  • the packet of the VM-m is forwarded.
  • the host and the VM-m perform the same traffic control policy. Therefore, if the same packet flows, the preload kernel and/or the VM-m are deployed.
  • the FE corresponding to the NIC performs the same flow control policy, and the output of the final message of the preload kernel is basically the same.
  • the indication message that the executor of the flow control policy is switched to the host may be sent to the preload client.
  • the preload client may also perform a flow control policy on the FE corresponding to the NIC deployed in the virtual machine VM-m.
  • an indication message for instructing the virtual machine VM-m to perform a flow control policy failure is sent to the preload server.
  • the preload server after determining that the executor of the negotiated flow control policy is the virtual machine, if receiving an indication message from the preload client for instructing the virtual machine VM-m to perform a flow control policy failure, the preload server
  • the executor of the flow control policy can be switched to the Host, and the preload server can notify the preload kernel to execute the flow control policy.
  • the preload server may also send the query to the preload client periodically or aperiodically.
  • the virtual machine VM-m performs a status query message indicating whether the flow control policy is normal, and does not receive the status indication message from the preload client for responding to the status query message within the set duration, or receives the message from the preload client.
  • Instructing the virtual machine VM-m to perform a flow control policy failure may determine that the virtual machine VM-m performs a flow control policy failure.
  • the preload server can also monitor whether the virtual machine VM-m performs a flow control policy failure by other means. If it is determined that the virtual machine VM-m performs the flow control policy failure, the preload server may switch the executor of the flow control policy to the host, and the preload server may notify the preload. Kemel performs a flow control strategy.
  • the preload kernel After being notified of the execution of the flow control policy, the preload kernel forwards the to-be-processed processing packet from the virtual machine VM-m based on the foregoing flow control policy.
  • the mechanism for the virtual machine and the host to negotiate the flow control policy executor is introduced, so that both the virtual machine and the host have the opportunity to become the flow control policy executor, which enables the virtual machine flow control policy to be executed.
  • This becomes possible which is beneficial to the flow control of the packet flow as early as possible, which is beneficial to reduce invalid processing and reduce the occupation of bandwidth and host address space by invalid packet traffic.
  • the foregoing solution is beneficial to reduce the occupation of the packet address in the outbound direction of the virtual machine.
  • the flow control policy executor is determined through negotiation, it is beneficial to improve the reliability of the flow control policy execution.
  • the virtual machine when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy.
  • FIG. 8 is a schematic flowchart diagram of another packet flow control method according to another embodiment of the present invention.
  • FIG. 5-b is a schematic structural diagram of a computing node that can be used to implement the traffic control method shown in FIG. 8 according to an embodiment of the present invention.
  • Figure 5 - b illustrates a specific internal logical architecture of the Host and virtual machine deployed in the compute node.
  • the Host and the virtual machine may also have other internal logical architectures different from the example shown in Figure 5-b.
  • the flow control method is mainly described as an example in the architecture shown in FIG. 5-b.
  • another packet flow control method provided by another embodiment of the present invention may include the following contents:
  • the preload client deployed in the virtual machine VM-m establishes a connection with the preload server deployed in the host. Wherein the connection transmits a control protocol connection or other type of communication connection.
  • step 601 may also be omitted.
  • the preload client deployed in the virtual machine VM-m sends an executive negotiation request that carries the description information of the flow control capability of the virtual machine VM-m to the preload server deployed in the host.
  • the preload server deployed in the host in step 802 sends a negotiation start request to the preload client deployed in the VM-m.
  • the main purpose is to trigger the preload client deployed in the VM-m to initiate the negotiation flow control policy.
  • the preload client deployed in the virtual machine VM-m may also be triggered by other conditions (for example, receiving a negotiation start request initiated by the user state process (ie, may be triggered by a user mode application or a user instruction)) Initiate a negotiation flow control policy executor. If the preload client deployed in the virtual machine VM-m initiates the negotiation of the traffic control policy enforcement, step 802 may be omitted.
  • the preload server deployed in the host receives an executive negotiation request that carries the description information of the flow control capability of the virtual machine VM-m.
  • the description of the traffic control capability carried in the executor negotiation request is used to indicate that the virtual machine VM-m supports the version of the traffic control policy. Therefore, the preload server deployed in the host can describe the traffic control capability.
  • the information determines whether the virtual machine VM-m supports the current latest version or the preset version of the flow control policy.
  • the description information of the traffic control capability is used to describe the version of the traffic control policy supported by the virtual machine, and the preload server determines whether the virtual machine is based on the description information of the traffic control capability.
  • the flow control policy that supports the current version or the preset version may include: comparing the description of the traffic control capability to describe whether the version of the traffic control policy supported by the virtual machine is current and the latest version of the traffic control policy or The preset version is the same. If yes, it can be determined that the virtual machine supports the current latest version or the preset version of the flow control policy; if not, it can be determined that the virtual machine does not support the current latest version or the preset version of the flow control policy. .
  • the determining, by the preload server, whether the virtual machine supports the current latest version or the preset version of the traffic control policy according to the description of the traffic control capability may include: comparing the description of the traffic control capability to describe the virtual machine support. Whether each version of the k (positive integer) versions of the executed flow control policy is the same as the current latest version or the preset version of the flow control policy. If one of the above k versions is compared with one of the above versions If the current version or the preset version of the traffic control policy is the same, you can determine that the VM supports the current latest version or the preset version of the traffic control policy. If any one of the k versions is different from the current version or the preset version of the flow control policy, it may be determined that the virtual machine does not support the current latest version or the preset version of the flow control policy.
  • the preload server deployed in the host is used as an example to determine that the VM-m does not support the current version or the default version of the traffic control policy. Therefore, the preload server deployed in the host may send a negotiation denial indication to the preload client deployed in the virtual machine VM-m, where the negotiation denial indication is used to indicate that the negotiated flow control policy executor is the foregoing Host.
  • the preload server deployed in the Host also informs the sub-loaded kernel (reload kernel) deployed in the Host to execute the flow control policy.
  • the preload client deployed in the virtual machine VM-m receives the negotiation denial indication sent by the preload server deployed in the host, and determines that the negotiated flow control policy executor is the foregoing Host. Therefore, the preload deployed in the VM-m is configured.
  • the client notifies the FE corresponding to the NIC deployed in the VM-m to not perform the traffic control policy.
  • the execution of the traffic control policy is negotiated between the preload client deployed in the virtual machine VM-m and the preload server deployed in the host by performing steps 803 to 805.
  • the FE corresponding to the NIC deployed in the VM-m forwards the packets to be forwarded from the user-mode application deployed in the VM-m.
  • the FE corresponding to the NIC deployed in the VM-m does not control the forwarding of packets.
  • the BE corresponding to the NIC deployed in the host receives the FE packet corresponding to the NIC deployed in the VM-m, the packet is forwarded to the preload kernel deployed in the host.
  • the preload kernel forwards the received packet based on the traffic control policy.
  • the traffic control policy is a service quality based traffic control policy or an access control list based traffic control policy.
  • the QoS-based traffic control policy is based on the service priority of the packet to be forwarded to determine the specific forwarding processing mode of the packet.
  • the specific forwarding processing mode may be delayed sending of packets or delayed transmission. Packets or discarded packets, etc.). For example, if there are multiple packets to be forwarded in the current cache, the packet transmission delay with the higher priority of the corresponding service may be shorter or even no delay. The lower the packet priority of the corresponding service, the longer the packet transmission delay may be. Can even discard the right The quality of service for high priority services is guaranteed.
  • the traffic control policy based on the ACL is mainly based on whether the information carried in the packet to be forwarded and the record included in the ACL are matched to determine the specific forwarding processing mode of the packet.
  • the access control list is a restricted access control list (like a blacklist), a source/destination address of the packet to be forwarded, an application layer protocol type, a transport layer protocol type, and/or a specific keyword included in the header. If the information in the ACL is matched, the forwarding processing of the packet to be forwarded may be directly discarded. Otherwise, the source/destination address of the packet to be forwarded and the application layer protocol.
  • the forwarding processing of the packet to be forwarded may be forwarded.
  • the access control list is an access control list (like a whitelist)
  • the source/destination address, the application layer protocol type, the transport layer protocol type, and/or the packet header of the packet to be forwarded are included.
  • the information about the specific keyword and the like, if the access control list does not have a matching record, the forwarding processing of the packet to be forwarded may be directly discarded.
  • the forwarding processing manner of the packet to be forwarded may be forwarding the packet. Other cases and so on.
  • the preloading of the packet to be forwarded by the preloading kernel based on the current latest version or the preset version of the traffic control policy may include: preloading the kernel to discard the to-be-forwarded processing from the virtual machine VM-m
  • the packet is sent by the virtual machine VM-m to be forwarded by the preloading kernel; or the preloading kernel has a delay (the delay may be related to the service priority of the packet to be forwarded and the number of packets to be forwarded); or
  • the preload kernel sends the packets to be forwarded from the virtual machine VM-m without delay.
  • the other methods are not listed here.
  • the NIC If the NIC receives the packet sent by the preload kernel through the NIC driver, the NIC forwards the received packet accordingly.
  • the mechanism for the virtual machine and the host to negotiate the flow control policy executor is introduced, so that both the virtual machine and the host have the opportunity to become the flow control policy executor, which enables the virtual machine flow control policy to be executed. It becomes possible, which is beneficial to the flow control of the message flow as early as possible, which is beneficial to reduce invalid processing and reduce invalid packet traffic to bandwidth and host address. Occupy between. It can be seen that the foregoing solution is beneficial for reducing the occupation of the packet address in the outbound direction of the virtual machine to the host address space. Moreover, since the flow control policy executor is determined through negotiation, it is beneficial to improve the reliability of the flow control policy execution.
  • the virtual machine when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy.
  • the virtual machine and the Host adopt a modular architecture design, which is beneficial to improving the adaptability of the product in a complex application environment and reducing the upgrade cost of the environment migration.
  • a virtual machine 900 provided by an embodiment of the present invention may include: a first negotiating unit 910 and a message processing unit 920.
  • the first negotiating unit 910 is configured to negotiate an execution party of the traffic control policy between the virtual machine 900 and the host based on the traffic control capability of the virtual machine.
  • the message processing unit 920 is configured to: if the executor of the negotiated flow control policy is the virtual machine, forward the packet to be forwarded based on the traffic control policy; and determine the execution of the negotiated traffic control policy.
  • the host is the host, and the packet to be forwarded is sent to the host, so that the host performs forwarding processing on the received packet based on the traffic control policy.
  • the first negotiating unit 910 may be specifically configured to: send, to the Host, an executive negotiation request that carries the description information of the flow control capability of the virtual machine, and if the host receives the traffic control capability according to the foregoing The description information determines that the virtual machine supports the negotiation confirmation indication sent after the execution of the flow control policy, and determines that the negotiated flow control policy executor is the virtual machine; if the host receives the description information according to the flow control capability, The virtual machine does not support the negotiation denial indication sent after the flow control policy is executed, and determines that the negotiated flow control policy executor is the foregoing Host;
  • the first negotiating unit 910 may be specifically configured to send, to the Host, traffic control capability that carries the virtual machine.
  • the execution party negotiation request of the description information of the force wherein the description information of the flow control capability is used to describe a version of the flow control policy supported by the virtual machine, and if the host receives the description information according to the flow control capability,
  • the virtual machine supports the negotiation confirmation indication sent after the current latest version or the preset version of the flow control policy, and determines that the negotiated flow control policy executor is the virtual machine; if the host receives the traffic control capability according to the foregoing Determining, by the description information, that the virtual machine does not support the negotiation of the current latest version or the preset version of the flow control policy, and determines that the negotiated flow control policy executor is the foregoing Host;
  • the first negotiating unit 910 may be configured to: send, to the Host, an executive negotiation request that carries the description information of the traffic control capability of the virtual machine, and if the host receives the description information according to the traffic control capability, determine that the virtual machine supports execution. After the flow control policy sends a negotiation confirmation indication, it is determined that the negotiated flow control policy executor is the virtual machine; if the host does not receive the negotiation sent by the host for responding to the executor negotiation request within the first set duration Confirming the indication, determining that the negotiated flow control policy executor is the above Host;
  • the first negotiating unit 910 may be configured to: send, to the Host, an executive negotiation request that carries the description information of the traffic control capability of the virtual machine, where the description information of the traffic control capability is used to describe the traffic supported by the virtual machine.
  • the version of the control policy determines the negotiated flow control after receiving the negotiation confirmation indication sent by the host after determining that the virtual machine supports executing the current latest version or the preset version of the flow control policy according to the description information of the traffic control capability.
  • the policy executor is the virtual machine; if the negotiation confirmation indication sent by the host for responding to the executor negotiation request is not received within the first set duration, it is determined that the negotiated flow control policy executor is the foregoing Host ;
  • the first negotiating unit 910 may be configured to: send, to the Host, an executive negotiation request that carries the description information of the traffic control capability of the virtual machine, and if the host receives the description information according to the traffic control capability, determine that the virtual machine does not support After the negotiation of the flow control policy is performed, the negotiation of the flow control policy is determined to be the host; if the host is not received within the second set time, the negotiation sent by the host for responding to the request for the execution of the negotiation is not received. Denied the instruction, then confirm The negotiated flow control policy executor is the above virtual machine;
  • the first negotiating unit 910 may be configured to: send, to the Host, an executive negotiation request that carries the description information of the traffic control capability of the virtual machine, where the description information of the traffic control capability is used to describe the traffic supported by the virtual machine.
  • the version of the control policy determines the negotiated flow control after receiving the negotiation denial indication sent by the host after determining that the virtual machine supports executing the current latest version or the preset version of the flow control policy according to the description information of the traffic control capability.
  • the policy executor is the above Host; if the negotiation denial indication sent by the host for responding to the executor negotiation request is not received within the second set duration, it is determined that the negotiated flow control policy executor is the virtual machine .
  • the Host may determine the virtual machine 900 according to the description information of the traffic control capability. Whether the implementation of the flow control policy of the latest version or the preset version is supported, and the following may include: comparing the description of the flow control capability to describe whether the version of the flow control policy supported by the virtual machine 900 is current and the latest of the flow control policy.
  • the version of the virtual machine 900 supports the current latest version or the preset version of the flow control policy; if not, the virtual machine 900 does not support the current latest version or the preset version. Traffic control strategy.
  • the determining, by the Host, whether the virtual machine 900 supports the current latest version or the preset version of the traffic control policy according to the description of the traffic control capability may include: comparing the description information of the traffic control capability to describe the virtual machine.
  • the version of the k (positive integer) version of the flow control policy supported by the 900 is the same as the current latest version or the preset version of the flow control policy.
  • the version is the same as the current version or the preset version of the flow control policy, it may be determined that the virtual machine 900 supports the current latest version or the preset version of the flow control policy; if any one of the above k versions is compared with If the current version or the preset version of the flow control policy is different, it may be determined that the virtual machine 900 does not support the current latest version or the preset version of the flow control policy.
  • the virtual machine 900 may further include:
  • a sending unit (not shown in FIG. 9) for determining an execution party of the negotiated flow control policy After being the virtual machine, periodically send a heartbeat message to the host.
  • the traffic control policy mentioned in this embodiment may be, for example, a quality of service based traffic control policy and/or an access control list based traffic control policy.
  • the traffic control policy may also be a traffic control policy that refers to other factors.
  • the QoS-based traffic control policy is based on the service priority of the packet to be forwarded to determine the specific forwarding processing mode of the packet.
  • the specific forwarding processing mode may be delayed sending of packets or delayed transmission. Packets or discarded packets, etc.). For example, if there are multiple packets to be forwarded in the current cache, the packet transmission delay with the higher priority of the corresponding service may be shorter or even no delay. The lower the packet priority of the corresponding service, the longer the packet transmission delay may be. It is even possible to discard the quality of service guaranteed for high priority services. That is, the forwarding of the packet to be forwarded by the QoS-based traffic control policy may include: forwarding the packet to be forwarded according to the forwarding processing mode corresponding to the service priority of the packet to be forwarded.
  • the traffic control policy based on the ACL is mainly based on whether the information carried in the packet to be forwarded and the record included in the ACL are matched to determine the specific forwarding processing mode of the packet.
  • the access control list is a restricted access control list (like a blacklist), a source/destination address of the packet to be forwarded, an application layer protocol type, a transport layer protocol type, and/or a specific keyword included in the header. If the information in the ACL is matched, the forwarding processing of the packet to be forwarded may be directly discarded. Otherwise, the source/destination address of the packet to be forwarded and the application layer protocol.
  • the forwarding processing of the packet to be forwarded may be forwarded.
  • the access control list is an access control list (like a whitelist)
  • the source/destination address, the application layer protocol type, the transport layer protocol type, and/or the packet header of the packet to be forwarded are included.
  • the forwarding processing of the packet to be forwarded may be directly discarded, and the source/destination address of the packet to be forwarded is
  • the information of the application layer protocol type, the transport layer protocol type, and/or the keyword included in the packet header may be forwarded by the forwarding control packet if the ACL is matched.
  • the message may be forwarded.
  • the functions of the modules of the virtual machine 900 in this embodiment may be specifically implemented according to the method described in the foregoing method embodiments. For the specific implementation process, refer to the related description in the foregoing embodiments, and details are not described herein again.
  • the mechanism for the virtual machine and the host to negotiate the flow control policy executor is introduced, so that both the virtual machine and the host have the opportunity to become the flow control policy executor, which enables the virtual machine flow control policy to be executed.
  • This becomes possible which is beneficial to the flow control of the packet flow as early as possible, which is beneficial to reduce invalid processing and reduce the occupation of bandwidth and host address space by invalid packet traffic.
  • the foregoing solution is beneficial to reduce the occupation of the packet address in the outbound direction of the virtual machine.
  • the flow control policy executor is determined through negotiation, it is beneficial to improve the reliability of the flow control policy execution.
  • the virtual machine when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy.
  • the embodiment of the present invention further provides a host 1000, which may include: a second negotiating unit 1010 and a message processing unit 1020.
  • the second negotiating unit 1010 is configured to negotiate an execution party of the traffic control policy between the virtual machine and the host 1000 based on the traffic control capability of the virtual machine.
  • the message processing unit 1020 is configured to: if it is determined that the executed party of the negotiated flow control policy is the host, after receiving the message from the virtual machine, forwarding the received message according to the traffic control policy deal with.
  • the second negotiating unit 1010 may be specifically configured to receive, by the virtual machine, an executive negotiation request that carries the description information of the traffic control capability of the virtual machine, if the description information of the traffic control capability is used according to the foregoing Determining that the virtual machine supports the execution of the flow control policy, and sending a negotiation confirmation indication to the virtual machine, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or, according to the foregoing flow control capability
  • the description information determines that the virtual machine does not support the execution of the traffic control policy, and sends a negotiation denial indication to the virtual machine, where the foregoing association
  • the quotient denied indication is used to indicate that the negotiated flow control policy executor is the above host.
  • the second negotiating unit 1010 is specifically configured to receive, by the virtual machine, an executive negotiation request that carries the description information of the flow control capability of the virtual machine, where the traffic control capability is The description information is used to describe the version of the flow control policy supported by the virtual machine. If the virtual machine supports the current latest version or the preset version of the flow control policy according to the description of the flow control capability, the virtual machine is added to the virtual machine. Sending a negotiation confirmation indication, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or, if the description of the flow control capability is determined, the virtual machine does not support performing the current latest version. Or the default version of the traffic control policy sends a negotiation denial indication to the virtual machine, where the negotiated denial indication is used to indicate that the negotiated flow control policy executor is the host.
  • the second negotiation unit 1010 may determine the foregoing according to the description information of the traffic control capability. Whether the virtual machine supports the current latest version or the preset version of the flow control policy may specifically include: comparing the description information of the foregoing flow control capability to describe whether the version of the flow control policy supported by the virtual machine is current and the current of the flow control policy The latest version or the preset version is the same. If yes, it can be determined that the virtual machine supports the current latest version or the preset version of the flow control policy; if not, it can be determined that the virtual machine does not support the current latest version or the preset version. Traffic control strategy.
  • the second negotiation unit 1010 may determine, according to the description information of the traffic control capability, whether the virtual machine supports the current latest version or the preset version of the traffic control policy, which may include: comparing the description information of the traffic control capability to describe the foregoing Whether each version of the k (positive integer) versions of the flow control policy supported by the virtual machine is the same as the current latest version or the default version of the flow control policy.
  • the virtual machine supports the current latest version or the preset version of the flow control policy; if any one of the above k versions is compared with If the current version or the preset version of the traffic control policy is different, you can determine that the VM does not support the current or latest version of the traffic control policy.
  • the message processing unit 1020 is further configured to determine the negotiated flow. After the executor of the quantity control policy is the virtual machine, if the heartbeat message from the virtual machine is not received within the set time period, an indication message indicating that the flow control policy executor switches to the host is sent to the virtual machine.
  • the policy may be, for example, a quality of service based traffic control policy and/or a traffic control policy based on an access control list. Of course, the traffic control policy may also be a traffic control policy that refers to other factors.
  • the QoS-based traffic control policy is based on the service priority of the packet to be forwarded to determine the specific forwarding processing mode of the packet.
  • the specific forwarding processing mode may be delayed sending of packets or delayed transmission. Packets or discarded packets, etc.). For example, if there are multiple packets to be forwarded in the current cache, the packet transmission delay with the higher priority of the corresponding service may be shorter or even no delay. The lower the packet priority of the corresponding service, the longer the packet transmission delay may be. It is even possible to discard the quality of service guaranteed for high priority services. That is, the forwarding of the packet to be forwarded by the QoS-based traffic control policy may include: forwarding the packet to be forwarded according to the forwarding processing mode corresponding to the service priority of the packet to be forwarded.
  • the traffic control policy based on the ACL is mainly based on whether the information carried in the packet to be forwarded and the record included in the ACL are matched to determine the specific forwarding processing mode of the packet.
  • the access control list is a restricted access control list (like a blacklist), a source/destination address of the packet to be forwarded, an application layer protocol type, a transport layer protocol type, and/or a specific keyword included in the header. If the information in the ACL is matched, the forwarding processing of the packet to be forwarded may be directly discarded. Otherwise, the source/destination address of the packet to be forwarded and the application layer protocol.
  • the forwarding processing of the packet to be forwarded may be forwarded.
  • the access control list is an access control list (like a whitelist)
  • the source/destination address, the application layer protocol type, the transport layer protocol type, and/or the packet header of the packet to be forwarded are included.
  • the forwarding processing of the packet to be forwarded may be directly discarded, and the source/destination address of the packet to be forwarded is Information such as the application layer protocol type, the transport layer protocol type, and/or the keywords contained in the packet header, if the access control list is allowed to have
  • the forwarding processing manner of the packet to be forwarded may be forwarding the packet. Other cases and so on.
  • the mechanism for the virtual machine and the host to negotiate the flow control policy executor is introduced, so that both the virtual machine and the host have the opportunity to become the flow control policy executor, which enables the virtual machine flow control policy to be executed.
  • This becomes possible which is beneficial to the flow control of the packet flow as early as possible, which is beneficial to reduce invalid processing and reduce the occupation of bandwidth and host address space by invalid packet traffic.
  • the above solution is beneficial for reducing the occupation of the packet address in the outbound direction of the virtual machine.
  • the flow control strategy executor is determined through negotiation, it is beneficial to improve the reliability of the flow control strategy execution.
  • the virtual machine when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially executed to perform the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing invalid processing and invalidation.
  • the bandwidth usage of packet traffic when both the virtual machine and the host support the execution of the flow control policy.
  • an embodiment of the present invention further provides a computing node 1100, which may include: a hardware layer 1110, a host 1102 running on the hardware layer, and at least one virtual machine 1103 running on the host 1102. .
  • the virtual machine 1103 is configured to negotiate the execution of the traffic control policy between the virtual machine 1103 and the host 1102 based on the traffic control capability of the virtual machine 1103; and determine that the negotiated flow control policy executive is the virtual machine.
  • the packet to be forwarded and processed is sent to the host 1102 based on the above-mentioned traffic control policy; if the executor of the negotiated flow control policy is determined to be the host 1102, the message to be forwarded is sent to the host 1102;
  • the host 1102 is configured to: after determining that the negotiated flow control policy executor is the host 1102, after receiving the packet from the virtual machine, forwarding the received packet according to the traffic control policy. deal with.
  • the virtual machine in the aspect of negotiating the execution of the flow control policy between the virtual machine 1103 and the host 1102 based on the flow control capability of the virtual machine 1103, the virtual machine is specifically used to the host machine. 1102: Send an implementation negotiation request that carries the description information of the flow control capability of the virtual machine, and if the host device 1102 receives the negotiation confirmation indication sent after the virtual machine supports the execution of the flow control policy according to the description information of the traffic control capability.
  • the virtual machine Determining that the negotiated flow control policy executor is the virtual machine; if the host machine 1102 receives the negotiation denial indication sent after the virtual machine does not support the execution of the flow control policy according to the description information of the traffic control capability, Determining that the negotiated flow control policy executor is the host 1102; or, in the aspect of negotiating the execution of the flow control policy between the virtual machine 1103 and the host 1102 based on the flow control capability of the virtual machine 1103, the virtual The machine is specifically configured to send and carry to the host machine 1102.
  • An execution party negotiation request for describing the flow control capability of the virtual machine where the description information of the flow control capability is used to describe a version of the flow control policy supported by the virtual machine, and if the host 1102 is received, Determining, by the foregoing description, the flow control capability, the negotiation confirmation indication sent by the virtual machine after executing the current latest version or the preset version of the flow control policy, determining that the negotiated flow control policy executor is the virtual machine;
  • the host 1102 determines, according to the description information of the traffic control capability, that the virtual machine does not support the negotiation of the current latest version or the preset version of the traffic control policy, and determines that the negotiated flow control policy executor is the foregoing Host 1102;
  • the virtual machine is specifically configured to send the virtual machine to the host 1102.
  • the executor negotiation request of the description information of the flow control capability if the host machine 1102 receives the negotiation confirmation indication sent after the virtual machine supports the execution of the flow control policy according to the description information of the flow control capability, determining the negotiated traffic
  • the control policy executor is the virtual machine; if the negotiation confirmation indication sent by the host 1102 for responding to the executor negotiation request is not received within the first set duration, it is determined that the negotiated flow control policy executor is The host machine 1102 above;
  • the virtual machine is specifically configured to send the virtual machine to the host 1102.
  • An executive negotiation request for description information of the flow control capability The description of the traffic control capability is used to describe the version of the traffic control policy supported by the virtual machine. If the host 1102 receives the description information according to the traffic control capability, the virtual machine supports the latest version.
  • the negotiation confirmation indication sent after the preset version of the flow control policy determines that the negotiated flow control policy executor is the virtual machine; if the host machine 1102 sends the received information within the first set duration, Responding to the negotiation confirmation indication of the above-mentioned executive negotiation request, determining that the negotiated flow control policy executor is the host 1102; or, between the virtual machine 1103 and the host 1102, based on the flow control capability of the virtual machine 1103
  • the virtual machine is specifically configured to send, to the host 1102, an executive negotiation request that carries the description information of the flow control capability of the virtual machine, and if the host 1102 is received, Determining the above virtual according to the description information of the flow control capability described above The machine does not support the negotiation denial indication sent after the execution of the flow control policy, and determines that the negotiated flow control policy executor is the host 1102; if the host 1102 does not receive the response sent by the host 1102 within the second set duration Determining the
  • the virtual machine 1103 is specifically configured to send, to the host 1102, an executive negotiation request that carries the description information of the flow control capability of the virtual machine, where the flow control is performed by the executor of the executor of the flow control policy.
  • the description of the capability is used to describe the version of the flow control policy supported by the virtual machine. If the host 1102 receives the description information according to the traffic control capability, the virtual machine supports the current latest version or the preset version. After the flow control policy sends a negotiation denial indication, it is determined that the negotiated flow control policy executor is the host 1102; if the host 1102 is not received within the second set duration, the responsive to the executor If the negotiation denial indication of the negotiation request is performed, it is determined that the negotiated flow control policy executor is the virtual machine.
  • the host 1102 may receive an execution party negotiation request that is sent by the virtual machine and carry the description information of the flow control capability of the virtual machine, and determine the virtual machine according to the description information of the traffic control capability.
  • Supporting the execution of the flow control policy sending a negotiation confirmation indication to the virtual machine, where the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or, if determined according to the description information of the flow control capability
  • the above virtual machine does not support And executing the flow control policy, sending a negotiation denial indication to the virtual machine, where the negotiation denial indication is used to indicate that the negotiated flow control policy executor is the host.
  • the host 1102 may receive an executive negotiation request that is sent by the virtual machine and carries the description information of the flow control capability of the virtual machine, where the description information of the flow control capability is used to describe And the version of the flow control policy that is supported by the virtual machine, if the virtual machine supports the current latest version or the preset version of the flow control policy according to the description of the flow control capability, sending a negotiation confirmation indication to the virtual machine, where The foregoing negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine; and/or, if the description of the flow control capability is determined, the virtual machine does not support performing the current latest version or the preset version of the traffic. And the control policy sends a negotiation denial indication to the virtual machine, where the negotiation denial indication is used to indicate that the negotiated flow control policy executor is the host.
  • the host 1102 may determine the virtual machine according to the description information of the traffic control capability.
  • the flow control policy of the latest version or the preset version is supported, and may include: comparing the description of the flow control capability to describe whether the version of the flow control policy supported by the virtual machine is current and the latest version of the flow control policy. Or the preset version is the same, if yes, it may be determined that the virtual machine supports the current latest version or the preset version of the flow control policy; if not, it may be determined that the virtual machine does not support the current latest version or the preset version of the flow control Strategy.
  • the determining, by the host device 1102, whether the virtual machine supports the current latest version or the preset version of the traffic control policy according to the description information of the traffic control capability may include: comparing the description information of the traffic control capability to describe the virtual Whether each version of the k (positive integer) versions of the flow control policy supported by the machine is the same as the current latest version or the default version of the flow control policy. If one of the above k versions is compared, If the version is the same as the current version or the default version of the traffic control policy, you can determine that the VM supports the current latest version or the default version of the traffic control policy. If you compare any of the above k versions with the traffic. If the current version or the preset version of the control policy is different, it may be determined that the virtual machine does not support the current latest version or the preset version of the flow control policy.
  • the host 1102 is further configured to: after determining that the executed party of the negotiated flow control policy is the virtual machine, if the virtual machine is not received within the set duration
  • the heartbeat message of the machine sends an indication message to the virtual machine for instructing the flow control policy executor to switch to the host 1102.
  • the negotiation confirmation indication may include the flow control policy, where the virtual machine performs forwarding processing on the packet to be forwarded based on the flow control policy, The virtual machine is specifically configured to perform forwarding processing on the packet to be forwarded according to the traffic control policy included in the negotiation confirmation indication.
  • the host 1102 can also pass the flow control policy to the virtual machine in other manners, so that the virtual machine 1103 can determine the flow control policy based on the host 1102 after determining that the negotiated flow control policy executor is the virtual machine. Forwards the packets to be forwarded.
  • the flow control policy may be pre-configured in the virtual machine 1103.
  • the virtual machine 1103 determines that the negotiated flow control policy executor is the virtual machine 1103, the virtual machine 1103 processes the report based on the pre-configured flow control policy. The text is forwarded.
  • the virtual machine 1102 is specifically configured to receive the user state in the aspect that the virtual machine 1102 sends an execution party negotiation request carrying the description information of the flow control capability of the virtual machine 1102 to the host 1102. After the process initiated the negotiation initiation request, the host 1102 transmits an executive negotiation request carrying the description information of the flow control capability of the virtual machine 1102; or, after receiving the negotiation initiation request from the host 1102, the host 1102 is sent to the host 1102. An executor negotiation request carrying description information of the flow control capability of the virtual machine 1102.
  • the traffic control policy on which the host 1102 or the virtual machine 1102 processes the packet to be forwarded in the embodiment may be, for example, a quality of service based traffic control policy and/or an access control list based traffic control policy.
  • the above flow control strategy may also be a flow control strategy that refers to other factors.
  • the QoS-based traffic control policy is based on the service priority of the packet to be forwarded to determine the specific forwarding processing mode of the packet.
  • the specific forwarding processing mode may be delayed sending of packets or delayed transmission. Packets or discarded packets, etc.). For example, if there are multiple packets to be forwarded in the current cache, the packet transmission delay with the higher priority of the corresponding service may be shorter or even no delay. The lower the packet priority of the corresponding service, the longer the packet transmission delay may be. It is even possible to discard the quality of service guaranteed for high priority services. That is, the quality of service based traffic control policy is forwarded
  • the forwarding of the processed packet may include: forwarding the packet to be forwarded according to the forwarding processing manner corresponding to the service priority of the packet to be forwarded.
  • the traffic control policy based on the ACL is mainly based on whether the information carried in the packet to be forwarded and the record included in the ACL are matched to determine the specific forwarding processing mode of the packet.
  • the access control list is a restricted access control list (like a blacklist), a source/destination address of the packet to be forwarded, an application layer protocol type, a transport layer protocol type, and/or a specific keyword included in the header. If the information in the ACL is matched, the forwarding processing of the packet to be forwarded may be directly discarded. Otherwise, the source/destination address of the packet to be forwarded and the application layer protocol.
  • the forwarding processing of the packet to be forwarded may be forwarded.
  • the access control list is an access control list (like a whitelist)
  • the source/destination address, the application layer protocol type, the transport layer protocol type, and/or the packet header of the packet to be forwarded are included.
  • the forwarding processing of the packet to be forwarded may be directly discarded, and the source/destination address of the packet to be forwarded is
  • the information of the application layer protocol type, the transport layer protocol type, and/or the keyword included in the packet header may be forwarded by the forwarding control packet if the ACL is matched. The message. Other cases and so on.
  • the mechanism for the virtual machine and the host to negotiate the flow control policy executor is introduced in the computing node 1100, so that both the virtual machine and the host have the opportunity to become the flow control policy executor, which is performed by the execution.
  • the virtual machine flow control policy becomes possible. This facilitates the flow control of the packet flow as early as possible, which is beneficial to reduce invalid processing and reduce the occupation of bandwidth and host address space by invalid packet traffic. It can be seen that the foregoing solution is beneficial for reducing the occupation of the packet address of the virtual machine in the outgoing direction of the virtual machine. Moreover, since the flow control policy executor is determined through negotiation, it is beneficial to improve the reliability of the flow control policy execution.
  • the virtual machine when both the virtual machine and the host support the execution of the flow control policy, the virtual machine is preferentially
  • the traffic control policy is implemented, which further facilitates traffic control of packets as early as possible, thereby further reducing the bandwidth usage of invalid processing and invalid packet traffic.
  • FIG. 12 depicts a structure of a computing node 1200 provided by an embodiment of the present invention, the computing node
  • the 1200 includes: at least one processor 1201, such as a CPU, at least one network interface 1204 or other user interface 1203, memory 1205, at least one communication bus 1202. Communication bus 1202 is used to implement connection communication between these components.
  • the compute node 1200 optionally includes a user interface 1203, including a display, a keyboard, or a pointing device (e.g., a mouse, a trackball, a touchpad, or a touch sensitive display).
  • the memory 1205 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
  • the memory 1205 can optionally include at least one storage device remote from the aforementioned processor 1201.
  • the network interface 1204 includes a physical network card and the like.
  • memory 1205 stores elements, executable modules or data structures, or a subset thereof, or their extended set: host 12051 and at least one virtual machine 12052.
  • the host 12051 may have some or all of the functions of the host as described in the foregoing embodiment, and the virtual machine 12052 may have a part of the virtual machine as described in the above embodiment, as invoked by the processor 1201. Or all features.
  • the virtual machine 12052 is configured to negotiate the execution of the flow control policy between the virtual machine 12052 and the host 12051 based on the flow control capability of the virtual machine;
  • the negotiated flow control policy executor is the virtual machine, and the packet to be forwarded and processed according to the traffic control policy is forwarded; if the executor of the negotiated traffic control policy is determined to be the host 12051, the packet is to be forwarded.
  • the processed message is sent to the host 12051;
  • the host 12051 is configured to be used by the processor 1201 to determine that the negotiated flow control policy executor is the host 12051, and after receiving the packet from the virtual machine 12052, the received traffic control policy is based on the received traffic control policy. The above packet is forwarded.
  • the above virtual machine based on the flow control capability of the virtual machine
  • An aspect of the implementation of the flow control policy between the 12052 and the host 12051 is negotiated by the processor 1201.
  • the virtual machine 12052 is specifically configured to send, to the host 12051, an executive negotiation that carries the description information of the flow control capability of the virtual machine.
  • the request if the receiving host 12051 determines the negotiation confirmation indication sent after the virtual machine supports the execution of the flow control policy according to the description information of the flow control capability, determining that the negotiated flow control policy executor is the virtual machine; Receiving the negotiation denial indication sent by the host 12051 after determining that the virtual machine does not support the execution of the flow control policy according to the description information of the flow control capability, determining that the negotiated flow control policy executor is the host 12051;
  • the virtual machine 12052 is specifically configured to send to the host 12051.
  • An execution party negotiation request carrying the description information of the traffic control capability of the virtual machine, where the description information of the traffic control capability is used to describe a version of the traffic control policy supported by the virtual machine, if the host 12051 is received Determining, according to the description information of the flow control capability, that the virtual machine supports the negotiation confirmation indication sent after executing the current latest version or the preset version of the flow control policy, determining that the negotiated flow control policy executor is the virtual machine; After the host device 12051 determines, according to the description information of the traffic control capability, that the virtual machine does not support the execution of the current latest version or the preset version of the traffic control policy, the host device 12051 determines that the negotiated flow control policy executor is the above Host Machine 12051 ;
  • the implementation of the flow control policy between the 12051 is negotiated by the processor 1201.
  • the virtual machine 12052 is specifically configured to send, to the host 12051, an executive negotiation request that carries the description information of the flow control capability of the virtual machine.
  • the flow control policy executor that is not determined to be determined within the set duration is the above host 12051;
  • the virtual machine is invoked by the processor 1201.
  • the 12052 is specifically configured to send, to the host device 12051, an executive negotiation request that carries the description information of the flow control capability of the virtual machine, where the description information of the traffic control capability is used to describe the flow control policy supported by the virtual machine.
  • a version if the host computer 12051 receives the negotiation confirmation indication sent after the virtual machine supports executing the current latest version or the preset version of the flow control policy according to the description information of the flow control capability, determining the negotiated flow control policy.
  • the executor is the virtual machine; if the negotiation confirmation indication sent by the host 12051 for responding to the executor negotiation request is not received within the first set duration, it is determined that the negotiated flow control policy executor is the above Host 12051;
  • the virtual machine 12052 is specifically configured to send to the host 12051.
  • An executive negotiation request carrying the description information of the flow control capability of the virtual machine, if the receiving host 12051 determines, according to the description information of the traffic control capability, that the virtual machine does not support the negotiation of the flow control policy, Determining that the negotiated flow control policy executor is the host 12051; if the second set duration indication, determining that the negotiated flow control policy executor is the virtual machine;
  • the virtual machine 12052 is specifically configured to send to the host 12051.
  • An execution party negotiation request carrying the description information of the traffic control capability of the virtual machine, where the description information of the traffic control capability is used to describe a version of the traffic control policy supported by the virtual machine, if the host 12051 is received Determining, according to the description information of the traffic control capability, that the virtual machine supports the negotiation of the current latest version or the preset version of the traffic control policy, determining that the negotiated flow control policy executor is the host 12051; If the negotiation denial instruction sent by the host 12051 for responding to the execution party negotiation request is not received within the second set duration, it is determined that the negotiated flow control policy executor is the virtual machine.
  • the host 12051 may be configured according to the traffic control capability according to the foregoing flow control capability. Describe the information to determine whether the above virtual machine supports the current update
  • the traffic control policy of the version or the preset version may include: comparing the description of the traffic control capability to describe whether the version of the traffic control policy supported by the virtual machine is the same as the current latest version or the preset version of the traffic control policy. If yes, it may be determined that the virtual machine supports the current latest version or the preset version of the flow control policy; if not, it may be determined that the virtual machine does not support the current latest version or the preset version of the flow control policy.
  • the flow control policy that the host 12051 can determine, according to the description of the flow control capability, whether the virtual machine supports the current latest version or the preset version may include: comparing the foregoing flow control capability.
  • the description information describes whether each version of the k (positive integer) versions of the flow control policy supported by the virtual machine is the same as the current latest version or the preset version of the flow control policy.
  • the virtual machine supports the current latest version or the preset version of the flow control policy; if the above k versions are compared If any version is different from the current version or the preset version of the flow control policy, it can be determined that the above virtual machine does not support the current latest version or the preset version of the flow control policy.
  • the host 12051 is further configured to: after determining that the executed party of the negotiated flow control policy is the virtual machine, if not received within the set time period, The heartbeat message from the virtual machine sends an indication message to the virtual machine to instruct the traffic control policy executor to switch to the host 12051.
  • the negotiation confirmation indication may include the flow control policy, where the virtual machine performs forwarding processing on the packet to be forwarded based on the flow control policy,
  • the virtual machine 12052 is specifically configured to perform forwarding processing on the packet to be forwarded based on the traffic control policy included in the negotiation confirmation indication.
  • the host 12051 can also pass the traffic control policy to the virtual machine in other manners, so that the virtual machine 12052 treats the negotiated flow control policy performer as the virtual machine, and then treats the traffic control policy based on the host 12051.
  • the packet processed by the forwarding is forwarded.
  • the flow control policy may be pre-configured in the virtual machine 12052.
  • the virtual machine 12052 determines that the negotiated flow control policy executor is the virtual machine 12052, and the virtual machine 12052 processes the forwarding process based on the pre-configured flow control policy.
  • the packet is forwarded.
  • the virtual machine 12051 sends a virtual bearer to the host 12051.
  • the aspect of the executor negotiation request of the description information of the flow control capability of the machine 12051 is invoked by the processor 1201, and the virtual machine 12051 is specifically configured to send the bearer to the host 12051 after receiving the negotiation start request initiated by the user state process.
  • the executor negotiation request of the description information of the flow control capability of the virtual machine 12051; or after receiving the negotiation initiation request from the host 12051, the executor of the description information carrying the flow control capability of the virtual machine 12051 is sent to the host 12051. request.
  • the traffic control policy on which the host 12051 or the virtual machine 12052 processes the packet to be forwarded in this embodiment may be, for example, a quality of service based traffic control policy and/or an access control list based traffic control policy.
  • the above flow control strategy may also be a flow control strategy that refers to other factors.
  • the QoS-based traffic control policy is based on the service priority of the packet to be forwarded to determine the specific forwarding processing mode of the packet.
  • the specific forwarding processing mode may be delayed sending of packets or delayed transmission. Packets or discarded packets, etc.). For example, if there are multiple packets to be forwarded in the current cache, the packet transmission delay with the higher priority of the corresponding service may be shorter or even no delay. The lower the packet priority of the corresponding service, the longer the packet transmission delay may be. It is even possible to discard the quality of service guaranteed for high priority services. That is, the forwarding of the packet to be forwarded by the QoS-based traffic control policy may include: forwarding the packet to be forwarded according to the forwarding processing mode corresponding to the service priority of the packet to be forwarded.
  • the traffic control policy based on the ACL is mainly based on whether the information carried in the packet to be forwarded and the record included in the ACL are matched to determine the specific forwarding processing mode of the packet.
  • the access control list is a restricted access control list (like a blacklist), a source/destination address of the packet to be forwarded, an application layer protocol type, a transport layer protocol type, and/or a specific keyword included in the header. If the information in the ACL is matched, the forwarding processing of the packet to be forwarded may be directly discarded. Otherwise, the source/destination address of the packet to be forwarded and the application layer protocol.
  • the forwarding processing of the packet to be forwarded may be forwarded.
  • the access control list is an access control list (like a whitelist)
  • the source/destination address, the application layer protocol type, the transport layer protocol type, and/or the packet header of the packet to be forwarded are included.
  • the forwarding processing of the packet to be forwarded may be directly discarded, and the source/destination address, application layer protocol type, transport layer protocol type, and And the information such as the keyword included in the packet header, if the access control list is allowed to have a matching record, the forwarding processing of the packet to be forwarded may be the forwarding of the packet. Other cases and so on.
  • the mechanism for the virtual machine and the host to negotiate the flow control policy executor is introduced in the computing node 1200, so that both the virtual machine and the host have the opportunity to become the flow control policy executor, which is performed by the execution.
  • the virtual machine flow control policy becomes possible. This facilitates the flow control of the packet flow as early as possible, which is beneficial to reduce invalid processing and reduce the occupation of bandwidth and host address space by invalid packet traffic. It can be seen that the foregoing solution is beneficial for reducing the occupation of the packet address of the virtual machine in the outgoing direction of the virtual machine. Moreover, since the flow control policy executor is determined through negotiation, it is beneficial to improve the reliability of the flow control policy execution.
  • FIG. 13 illustrates a structure of a computing node 1300 according to an embodiment of the present invention.
  • the computing node 1300 includes: at least one processor 1301, such as a CPU, at least one network interface 1304, a memory 1305, and at least one communication bus 1302.
  • Communication bus 1302 is used to implement connection communication between these components.
  • the computing node 1300 optionally includes a user interface 1303, including a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touchpad, or a tactile display).
  • the memory 1305 may include a high speed RAM memory and may also include a non-volatile memory, such as at least one disk memory.
  • the memory 1305 can optionally include at least one memory device remote from the aforementioned processor 1301.
  • the network interface 1304 includes a physical network card and the like.
  • the memory 1305 stores the following elements, executable modules or data. Structures, or a subset of them, or their extension set: host 13051 and at least one virtual machine 13052.
  • the host 13051 may have some or all of the functions of the host as described in the foregoing embodiment, and the virtual machine 13052 may have a part of the virtual machine as described in the foregoing embodiment, as invoked by the processor 1301. Or all features.
  • the processor 1301 may be configured to negotiate flow control between the host 13051 and the virtual machine 13052 based on the flow control capability of the virtual machine 13052.
  • the executor of the strategy If the negotiated flow control policy executor is the virtual machine 13052, the packet to be forwarded by the virtual machine 13052 is forwarded based on the traffic control policy; if the negotiated flow control policy is executed by the host And forwarding, by the foregoing traffic control policy, the foregoing packet that is to be forwarded and received by the host 13051.
  • the processor 1301 negotiates the execution of the flow control policy between the host 13051 and the virtual machine 13052 based on the flow control capability of the virtual machine 13052.
  • an execution party negotiation request where the execution party negotiation request carries the description information of the traffic control capability of the virtual machine 13052;
  • the processor 1301 determines that the virtual machine 13052 supports the execution of the flow control policy according to the description information of the flow control capability, and the processor 1301 sends the foregoing to the virtual machine 13052.
  • the negotiation confirmation indication sent by the host 13051 to the virtual machine 13052, wherein the negotiation confirmation indication is used to indicate that the negotiated flow control policy executor is the virtual machine 13052; and/or the processor 1301 controls according to the flow rate.
  • the processor 1301 sends the negotiation denial indication sent by the host 13051 to the virtual machine 13052 to the virtual machine 13052, where the negotiation denial indication is Used to indicate that the negotiated flow control policy executor is the above host 13051;
  • the processor 1301 based on the flow control capability of the virtual machine 13052, negotiates the execution of the flow control policy between the host 13051 and the virtual machine 13052.
  • the processor 1301 includes: the processor 1301.
  • the foregoing execution party negotiation request carries the description information of the flow control capability of the virtual machine 13052, and the description information of the flow control capability is used to describe the version of the flow control policy supported by the virtual machine 13052;
  • the processor 1301 determines that the virtual machine 13052 supports the current latest version or the preset version of the flow control policy according to the description information of the flow control capability.
  • the processor 1301 sends an indication to the virtual machine 13052 that the negotiated flow control policy executor is the virtual machine 13052; and/or the processor 1301 determines that the virtual machine 13052 does not support execution according to the description information of the traffic control capability.
  • the processor 1301 indicates, in the virtual, the negotiation denial indication is used to indicate that the negotiated flow control policy executor is the host 13051.
  • the processor 1301 negotiates the execution of the flow control policy between the host 13051 and the virtual machine 13052 based on the flow control capability of the virtual machine 13052.
  • the execution party negotiation request sent by the 13051 the execution party negotiation request carries the description information of the flow control capability of the virtual machine 13052; and the virtual machine 13052 receives the negotiation confirmation indication sent by the host 13051 for responding to the execution party negotiation request.
  • the processor 13051 determines that the negotiated flow control policy executor is the virtual machine; if the virtual machine 13052 receives the negotiation denial indication sent by the host 13051 for responding to the executor negotiation request, the processor 13051 determines to negotiate The flow control policy executor is the above host 13051.
  • the processor 1301, based on the flow control capability of the virtual machine 13052, the negotiation of the flow control policy between the host 13051 and the virtual machine 13052 may include: the processor negotiation request, where the executive negotiation request carries the foregoing Description information of the flow control capability of the virtual machine 13052, where the description information of the flow control capability is used to describe a version of the flow control policy supported by the virtual machine 13052; if the virtual machine 13052 receives the response sent by the host 13051 After the negotiation confirmation request of the above-mentioned executive negotiation request, the processor 13051 determines the negotiated flow control.
  • the policy executor is the virtual machine 13052. If the virtual machine 13052 receives the negotiation denial indication sent by the host 13051 for responding to the executor negotiation request, it determines that the negotiated flow control policy executor is the host 13051.
  • the processor 1301, based on the flow control capability of the virtual machine 13052, the negotiation of the flow control policy between the host 13051 and the virtual machine 13052 may include: the processor negotiation request, where the executive negotiation request carries the foregoing If the description of the flow control capability of the virtual machine 13052 is a negotiation confirmation request, the processor 1301 determines that the negotiated flow control policy executor is the virtual machine; if the virtual machine 13052 does not receive the sink within the first set duration The processor 1301 determines that the negotiated flow control policy executor is the host 13051, the host 13051 sends a negotiation confirmation indication in response to the executor negotiation request.
  • the processor 1301, based on the flow control capability of the virtual machine 13052, the negotiation of the flow control policy between the host 13051 and the virtual machine 13052 may include: the processor negotiation request, where the executive negotiation request carries the foregoing Descriptive information of the flow control capability of the virtual machine 13052, where the description information of the flow control capability is used to describe a version of the flow control policy supported by the virtual machine, and the virtual machine 13052 receives the information sent by the host 13051.
  • the processor 1301 determines that the negotiated flow control policy executor is the virtual machine; if the virtual machine 13052 does not receive the transmission sent by the host 13051 within the first set duration The processor 1301 may determine that the negotiated flow control policy executor is the host 13051 in response to the negotiation confirmation indication of the executor negotiation request.
  • the processor 1301, based on the flow control capability of the virtual machine 13052, the negotiation of the flow control policy between the host 13051 and the virtual machine 13052 may include: the processor negotiation request, where the executive negotiation request carries the foregoing The processor 1301 determines that the negotiated flow control policy executor is the host 13051; if the virtual machine 13052 does not receive the above, the virtual machine 13052 does not receive the foregoing. Host machine The processor 1301 determines that the negotiated flow control policy executor is the virtual machine, in response to the negotiation denial indication sent in response to the foregoing executor negotiation request.
  • the processor 1301, based on the flow control capability of the virtual machine 13052, the negotiation of the flow control policy between the host 13051 and the virtual machine 13052 may include: the processor negotiation request, where the executive negotiation request carries the foregoing Descriptive information of the flow control capability of the virtual machine 13052, where the description information of the flow control capability is used to describe a version of the flow control policy supported by the virtual machine, and the virtual machine 13052 receives the information sent by the host 13051.
  • the processor 1301 determines that the negotiated flow control policy executor is the host 13051; if the virtual machine 13052 does not receive the upper 1301 within the second set duration, the negotiation is determined.
  • the execution of the flow control policy is the above virtual machine.
  • the foregoing negotiation confirmation indication includes the foregoing flow control policy.
  • the processor 1301 may perform the forwarding process on the packet to be forwarded by the virtual machine 13052 based on the traffic control policy.
  • the processor 1301 may use the traffic control policy included in the negotiation confirmation indication to the virtual machine 13052.
  • the packets to be forwarded are forwarded.
  • the host 13051 can also pass the traffic control policy to the virtual machine 13052 by other means, so that after determining that the negotiated flow control policy executor is the virtual machine 13052, the processor 1301 transmits the traffic based on the host 13051.
  • the control policy forwards the packet to be forwarded by the virtual machine 13052.
  • the flow control policy may be pre-configured in the virtual machine 13052.
  • the processor 1301 After the host machine 13051 receives the foregoing execution party negotiation request, if the description information of the flow control capability is used to describe a version of the flow control policy supported by the virtual machine, the processor 1301 And determining, according to the description information of the traffic control capability, whether the virtual machine supports the current latest version or the preset version of the traffic control policy, and specifically, the method may include: comparing the description information of the traffic control capability to describe the traffic supported by the virtual machine. Control Whether the version of the policy is the same as the current version or the default version of the flow control policy. If yes, it can be determined that the virtual machine supports the current latest version or the preset version of the flow control policy; if not, the virtual machine can be determined.
  • the flow control policy of the current latest version or the preset version is not supported.
  • the determining, by the processor 1301, whether the virtual machine supports the current latest version or the preset version of the flow control policy according to the description information of the flow control capability may include: comparing the description information of the flow control capability to describe the virtual Whether each version of the k (positive integer) versions of the flow control policy supported by the machine is the same as the current latest version or the default version of the flow control policy. If one of the above k versions is compared If the version is the same as the current version or the default version of the traffic control policy, you can determine that the VM supports the current latest version or the default version of the traffic control policy. If you compare any of the above k versions with the traffic. If the current version or the preset version of the control policy is different, it may be determined that the virtual machine does not support the current latest version or the preset version of the flow control policy.
  • the processor 1301 is further configured to: after the executed execution of the flow control policy is the virtual machine 13052, if the host 13051 does not receive the virtual machine from the virtual machine within a set duration
  • the heartbeat message of 13052 is sent to the virtual machine 13052 to send an indication message that the host 13051 sends to the virtual machine 13052 to indicate that the executor of the flow control policy switches to the host 13051.
  • the traffic control policy on which the processor 1301 processes the packet to be forwarded by the host 13052 or the virtual machine 13051 in this embodiment may be, for example, a quality of service based traffic control policy and/or an access control list based traffic control policy.
  • the above flow control strategy can also be a flow control strategy that refers to other factors.
  • the QoS-based traffic control policy is based on the service priority of the packet to be forwarded to determine the specific forwarding processing mode of the packet.
  • the specific forwarding processing mode may be delayed sending of packets or delayed transmission. Packets or discarded packets, etc.). For example, if there are multiple packets to be forwarded in the current cache, the packet transmission delay with the higher priority of the corresponding service may be shorter or even no delay. The lower the packet priority of the corresponding service, the longer the packet transmission delay may be. It is even possible to discard the quality of service guaranteed for high priority services. That is, the forwarding of the packet to be forwarded by the QoS-based traffic control policy may include: according to the service priority of the packet to be forwarded The forwarding processing method is used to forward the packet to be forwarded.
  • the traffic control policy based on the ACL is mainly based on whether the information carried in the packet to be forwarded and the record included in the ACL are matched to determine the specific forwarding processing mode of the packet.
  • the access control list is a restricted access control list (like a blacklist), a source/destination address of the packet to be forwarded, an application layer protocol type, a transport layer protocol type, and/or a specific keyword included in the header. If the information in the ACL is matched, the forwarding processing of the packet to be forwarded may be directly discarded. Otherwise, the source/destination address of the packet to be forwarded and the application layer protocol.
  • the forwarding processing of the packet to be forwarded may be forwarded.
  • the access control list is an access control list (like a whitelist)
  • the source/destination address, the application layer protocol type, the transport layer protocol type, and/or the packet header of the packet to be forwarded are included.
  • the forwarding processing of the packet to be forwarded may be directly discarded, and the source/destination address of the packet to be forwarded is
  • the information of the application layer protocol type, the transport layer protocol type, and/or the keyword included in the packet header may be forwarded by the forwarding control packet if the ACL is matched. The message. Other cases and so on.
  • the sending, by the processor 1301, to the host 13051, the execution request of the virtual machine 13052 to be sent to the host 13051 may include:
  • the processing party negotiates the request; or, the virtual machine 13052 receives the executive negotiation request sent by the negotiation starting host 13051 from the host 13051.
  • the performing the flow control function based on the virtual machine 13052 and the executing the flow control policy between the host 13051 and the virtual machine 13052 may include: pre-configuring in the virtual machine 13052 After the connection between the client and the preloaded server deployed in the host 13051 is completed, the processor 1301 establishes the above connection, based on the flow control capability of the virtual machine 13052, at the host 13051 and the virtual machine. Traffic control policy negotiated between 13052 Execution.
  • the mechanism for negotiating the flow control policy executor between 13051, with the assistance of the processor 1301, makes the virtual machine 13052 and the host machine 13051 have the opportunity to become the flow control policy executor, which makes the flow control policy by the execution virtual machine 13052 become
  • This may be beneficial to the flow control of the packet flow as early as possible, thereby reducing invalid processing and reducing the bandwidth of the invalid packet and the occupation of the address space of the host 13051. It can be seen that the foregoing solution is advantageous for reducing the occupation of the packet traffic of the forwarding processing virtual machine 13052 in the outbound direction of the host 13051.
  • the flow control strategy executor is determined through negotiation, it is beneficial to improve the reliability of the flow control strategy execution.
  • the virtual machine 13052 when both the virtual machine 13052 and the host 13051 support the execution of the flow control policy, the virtual machine 13052 is preferentially executed to execute the flow control policy, which further facilitates the flow control of the packet as early as possible, thereby further reducing the flow. Invalid processing and invalid packet traffic occupy bandwidth.
  • the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and the program includes some or all of the steps of the message flow control method described in the foregoing method embodiment.
  • the disclosed apparatus may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the above units is only a logical function division, and the actual implementation may have another division manner, for example.
  • multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
  • the mutual coupling or direct connection or communication connection shown or discussed may be an indirect connection or communication connection through some interface, device or unit, and may be in electrical or other form.
  • the components displayed by the unit may or may not be physical units, that is, may be in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the above integrated units if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • the instructions include a plurality of instructions for causing a computer device (which may be a personal computer, a server or a network device or a processor coupled to a memory, etc.) to perform all or part of the steps of the above-described methods of various embodiments of the present invention.
  • the foregoing storage medium includes: a USB flash drive, a read-only memory (English: read-only memory, abbreviation: ROM), a random access memory (English: random access memory, abbreviation: RAM), a mobile hard disk, a magnetic disk, or an optical disk.
  • a USB flash drive a read-only memory (English: read-only memory, abbreviation: ROM), a random access memory (English: random access memory, abbreviation: RAM), a mobile hard disk, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

报文流量控制方法及相关装置和计算节点。其中,一种报文流量控制方法可以包括:基于虚拟机的流量控制能力在虚拟机与宿主机Host之间协商流量控制策略的执行方;若确定协商出的流量控制策略执行方为虚拟机,则虚拟机基于流量控制策略对待转发处理的报文进行转发处理;若确定协商出的流量控制策略的执行方为Host,则虚拟机将待转发处理的报文发送给Host,以便Host基于流量控制策略对接收到的报文进行转发处理。本发明实施例提供的技术方案有利于减少处理虚拟机出方向的报文流量对Host地址空间的占用。

Description

报文流量控制方法及相关装置和计算节点
本申请要求于 2013 年 12 月 30 日提交中国专利局、 申请号为 201310746701.5、 发明名称为 "报文流量控制方法及相关装置和计算节点" 的 中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及计算机技术领域,具体涉及一种报文流量控制方法及相关装置 和计算节点。 背景技术
虚拟化技术是一种将底层硬件设备与上层操作系统、应用程序分离的去耦 合技术, 如图 1所示, 引入虚拟机监控器(英文: virtual machine monitor, 缩 写: VMM )层直接管理底层硬件资源, 创建与底层硬件无关的虚拟机(英文: virtual machine, 缩写: VM )供上层操作系统和应用程序使用。
虚拟化技术作为当前流行的云计算(英文: cloud computing )平台的底层 重要支撑技术之一, 可以极大的提高物理设备的资源使用效率。 与传统的物理 服务器相比, 虚拟机具有更好的隔离性和封装性。
现有一些虚拟化场景下, 宿主机(英文: Host )对虚拟机出方向的流量做 带宽限制或基于其它策略的访问控制。 例如 VM发出报文之后, Host先将该报 文从 VM地址空间拷贝到 Host地址空间, Host判断该报文是否超过发送限制, 对于超过发送限制的报文通常直接丟弃或先进行緩存,而对超过緩存限制的报 文通常就直接丟弃。
研究实践过程中发明人发现, 现有由 Host执行的流量控制机制有时候会 造成较大的处理延迟(例如在有些 VM数量较多的场景下或者 VM发包数量 较多的场景下), 造成 Host地址空间的大量占用。 发明内容
本发明实施例提供流量控制方法及相关装置和计算节点,以减少处理虚拟 机出方向的报文流量对 Host地址空间的占用。
为解决上述技术问题, 本发明实施例提供以下技术方案:
本发明实施例第一方面提供一种报文流量控制方法, 可包括: 基于虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协商流量控 制策略的执行方;
若确定协商出的流量控制策略执行方为所述虚拟机,则所述虚拟机基于所 述流量控制策略对待转发处理的报文进行转发处理;
若确定协商出的流量控制策略的执行方为所述 Host,则所述虚拟机将待转 发处理的报文发送给所述 Host, 以便于所述 Host基于所述流量控制策略对接收 到的所述报文进行转发处理。
结合第一方面, 在第一种可能的实施方式中,
所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方, 包括:
虚拟机向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方 协商请求;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机支持执行流量控制策略之后发送的协商确认指示,则所述虚拟机确 定协商出的流量控制策略执行方为所述虚拟机;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机不支持执行流量控制策略之后发送的协商否认指示,则所述虚拟机 确定协商出的流量控制策略执行方为所述 Host;
或者,
所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方, 包括:
虚拟机向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方 协商请求, 其中, 所述流量控制能力的描述信息用于描述出所述虚拟机支持执 行的流量控制策略的版本;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机支持执行当前最新版本或者预设版本的流量控制策略之后发送的 协商确认指示, 则所述虚拟机确定协商出的流量控制策略执行方为所述虚拟 机;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机不支持执行当前最新版本或者预设版本的流量控制策略之后发送 的协商否认指示, 则所述虚拟机确定协商出的流量控制策略执行方为所述 Host;
或者,
所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方, 包括:
虚拟机向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方 协商请求;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机支持执行流量控制策略之后发送的协商确认指示,则所述虚拟机确 定协商出的流量控制策略执行方为所述虚拟机;
所述虚拟机若在第一设定时长内未接收到所述 Host发送的用于响应所述 执行方协商请求的协商确认指示,则所述虚拟机确定协商出的流量控制策略执 行方为所述 Host;
或者,
所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方, 包括:
虚拟机向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方 协商请求, 其中, 所述流量控制能力的描述信息用于描述出所述虚拟机支持执 行的流量控制策略的版本;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机支持执行当前最新版本或者预设版本的流量控制策略之后发送的 协商确认指示, 则所述虚拟机确定协商出的流量控制策略执行方为所述虚拟 机;
所述虚拟机若在第一设定时长内未接收到所述 Host发送的用于响应所述 执行方协商请求的协商确认指示,则所述虚拟机确定协商出的流量控制策略执 行方为所述 Host;
或者,
所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方, 包括:
虚拟机向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方 协商请求;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机不支持执行流量控制策略之后发送的协商否认指示,则所述虚拟机 确定协商出的流量控制策略执行方为所述 Host;
所述虚拟机在第二设定时长内未接收到所述 Host发送的用于响应所述执 行方协商请求的协商否认指示,则所述虚拟机确定协商出的流量控制策略执行 方为所述虚拟机;
或者,
所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方, 包括:
虚拟机向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方 协商请求, 其中, 所述流量控制能力的描述信息用于描述出所述虚拟机支持执 行的流量控制策略的版本;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机支持执行当前最新版本或者预设版本的流量控制策略之后发送的 协商否认指示, 则所述虚拟机确定协商出的流量控制策略执行方为所述 Host; 所述虚拟机若在第二设定时长内未接收到所述 Host发送的用于响应所述 执行方协商请求的协商否认指示,则所述虚拟机确定协商出的流量控制策略执 行方为所述虚拟机。
结合第一方面的第一种可能的实施方式,在第二种可能的实施方式中, 所 述协商确认指示中包含所述流量控制策略;
所述虚拟机基于所述流量控制策略对待转发处理的报文进行转发处理,包 括:
所述虚拟机基于所述协商确认指示中包含的流量控制策略对待转发处理 的报文进行转发处理。
结合第一方面的第一种可能的实施方式或第一方面的第二种可能的实施 方式, 在第三种可能的实施方式中, 所述虚拟机向 Host发送携带所述虚拟机的 流量控制能力的描述信息的执行方协商请求包括:
虚拟机在接收到用户态进程发起的协商启动请求之后,向 Host发送携带所 述虚拟机的流量控制能力的描述信息的执行方协商请求; 或者,虚拟机在接收 到来自所述 Host的协商启动请求之后, 向上述 Host发送携带所述虚拟机的流量 控制能力的描述信息的执行方协商请求。
结合第一方面或第一方面的第一种可能的实施方式或第一方面的第二种 可能的实施方式或第一方面的第三种可能的实施方式,在第四种可能的实施方 式中,所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方包括: 部署于虚拟机中的预载客户端与部署于 Host 中的预载服务端之间的连接建立完成之后,所述预载客户端基于建立的所述连 接与所述预载服务端基于所述虚拟机的流量控制能力在上述虚拟机与 Host之 间协商流量控制策略的执行方。
结合第一方面的第四种可能的实施方式, 在第五种可能的实施方式中, 所述方法还包括:
在确定协商出的流量控制策略执行方为所述虚拟机之后,所述预载客户端 基于所述连接周期性的向所述预载服务端发送心跳消息。
结合第一方面或第一方面的第一种可能的实施方式或第一方面的第二种 可能的实施方式或者第一方面的第三种可能的实施方式或第一方面的第四种 可能的实施方式或第一方面的第五种可能的实施方式,在第六种可能的实施方 式中, 所述流量控制策略为基于服务质量的流量控制策略和 /或基于访问控制 列表的流量控制策略。
本发明实施例第二方面提供一种报文流量控制方法, 可包括:
基于虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协商流量控 制策略的执行方;
若确定协商出的流量控制策略执行方为所述 Host, 所述 Host在接收到来自 所述虚拟机的报文之后,基于所述流量控制策略对接收到的所述报文进行转发 处理。。
结合第二方面, 在第一种可能的实施方式中, 所述宿主机 Host与虚拟机基 于所述虚拟机的流量控制能力在上述虚拟机与 Host之间协商流量控制策略的 执行方, 包括:
基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协商流 量控制策略的执行方, 包括:
Host接收虚拟机发送的携带所述虚拟机的流量控制能力的描述信息的执 行方协商请求;
若所述 Host根据所述流量控制能力的描述信息确定所述虚拟机支持执行 流量控制策略, 则向所述虚拟机发送协商确认指示, 所述协商确认指示用于表 示协商出的流量控制策略执行方为所述虚拟机;
若所述 Host根据所述流量控制能力的描述信息确定所述虚拟机不支持执 行流量控制策略, 则向所述虚拟机发送协商否认指示, 所述协商否认指示用于 表示协商出的流量控制策略执行方为所述 Host;
或者,
基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协商流 量控制策略的执行方, 包括:
Host接收虚拟机发送的携带所述虚拟机的流量控制能力的描述信息的执 行方协商请求, 其中, 所述流量控制能力的描述信息用于描述出所述虚拟机支 持执行的流量控制策略的版本;
若所述 Host根据所述流量控制能力的描述信息确定所述虚拟机支持执行 当前最新版本或者预设版本的流量控制策略,则向所述虚拟机发送协商确认指 示, 其中, 所述协商确认指示用于表示协商出的流量控制策略执行方为所述虚 拟机;
若所述 Host根据所述流量控制能力的描述信息确定所述虚拟机不支持执 行当前最新版本或者预设版本的流量控制策略,则向所述虚拟机发送协商否认 指示, 其中, 所述协商否认指示用于表示协商出的流量控制策略执行方为所述 Host。
结合第二方面或第二方面的第一种可能的实施方式,在第二种可能的实施 方式中,所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间 协商流量控制策略的执行方, 包括: 在 Host中的预载服务端与虚拟机中的预载 客户端之间的连接建立完成之后,所述预载服务端通过所述连接与所述预载客 户端基于所述虚拟机的流量控制能力,在所述虚拟机与宿主机 Host之间协商流 量控制策略的执行方。
结合第二方面或第二方面的第一种可能的实施方式或第二方面的第二种 可能的实施方式, 在第三种可能的实施方式中, 所述方法还包括:
在确定协商出的流量控制策略的执行方为所述虚拟机之后,若在设定时长 内未接收到来自所述虚拟机的心跳消息,则所述 Host向所述虚拟机发送用于指 示流量控制策略的执行方切换为所述 Host的指示消息。
结合第二方面或第二方面的第一种可能的实施方式或第二方面的第二种 可能的实施方式或者第二方面的第三种可能的实施方式,在第四种可能的实施 方式中, 所述流量控制策略为基于服务质量的流量控制策略和 /或基于访问控 制列表的流量控制策略。
本发明第三方面提供一种报文流量控制方法, 可包括:
处理器基于虚拟机的流量控制能力,在宿主机 Host和所述虚拟机之间协商 出流量控制策略的执行方;
若协商出的流量控制策略执行方为所述虚拟机,则所述处理器基于所述流 若协商出的流量控制策略的执行方为所述 Host,则所述处理器将所述虚拟 机待转发处理的报文从所述虚拟机发送给所述 Host;所述处理器基于所述流量 控制策略对所述 Host接收到的待转发处理的所述报文进行转发处理。
结合第三方面, 在第一种可能的实施方式中,
所述处理器基于虚拟机的流量控制能力,在宿主机 Host和所述虚拟机之间 协商出流量控制策略的执行方包括:所述处理器向 Host发送所述虚拟机待向所 述 Host发送的执行方协商请求,所述执行方协商请求携带所述虚拟机的流量控 制能力的描述信息;
在所述 Host接收到所述执行方协商请求之后,所述处理器若根据所述流量 控制能力的描述信息确定所述虚拟机支持执行流量控制策略,则所述处理器向 所述虚拟机发送所述 Host待向所述虚拟机发送的协商确认指示, 其中, 所述协 商确认指示用于表示协商出的流量控制策略执行方为所述虚拟机; 和 /或, 所 述处理器若根据所述流量控制能力的描述信息确定所述虚拟机不支持执行流 量控制策略,则所述处理器向所述虚拟机发送所述 Host待向所述虚拟机发送的 协商否认指示,所述协商否认指示用于表示协商出的流量控制策略执行方为所 述 Host;
或者,
所述处理器基于虚拟机的流量控制能力,在宿主机 Host和所述虚拟机之间 协商出流量控制策略的执行方包括:所述处理器向 Host发送所述虚拟机待向所 述 Host发送的执行方协商请求,所述执行方协商请求携带所述虚拟机的流量控 制能力的描述信息,所述流量控制能力的描述信息用于描述出所述虚拟机支持 执行的流量控制策略的版本;
在所述 Host接收到所述执行方协商请求之后,所述处理器若根据所述流量 控制能力的描述信息,确定所述虚拟机支持执行当前最新版本或者预设版本的 流量控制策略,则所述处理器向所述虚拟机发送所述 Host待向所述虚拟机发送 的协商确认指示,所述协商确认指示用于表示协商出的流量控制策略执行方为 所述虚拟机; 和 /或所述处理器若根据所述流量控制能力的描述信息确定所述 虚拟机不支持执行当前最新版本或者预设版本的流量控制策略,则所述处理器 向所述虚拟机发送所述 Host待向所述虚拟机发送的协商否认指示, 其中, 所述 协商否认指示用于表示协商出的流量控制策略执行方为所述 Host。
结合第三方面或第三方面的第一种可能的实施方式,在第二种可能的实施 方式中, 所述协商确认指示中包含所述流量控制策略;
其中,所述基于所述流量控制策略对所述虚拟机待转发处理的报文进行转 发处理包括:基于所述协商确认指示中包含的所述流量控制策略对所述虚拟机 待转发处理的报文进行转发处理。
结合第三方面或第三方面的第一种可能的实施方式或第三方面的第二种 可能的实施方式,在第三种可能的实施方式中, 在协商出的流量控制策略的执 行方为所述虚拟机之后,若所述 Host在设定时长内未接收到来自所述虚拟机的 心跳消息, 所述处理器向所述虚拟机发送所述 Host待向所述虚拟机发送的, 用 于指示流量控制策略的执行方切换为所述 Host的指示消息。
结合第三方面或第三方面的第一种可能的实施方式或第三方面的第二种 可能的实施方式或者第三方面的第三种可能的实施方式,在第四种可能的实施 方式中,
所述流量控制策略为基于服务质量的流量控制策略和 /或基于访问控制列 表的流量控制策略。
结合第三方面或第三方面的第一种可能的实施方式或第三方面的第二种 可能的实施方式或者第三方面的第三种可能的实施方式或者第三方面的第四 种可能的实施方式, 在第五种可能的实施方式中, 所述向 Host发送所述虚拟机 待向所述 Host发送的执行方协商请求包括:
在虚拟机在接收到用户态进程发起的协商启动请求之后,向 Host发送所述 虚拟机待向所述 Host发送的执行方协商请求; 或者, 在虚拟机在接收到来自所 述 Host的协商启动请求之后, 向所述 Host发送所述虚拟机待向所述 Host发送的 执行方协商请求。
结合第三方面或者第三方面的第一种可能的实施方式或第三方面的第二 种可能的实施方式或者第三方面的第三种可能的实施方式或者第三方面的第 四种可能的实施方式或者第三方面的第五种可能的实施方式,在第六种可能的 实施方式中, 基于虚拟机的流量控制能力, 在宿主机 Host和所述虚拟机之间协 商出流量控制策略的执行方包括: 在部署于虚拟机中的预载客户端与部署于 Host中的预载服务端之间的连接建立完成之后, 通过建立的所述连接, 基于虚 拟机的流量控制能力,在宿主机 Host和所述虚拟机之间协商出流量控制策略的 执行。
本发明第四方面提供一种报文流量控制方法, 可包括:
处理器基于虚拟机的流量控制能力,在宿主机 Host和所述虚拟机之间协商 出流量控制策略的执行方;
若协商出的流量控制策略执行方为所述虚拟机,则所述处理器基于所述流 若协商出的流量控制策略的执行方为所述 Host,则所述处理器将所述虚拟 机待转发处理的报文发送给所述 Host;所述处理器基于所述流量控制策略对所 述 Host接收到的待转发处理的所述报文进行转发处理。
结合第四方面, 在第一种可能的实施方式中,
所述处理器基于虚拟机的流量控制能力,在宿主机 Host和所述虚拟机之间 协商出流量控制策略的执行方包括:所述处理器向 Host发送所述虚拟机待向所 述 Host发送的执行方协商请求,所述执行方协商请求携带所述虚拟机的流量控 制能力的描述信息;
在所述 Host接收到所述执行方协商请求之后,所述处理器若根据所述流量 控制能力的描述信息确定所述虚拟机支持执行流量控制策略,则所述处理器向 所述虚拟机发送所述 Host待向所述虚拟机发送的协商确认指示, 其中, 所述协 商确认指示用于表示协商出的流量控制策略执行方为所述虚拟机; 和 /或, 所 述处理器若根据所述流量控制能力的描述信息,确定所述虚拟机不支持执行流 量控制策略,则所述处理器向所述虚拟机发送所述 Host待向所述虚拟机发送的 协商否认指示, 其中, 所述协商否认指示用于表示协商出的流量控制策略执行 方为所述 Host;
或者,
所述处理器基于虚拟机的流量控制能力,在宿主机 Host和所述虚拟机之间 协商出流量控制策略的执行方包括:所述处理器向 Host发送所述虚拟机待向所 述 Host发送的执行方协商请求,所述执行方协商请求携带所述虚拟机的流量控 制能力的描述信息,所述流量控制能力的描述信息用于描述出所述虚拟机支持 执行的流量控制策略的版本;
在所述 Host接收到所述执行方协商请求之后,所述处理器若根据所述流量 控制能力的描述信息,确定所述虚拟机支持执行当前最新版本或者预设版本的 流量控制策略,则所述处理器向所述虚拟机发送所述 Host待向所述虚拟机发送 的协商确认指示,所述协商确认指示用于表示协商出的流量控制策略执行方为 所述虚拟机; 和 /或所述处理器若根据所述流量控制能力的描述信息确定所述 虚拟机不支持执行当前最新版本或者预设版本的流量控制策略,则所述处理器 向所述虚拟机发送所述 Host待向所述虚拟机发送的协商否认指示, 其中, 所述 协商否认指示用于表示协商出的流量控制策略执行方为所述 Host。
结合第四方面或第四方面的第一种可能的实施方式,在第二种可能的实施 方式中, 所述协商确认指示中包含所述流量控制策略;
其中,所述处理器基于所述流量控制策略对所述虚拟机待转发处理的报文 进行转发处理包括:所述处理器基于所述协商确认指示中包含的所述流量控制 策略对所述虚拟机待转发处理的报文进行转发处理。
结合第四方面或第四方面的第一种可能的实施方式或第四方面的第二种 可能的实施方式, 在第三种可能的实施方式中, 所述方法还包括: 在协商出的 流量控制策略的执行方为所述虚拟机之后,若所述 Host在设定时长内未接收到 来自所述虚拟机的心跳消息,所述处理器向所述虚拟机发送所述 Host待向所述 虚拟机发送的, 用于指示流量控制策略的执行方切换为所述 Host的指示消息。
结合第四方面或第四方面的第一种可能的实施方式或第四方面的第二种 可能的实施方式或者第四方面的第三种可能的实施方式,在第四种可能的实施 方式中,
所述流量控制策略为基于服务质量的流量控制策略和 /或基于访问控制列 表的流量控制策略。
结合第四方面或第四方面的第一种可能的实施方式或第四方面的第二种 可能的实施方式或者第四方面的第三种可能的实施方式或者第四方面的第四 种可能的实施方式, 在第五种可能的实施方式中, 所述处理器向 Host发送所述 虚拟机待向所述 Host发送的执行方协商请求包括:
在虚拟机在接收到用户态进程发起的协商启动请求之后, 所述处理器向 Host发送所述虚拟机待向所述 Host发送的执行方协商请求; 或者, 在虚拟机在 接收到来自所述 Host的协商启动请求之后, 所述处理器向所述 Host发送所述虚 拟机待向所述 Host发送的执行方协商请求。
结合第四方面或者第四方面的第一种可能的实施方式或第四方面的第二 种可能的实施方式或者第四方面的第三种可能的实施方式或者第四方面的第 四种可能的实施方式或者第四方面的第五种可能的实施方式,在第六种可能的 实施方式中, 所述基于虚拟机的流量控制能力, 在宿主机 Host和所述虚拟机之 间协商出流量控制策略的执行方, 包括: 在部署于虚拟机中的预载客户端与部 署于 Host中的预载服务端之间的连接建立完成之后,所述处理器通过建立的所 述连接, 基于虚拟机的流量控制能力, 在宿主机 Host和所述虚拟机之间协商出 流量控制策略的执行。
本发明第五方面提供一种虚拟机, 可包括:
第一协商单元,用于基于所述虚拟机的流量控制能力在所述虚拟机与宿主 机 Host之间协商流量控制策略的执行方;
报文处理单元, 用于若确定协商出的流量控制策略的执行方为所述虚拟 机, 则基于所述流量控制策略对待转发处理的报文进行转发处理; 若确定协商 出的流量控制策略的执行方为所述 Host, 则将待转发处理的报文发送给所述 Host, 以便于所述 Host基于所述流量控制策略对接收到的所述报文进行转发处 理。
结合第五方面, 在第一种可能的实施方式中,
所述第一协商单元具体用于,向 Host发送携带所述虚拟机的流量控制能力 的描述信息的执行方协商请求,若接收到所述 Host在根据所述流量控制能力的 描述信息确定所述虚拟机支持执行流量控制策略之后发送的协商确认指示,则 确定协商出的流量控制策略执行方为所述虚拟机;若接收到所述 Host在根据所 述流量控制能力的描述信息确定所述虚拟机不支持执行流量控制策略之后发 送的协商否认指示, 则确定协商出的流量控制策略执行方为所述 Host;
或者,
所述第一协商单元具体用于,向 Host发送携带所述虚拟机的流量控制能力 的描述信息的执行方协商请求, 其中, 所述流量控制能力的描述信息用于描述 出所述虚拟机支持执行的流量控制策略的版本,若接收到所述 Host在根据所述 流量控制能力的描述信息确定所述虚拟机支持执行当前最新版本或者预设版 本的流量控制策略之后发送的协商确认指示,则确定协商出的流量控制策略执 行方为所述虚拟机;若接收到所述 Host在根据所述流量控制能力的描述信息确 定所述虚拟机不支持执行当前最新版本或者预设版本的流量控制策略之后发 送的协商否认指示, 则确定协商出的流量控制策略执行方为所述 Host;
或者,
所述第一协商单元具体用于,向 Host发送携带所述虚拟机的流量控制能力 的描述信息的执行方协商请求,若接收到所述 Host在根据所述流量控制能力的 描述信息确定所述虚拟机支持执行流量控制策略之后发送的协商确认指示,则 确定协商出的流量控制策略执行方为所述虚拟机;若在第一设定时长内未接收 到所述 Host发送的用于响应所述执行方协商请求的协商确认指示,则确定协商 出的流量控制策略执行方为所述 Host; 或者,
所述第一协商单元具体用于,向 Host发送携带所述虚拟机的流量控制能力 的描述信息的执行方协商请求, 其中, 所述流量控制能力的描述信息用于描述 出所述虚拟机支持执行的流量控制策略的版本,若接收到所述 Host在根据所述 流量控制能力的描述信息确定所述虚拟机支持执行当前最新版本或者预设版 本的流量控制策略之后发送的协商确认指示,则确定协商出的流量控制策略执 行方为所述虚拟机;若在第一设定时长之内未接收到所述 Host发送的用于响应 所述执行方协商请求的协商确认指示,则确定协商出的流量控制策略执行方为 所述 Host;
或者,
所述第一协商单元具体用于,向 Host发送携带所述虚拟机的流量控制能力 的描述信息的执行方协商请求,若接收到所述 Host在根据所述流量控制能力的 描述信息确定所述虚拟机不支持执行流量控制策略之后发送的协商否认指示, 则确定协商出的流量控制策略执行方为所述 Host;若在第二设定时长内未接收 到所述 Host发送的用于响应所述执行方协商请求的协商否认指示,则确定协商 出的流量控制策略执行方为所述虚拟机;
或者,
所述第一协商单元具体用于,向 Host发送携带所述虚拟机的流量控制能力 的描述信息的执行方协商请求, 其中, 所述流量控制能力的描述信息用于描述 出所述虚拟机支持执行的流量控制策略的版本,若接收到所述 Host在根据所述 流量控制能力的描述信息确定所述虚拟机支持执行当前最新版本或者预设版 本的流量控制策略之后发送的协商否认指示,则确定协商出的流量控制策略执 行方为所述 Host; 若在第二设定时长之内未接收到所述 Host发送的用于响应所 述执行方协商请求的协商否认指示,则确定协商出的流量控制策略执行方为所 述虚拟机。
结合第五方面或者第五方面的第一种可能的实施方式,在第二种可能的实 施方式中, 所述虚拟机还包括:
发送单元, 用于在确定协商出的流量控制策略的执行方为所述虚拟机之 后, 周期性的向所述 Host发送心跳消息。 结合第五方面或者第五方面的第一种可能的实施方式或第五方面的第二 种可能的实施方式, 在第三种可能的实施方式中,
所述流量控制策略为基于服务质量的流量控制策略和 /或基于访问控制列 表的流量控制策略。
结合第五方面的第一种可能的实施方式或者第五方面的第二种可能的实 施方式或第五方面的第三种可能的实施方式,在第四种可能的实施方式中,在 所述向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方协商请 求的方面, 所述协商单元具体用于,在接收到用户态进程发起的协商启动请求 之后,向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方协商请 求; 或者在接收到来自所述 Host的协商启动请求之后, 向上述 Host发送携带所 述虚拟机的流量控制能力的描述信息的执行方协商请求。
本发明第六方面提供一种宿主机, 包括:
第二协商单元,用于基于所述虚拟机的流量控制能力在所述虚拟机与所述 宿主机之间协商流量控制策略的执行方;
报文处理单元, 用于若确定协商出的流量控制策略的执行方为所述宿主 机,在接收到来自所述虚拟机的报文之后,基于所述流量控制策略对接收到的 所述报文进行转发处理。
结合第六方面, 在第一种可能的实施方式中,
所述第二协商单元具体用于,接收虚拟机发送的携带所述虚拟机的流量控 制能力的描述信息的执行方协商请求,若根据所述流量控制能力的描述信息确 定所述虚拟机支持执行流量控制策略, 则向所述虚拟机发送协商确认指示, 所 述协商确认指示用于表示协商出的流量控制策略执行方为所述虚拟机;若根据 所述流量控制能力的描述信息确定所述虚拟机不支持执行流量控制策略,则向 所述虚拟机发送协商否认指示,所述协商否认指示用于表示协商出的流量控制 策略执行方为所述宿主机;
或者,
所述第二协商单元具体用于,接收虚拟机发送的携带有所述虚拟机的流量 控制能力的描述信息的执行方协商请求, 其中, 所述流量控制能力的描述信息 用于描述出所述虚拟机支持执行的流量控制策略的版本,若根据所述流量控制 能力的描述信息确定所述虚拟机支持执行当前最新版本或者预设版本的流量 控制策略, 则向所述虚拟机发送协商确认指示, 其中, 所述协商确认指示用于 表示协商出的流量控制策略执行方为所述虚拟机;若根据所述流量控制能力的 描述信息确定所述虚拟机不支持执行当前最新版本或者预设版本的流量控制 策略, 则向所述虚拟机发送协商否认指示, 其中, 所述协商否认指示用于表示 协商出的流量控制策略执行方为所述宿主机。
结合第六方面或者第六方面的第一种可能的实施方式,在第二种可能的实 施方式中, 所述报文处理单元还用于,在确定协商出的流量控制策略的执行方 为所述虚拟机之后, 若在设定时长内未接收到来自所述虚拟机的心跳消息, 则 向所述虚拟机发送用于指示流量控制策略执行方切换为所述 Host的指示消息。
结合第六方面或者第六方面的第一种可能的实施方式或第六方面的第二 种可能的实施方式, 在第三种可能的实施方式中,
所述流量控制策略为基于服务质量的流量控制策略和 /或基于访问控制列 表的流量控制策略。
本发明第七方面提供一种计算节点, 可包括, 硬件层、运行在所述硬件层 之上的宿主机 Host、 以及运行在所述 Host之上的至少一个虚拟机,
所述虚拟机, 用于基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流量控制策略的执行方;若确定协商出的流量控制策略执行方为 所述虚拟机, 则基于所述流量控制策略对待转发处理的报文进行转发处理; 若 确定协商出的流量控制策略的执行方为所述 Host,则将待转发处理的报文发送 给所述 Host;
所述 Host用于若确定协商出的流量控制策略执行方为所述 Host, 则在接收 到来自所述虚拟机的报文之后,基于所述流量控制策略对接收到的所述报文进 行转发处理。
结合第七方面, 在第一种可能的实施方式中,
在基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流 量控制策略的执行方的方面, 所述虚拟机具体用于, 向 Host发送携带所述虚拟 机的流量控制能力的描述信息的执行方协商请求,若接收到所述 Host在根据所 述流量控制能力的描述信息确定所述虚拟机支持执行流量控制策略之后发送 的协商确认指示, 则确定协商出的流量控制策略执行方为所述虚拟机; 若接收 到所述 Host在根据所述流量控制能力的描述信息确定所述虚拟机不支持执行 流量控制策略之后发送的协商否认指示,则确定协商出的流量控制策略执行方 为所述 Host;
或者,
在基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流 量控制策略的执行方的方面, 所述虚拟机具体用于, 向 Host发送携带所述虚拟 机的流量控制能力的描述信息的执行方协商请求, 其中, 所述流量控制能力的 描述信息用于描述出所述虚拟机支持执行的流量控制策略的版本,若接收到所 述 Host在根据所述流量控制能力的描述信息确定所述虚拟机支持执行当前最 新版本或者预设版本的流量控制策略之后发送的协商确认指示,则确定协商出 的流量控制策略执行方为所述虚拟机;若接收到所述 Host在根据所述流量控制 能力的描述信息确定所述虚拟机不支持执行当前最新版本或者预设版本的流 量控制策略之后发送的协商否认指示,则确定协商出的流量控制策略执行方为 所述 Host;
或者,
在基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流 量控制策略的执行方的方面, 所述虚拟机具体用于, 向 Host发送携带所述虚拟 机的流量控制能力的描述信息的执行方协商请求,若接收到所述 Host在根据所 述流量控制能力的描述信息确定所述虚拟机支持执行流量控制策略之后发送 的协商确认指示, 则确定协商出的流量控制策略执行方为所述虚拟机; 若在第 一设定时长内未接收到所述 Host发送的用于响应所述执行方协商请求的协商 确认指示, 则确定协商出的流量控制策略执行方为所述 Host;
或者,
在基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流 量控制策略的执行方的方面, 所述虚拟机具体用于, 向 Host发送携带所述虚拟 机的流量控制能力的描述信息的执行方协商请求, 其中, 所述流量控制能力的 描述信息用于描述出所述虚拟机支持执行的流量控制策略的版本,若接收到所 述 Host在根据所述流量控制能力的描述信息确定所述虚拟机支持执行当前最 新版本或者预设版本的流量控制策略之后发送的协商确认指示,则确定协商出 的流量控制策略执行方为所述虚拟机; 若在第一设定时长之内未接收到所述 Host发送的用于响应所述执行方协商请求的协商确认指示,则确定协商出的流 量控制策略执行方为所述 Host;
或者,
在基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流 量控制策略的执行方的方面, 所述虚拟机具体用于, 向 Host发送携带所述虚拟 机的流量控制能力的描述信息的执行方协商请求,若接收到所述 Host在根据所 述流量控制能力的描述信息确定所述虚拟机不支持执行流量控制策略之后发 送的协商否认指示, 则确定协商出的流量控制策略执行方为所述 Host; 若在第 二设定时长内未接收到所述 Host发送的用于响应所述执行方协商请求的协商 否认指示, 则确定协商出的流量控制策略执行方为所述虚拟机;
或者,
在基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流 量控制策略的执行方的方面, 所述虚拟机具体用于, 向 Host发送携带所述虚拟 机的流量控制能力的描述信息的执行方协商请求, 其中, 所述流量控制能力的 描述信息用于描述出所述虚拟机支持执行的流量控制策略的版本,若接收到所 述 Host在根据所述流量控制能力的描述信息确定所述虚拟机支持执行当前最 新版本或者预设版本的流量控制策略之后发送的协商否认指示,则确定协商出 的流量控制策略执行方为所述 Host; 若在第二设定时长之内未接收到所述 Host 发送的用于响应所述执行方协商请求的协商否认指示,则确定协商出的流量控 制策略执行方为所述虚拟机。
结合第七方面或者第七方面的第一种可能的实施方式,在第二种可能的实 施方式中,
所述 Host还用于,在确定协商出的流量控制策略的执行方为所述虚拟机之 后, 若在设定时长内未接收到来自所述虚拟机的心跳消息, 则向所述虚拟机发 送用于指示流量控制策略执行方切换为所述 Host的指示消息。
本发明第八方面提供一种计算节点, 包括:
存储器, 以及与所述存储器连接的处理器; 其中, 所述处理器用于, 基于虚拟机的流量控制能力, 在宿主机 Host和所 述虚拟机之间协商出流量控制策略的执行方;若协商出的流量控制策略执行方 为所述虚拟机,则基于所述流量控制策略对所述虚拟机待转发处理的报文进行 转发处理; 若协商出的流量控制策略的执行方为所述 Host, 则将所述虚拟机待 转发处理的报文从所述虚拟机发送给所述 Host;基于所述流量控制策略对所述 Host接收到的待转发处理的所述报文进行转发处理。
结合第八方面, 在第八方面的第一种可能的实施方式中,
所述处理器用于, 向 Host发送所述虚拟机待向所述 Host发送的执行方协商 请求, 所述执行方协商请求携带所述虚拟机的流量控制能力的描述信息; 在所 述 Host接收到所述执行方协商请求之后,若根据所述流量控制能力的描述信息 确定所述虚拟机支持执行流量控制策略,则向所述虚拟机发送所述 Host待向所 述虚拟机发送的协商确认指示, 其中, 所述协商确认指示用于表示协商出的流 量控制策略执行方为所述虚拟机; 和 /或, 若根据所述流量控制能力的描述信 息确定所述虚拟机不支持执行流量控制策略, 则向所述虚拟机发送所述 Host 待向所述虚拟机发送的协商否认指示,所述协商否认指示用于表示协商出的流 量控制策略执行方为所述 Host;
或者,
所述处理器用于, 向 Host发送所述虚拟机待向所述 Host发送的执行方协商 请求, 所述执行方协商请求携带所述虚拟机的流量控制能力的描述信息, 所述 流量控制能力的描述信息用于描述出所述虚拟机支持执行的流量控制策略的 版本; 在所述 Host接收到所述执行方协商请求之后, 若根据所述流量控制能力 的描述信息,确定所述虚拟机支持执行当前最新版本或者预设版本的流量控制 策略, 则向所述虚拟机发送所述 Host待向所述虚拟机发送的协商确认指示, 所 述协商确认指示用于表示协商出的流量控制策略执行方为所述虚拟机; 和 /或 若根据所述流量控制能力的描述信息确定所述虚拟机不支持执行当前最新版 本或者预设版本的流量控制策略,则向所述虚拟机发送所述 Host待向所述虚拟 机发送的协商否认指示, 其中, 所述协商否认指示用于表示协商出的流量控制 策略执行方为所述 Host。
结合第八方面的第一种可能的实施方式,在第八方面的第二种可能的实施 方式中, 所述协商确认指示中包含所述流量控制策略;
其中, 所述处理器用于,基于所述协商确认指示中包含的所述流量控制策 略对所述虚拟机待转发处理的报文进行转发处理。
结合第八方面或第八方面的第一种可能的实施方式或第八方面的第二种 可能的实施方式,在第八方面的第三种可能的实施方式中, 所述处理器还用于 在协商出的流量控制策略的执行方为所述虚拟机之后,若所述 Host在设定时长 内未接收到来自所述虚拟机的心跳消息,向所述虚拟机发送所述 Host待向所述 虚拟机发送的, 用于指示流量控制策略的执行方切换为所述 Host的指示消息。
可以看出, 在本发明实施例的一些技术方案中,基于上述虚拟机的流量控 制能力在上述虚拟机与 Host之间协商流量控制策略的执行方;若确定协商出的 流量控制策略执行方为上述虚拟机,则上述虚拟机基于上述流量控制策略对待 转发处理的报文进行转发处理;若确定协商出的流量控制策略的执行方为上述 Host, 则上述虚拟机将待转发处理的报文发送给上述 Host, 以便上述 Host基于 上述流量控制策略对接收到的上述报文进行转发处理。通过引入虚拟机与 Host 协商流量控制策略执行方的机制,使得虚拟机与 Host都有机会成为流量控制策 略执行方, 这使得由执行虚拟机流量控制策略变得可能, 这样就有利于尽可能 早的对报文流进行流量控制, 进而有利于减少无效处理、减少无效报文流量对 带宽和 Host地址空间的占用。 可见, 上述方案有利于减少处理虚拟机出方向的 报文流量对 Host地址空间的占用。并且由于是通过协商来确定流量控制策略执 行方, 流量控制策略执行方的执行能力得到一定程度的保证, 因此有利于提高 流量控制策略执行的可靠性。 附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技 术描述中所需要使用的附图作简单地介绍,显而易见地, 下面描述中的附图仅 仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳 动性的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明实施例提供的虚拟化架构示意图;
图 2是本发明实施例提供的另一种虚拟化架构示意图;
图 3是本发明实施例提供的一种报文流量控制方法的流程示意图; 图 4-a是本发明实施例提供的另一种报文转发控制方法的流程示意图; 图 4-b是本发明实施例提供的另一种报文转发控制方法的流程示意图; 图 5-a是本发明实施例提供的另一种报文转发控制方法的流程示意图; 图 5-b是本发明实施例提供的一种计算节点的结构示意图;
图 5-c是本发明实施例提供的一种报文流量控制的效果示意图;
图 6-a是本发明实施例提供的另一种报文转发控制方法的流程示意图; 图 6-b是本发明实施例提供的另一种报文流量控制的效果示意图; 图 7是本发明实施例提供的另一种报文转发控制方法的流程示意图; 图 8是本发明实施例提供的另一种报文转发控制方法的流程示意图; 图 9是本发明实施例提供的一种虚拟机的结构示意图;
图 10是本发明实施例提供的一种宿主机的结构示意图;
图 11是本发明实施例提供的一种计算节点的结构示意图;
图 12是本发明实施例提供的另一种计算节点的结构示意图;
图 13是本发明实施例提供的另一种计算节点的结构示意图。
具体实施方式
本发明实施例提供流量控制方法及相关装置和计算节点,以减少处理虚拟 机出方向的报文流量对 Host地址空间的占用。
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施 例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所 描述的实施例仅仅是本发明一部分的实施例, 而不是全部的实施例。基于本发 明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所 有其他实施例, 都应当属于本发明保护的范围。
为了方便理解本发明实施例,首先在此介绍本发明实施例描述中会引入的 几个要素;
虚拟机 VM:
通过虚拟机软件可以在一台物理计算机上模拟出一台或者多台虚拟的计 算机, 而这些虚拟机就像真正的计算机那样进行工作,虚拟机上可以安装操作 系统和应用程序,虚拟机还可访问网络资源。对于在虚拟机中运行的应用程序 而言, 虚拟机就像是在真正的计算机中进行工作。 硬件层:
虚拟化环境运行的硬件平台。 其中, 硬件层可包括多种硬件, 例如某计算 节点的硬件层可包括 CPU和内存, 还可以包括网卡、 存储器等等高速 /低速输 入 /输出 (英文: input/output, 缩写: I/O )设备, 及具有特定处理功能的其它 设备,如输入输出内存管理单元(英文: Input/Output Memory Management Unit , 缩写: IOMMU ), 其中, IOMMU可用于虚拟机物理地址和 Host物理地址的转 换。
宿主机(Host ):
作为管理层, 用以完成硬件资源的管理、 分配; 为虚拟机呈现虚拟硬件平 台; 实现虚拟机的调度和隔离。 其中, Host可能是虚拟机监控器(VMM ); 此 夕卜, 有时 VMM和 1个特权虚拟机配合, 两者结合组成 Host。 其中, 虚拟硬件平 台对其上运行的各个虚拟机提供各种硬件资源,如提供虚拟中央处理器(英文: Central Processing Unit, 缩写: CPU )、 内存、 虚拟磁盘、 虚拟网卡等等。 其 中, 该虚拟磁盘可对应 Host的一个文件或者一个逻辑块设备。 虚拟机则运行在 Host为其准备的虚拟硬件平台上, Host上运行一个或多个虚拟机。
参见图 2和,图 2是本发明实施例提出的一种计算节点的虚拟化体系架构示 意图, 该体系架构主要包括三个层次: 硬件层、 Host和虚拟机( VM )。 硬件层 包括网卡。 Host中部署有与网卡对应的后端实例(英文: Back-End,缩写: BE ), VM中具有网卡对应的前端实例(英文: Front-End, 缩写: FE ); 其中, VM中 的 BE可以看成是网卡的前端驱动, Host中的 FE可以看成是网卡的后端驱动。 本发明流量控制方法的一个实施例,一种报文流量控制方法包括: 基于虚 拟机的流量控制能力在上述虚拟机与 Host之间协商流量控制策略的执行方;若 确定协商出的流量控制策略执行方为上述虚拟机,则上述虚拟机基于上述流量 控制策略对待转发处理的报文进行转发处理;若确定协商出的流量控制策略的 执行方为上述 Host, 则上述虚拟机将待转发处理的报文发送给上述 Host, 以便 于上述 Host基于上述流量控制策略对接收到的上述报文进行转发处理。
请参见图 3,图 3为本发明的一个实施例提供的一种报文流量控制方法的流 程示意图。 其中, 如图 3所示, 本发明的一个实施例提供的一种报文流量控制 方法可包括以下内容:
301、 基于虚拟机的流量控制能力在上述虚拟机与 Host之间协商流量控制 策略的执行方。
在本发明一些实施例中,虚拟机与宿主机 Host可通过多种方式来基于上述 虚拟机的流量控制能力在上述虚拟机与 Host之间协商流量控制策略的执行方。
举例来说,上述基于虚拟机的流量控制能力在上述虚拟机与 Host之间协商 流量控制策略的执行方, 包括: 虚拟机向 Host发送携带上述虚拟机的流量控制 能力的描述信息的执行方协商请求;上述虚拟机若接收到上述 Host在根据上述 流量控制能力的描述信息确定上述虚拟机支持执行流量控制策略之后发送的 协商确认指示, 则上述虚拟机确定协商出的流量控制策略执行方为上述虚拟 机;上述虚拟机若接收到上述 Host在根据上述流量控制能力的描述信息确定上 述虚拟机不支持执行流量控制策略之后发送的协商否认指示,则上述虚拟机确 定协商出的流量控制策略执行方为上述 Host。
又举例来说,基于虚拟机的流量控制能力在上述虚拟机与 Host之间协商流 量控制策略的执行方, 包括: 虚拟机向 Host发送携带上述虚拟机的流量控制能 力的描述信息的执行方协商请求, 其中, 上述流量控制能力的描述信息用于描 述出上述虚拟机支持执行的流量控制策略的版本; 上述虚拟机若接收到上述 Host在根据上述流量控制能力的描述信息确定上述虚拟机支持执行当前最新 版本或者预设版本的流量控制策略之后发送的协商确认指示,则上述虚拟机确 定协商出的流量控制策略执行方为上述虚拟机。上述虚拟机若接收到上述 Host 在根据上述流量控制能力的描述信息确定上述虚拟机不支持执行当前最新版 本或者预设版本的流量控制策略之后发送的协商否认指示,则上述虚拟机确定 协商出的流量控制策略执行方为上述 Host;
又举例来说,基于上述虚拟机的流量控制能力在上述虚拟机与 Host之间协 商流量控制策略的执行方, 包括: 虚拟机向 Host发送携带上述虚拟机的流量控 制能力的描述信息的执行方协商请求;上述虚拟机若接收到上述 Host在根据上 述流量控制能力的描述信息确定上述虚拟机支持执行流量控制策略之后发送 的协商确认指示,则上述虚拟机确定协商出的流量控制策略执行方为上述虚拟 机;上述虚拟机若在第一设定时长内未接收到上述 Host发送的用于响应上述执 行方协商请求的协商确认指示,则上述虚拟机确定协商出的流量控制策略执行 方为上述 Host。
又举例来说,上述基于虚拟机的流量控制能力在上述虚拟机与 Host之间协 商流量控制策略的执行方, 包括: 虚拟机向 Host发送携带上述虚拟机的流量控 制能力的描述信息的执行方协商请求, 其中, 上述流量控制能力的描述信息用 于描述出上述虚拟机支持执行的流量控制策略的版本;上述虚拟机若接收到上 述 Host在根据上述流量控制能力的描述信息确定上述虚拟机支持执行当前最 新版本或者预设版本的流量控制策略之后发送的协商确认指示,则上述虚拟机 确定协商出的流量控制策略执行方为上述虚拟机;上述虚拟机若在第一设定时 长内未接收到上述 Host发送的用于响应上述执行方协商请求的协商确认指示, 则上述虚拟机确定协商出的流量控制策略执行方为上述 Host。
又举例来说,上述基于虚拟机的流量控制能力在上述虚拟机与 Host之间协 商流量控制策略的执行方, 包括: 虚拟机向 Host发送携带上述虚拟机的流量控 制能力的描述信息的执行方协商请求;上述虚拟机若接收到上述 Host在根据上 述流量控制能力的描述信息确定上述虚拟机不支持执行流量控制策略之后发 送的协商否认指示, 则上述虚拟机确定协商出的流量控制策略执行方为上述 Host; 上述虚拟机在第二设定时长内未接收到上述 Host发送的用于响应上述执 行方协商请求的协商否认指示,则上述虚拟机确定协商出的流量控制策略执行 方为上述虚拟机。
又举例来说,上述基于虚拟机的流量控制能力在上述虚拟机与 Host之间协 商流量控制策略的执行方, 包括: 虚拟机向 Host发送携带上述虚拟机的流量控 制能力的描述信息的执行方协商请求, 其中, 上述流量控制能力的描述信息用 于描述出上述虚拟机支持执行的流量控制策略的版本;上述虚拟机若接收到上 述 Host在根据上述流量控制能力的描述信息确定上述虚拟机支持执行当前最 新版本或者预设版本的流量控制策略之后发送的协商否认指示,则上述虚拟机 确定协商出的流量控制策略执行方为上述 Host;上述虚拟机若在第二设定时长 内未接收到上述 Host发送的用于响应上述执行方协商请求的协商否认指示,则 上述虚拟机确定协商出的流量控制策略执行方为上述虚拟机。
在本发明的一些实施例中,由于上述流量控制能力的描述信息用于描述出 上述虚拟机支持执行的流量控制策略的版本, 因此, Host根据上述流量控制能 力的描述信息确定上述虚拟机是否支持执行当前最新版本或者预设版本的流 量控制策略具体可包括:比较上述流量控制能力的描述信息所描述出上述虚拟 机支持执行的流量控制策略的版本是否与流量控制策略的当前最新版本或者 预设版本相同, 若是, 则可确定上述虚拟机支持执行当前最新版本或者预设版 本的流量控制策略; 若否, 则可确定上述虚拟机不支持执行当前最新版本或者 预设版本的流量控制策略。 又例如, Host根据上述流量控制能力的描述信息确 定上述虚拟机是否支持执行当前最新版本或者预设版本的流量控制策略具体 可包括:比较上述流量控制能力的描述信息所描述出上述虚拟机支持执行的流 量控制策略的 k个(其中, k为正整数)版本中的每个版本, 是否与流量控制策 略的当前最新版本或者预设版本相同,若比较出上述 k个版本中的其中 1个版本 与流量控制策略的当前最新版本或者预设版本相同,则可确定上述虚拟机支持 执行当前最新版本或者预设版本的流量控制策略; 若比较出上述 k个版本中的 任意 1个版本与流量控制策略的当前最新版本或者预设版本均不同, 则可确定 上述虚拟机不支持执行当前最新版本或者预设版本的流量控制策略。
可以理解,虚拟机与宿主机 Host基于上述虚拟机的流量控制能力在上述虚 拟机与 Host之间协商流量控制策略的执行方的具体方式并不限于上述举例。
302、 若确定出协商出的流量控制策略执行方为上述虚拟机, 则上述虚拟 机可基于上述流量控制策略对待转发处理的报文进行转发处理。
303、 若确定出协商出的流量控制策略的执行方为上述 Host, 则上述虚拟 机将待转发处理的报文发送给上述 Host, 以便于上述 Host基于上述流量控制策 略对接收到的上述报文进行转发处理。
本实施例中提及的流量控制策略例如可为基于服务质量的流量控制策略 和 /或基于访问控制列表的流量控制策略, 当然流量控制策略也可是参考其他 因素的流量控制策略。
其中,基于服务质量的流量控制策略主要基于待转发处理报文对应的业务 优先级, 来确定该报文的具体转发处理方式(其中, 具体转发处理方式可以是 延迟发送报文、 无延迟的发送报文或丟弃报文等)。 例如, 当前緩存中存在多 个待转发处理的报文,则所对应业务优先级越高的报文发送延迟可能越短甚至 无延迟, 所对应业务优先级越低的报文发送延迟可能越长,甚至可以丟弃所对 的保障高优先级业务的服务质量。 即,基于服务质量的流量控制策略对待转发 处理的报文进行转发处理具体可包括:按照待转发处理报文的业务优先级所对 应的转发处理方式对该待转发处理的报文进行转发处理。
其中,基于访问控制列表的流量控制策略, 主要基于待转发处理报文所携 带信息与访问控制列表所包含记录之间是否匹配,来确定报文的具体转发处理 方式。 例如, 访问控制列表为限制访问控制列表(类似黑名单), 对于待转发 处理报文的源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包 含的特定关键字等等信息, 若限制访问控制列表中有与之匹配的记录, 则该待 转发处理报文的转发处理方式可以是直接丟弃,反之,对于待转发处理报文的 源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包含的关键字 等信息,若限制访问控制列表中没有与之匹配的记录, 则该待转发处理报文的 转发处理方式可以是转发该报文。 又举例来说,假设访问控制列表为允许访问 控制列表(类似白名单), 则对于待转发处理报文的源 /目的地址、 应用层协议 类型、 传输层协议类型和 /或报文头所包含的特定关键字等信息, 若允许访问 控制列表中没有与之匹配的记录,则该待转发处理报文的转发处理方式可为直 接丟弃, 而对于待转发处理报文的源 /目的地址、 应用层协议类型、 传输层协 议类型和 /或报文头所包含的关键字等信息, 若允许访问控制列表中有与之匹 配的记录, 则该待转发处理报文的转发处理方式可为转发该报文。 其它情况以 此类推。
在本发明一些实施例中, 上述协商确认指示中包含上述流量控制策略; 上 述虚拟机基于上述流量控制策略对待转发处理的报文进行转发处理包括:上述 虚拟机基于上述协商确认指示中包含的流量控制策略对待转发处理的报文进 行转发处理。
当然, Host亦可通过其它方式将流量控制策略传递给虚拟机, 以便于虚拟 机在确定协商出的流量控制策略执行方为上述虚拟机之后,基于 Host传递过来 的流量控制策略对待转发处理的报文进行转发处理。 当然,也可以在虚拟机中 预配置流量控制策略,当上述虚拟机确定协商出的流量控制策略执行方为上述 虚拟机,上述虚拟机基于预配置的流量控制策略对待转发处理的报文进行转发 处理。
在本发明一些实施例中,上述虚拟机向 Host发送携带上述虚拟机的流量控 制能力的描述信息的执行方协商请求包括:虚拟机在接收到用户态进程发起的 协商启动请求(即可能又用户态应用或用户指令触发)之后, 向 Host发送携带 上述虚拟机的流量控制能力的描述信息的执行方协商请求;或者虚拟机可在接 收到来自上述 Host的协商启动请求之后, 向上述 Host发送携带上述虚拟机的流 量控制能力的描述信息的执行方协商请求。 当然,虚拟机亦可自主或在其它条 件的触发下,向 Host发送携带上述虚拟机的流量控制能力的描述信息的执行方 协商请求。
在本发明一些实施例中, 可在虚拟机中部署于预载客户端, 可 Host中部署 于预载服务端,可由预载客户端和预载服务端来基于上述虚拟机的流量控制能 力在上述虚拟机与 Host之间协商流量控制策略的执行方。 例如, 上述基于上述 虚拟机的流量控制能力在上述虚拟机与 Host之间协商流量控制策略的执行方 可包括:部署于虚拟机中的预载客户端与部署于 Host中的预载服务端之间的连 接建立完成之后,上述预载客户端基于建立的上述连接与上述预载服务端基于 上述虚拟机的流量控制能力,在上述虚拟机与 Host之间协商流量控制策略的执 行方。
在本发明一些实施例中, 进一步的, 在确定协商出的流量控制策略执行方 为上述虚拟机之后,上述预载客户端基于上述连接周期性的向上述预载服务端 发送心跳消息。其中,发送心跳消息的目的之一是将虚拟机工作正常的状态通 知 Host, Host若在设定时长内未接收到来自上述虚拟机的心跳消息, 则 Host可 默认为虚拟机可能存在故障。例如 Host在确定协商出的流量控制策略的执行方 为上述虚拟机之后, 若在设定时长内未接收到来自上述虚拟机的心跳消息, 则 上述 Host可将流量控制策略的执行方切换为上述 Host (即无论虚拟机是否基于 流量控制策略对待转发处理的报文进行转发处理, Host也基于流量控制策略对 来自该虚拟机的报文进行转发处理,由于 Host和虚拟机中执行的流量控制策略 相同, 因此, 对于同一报文流, 若 Host和 /或虚拟机执行流量控制策略, 最终 报文输出情况是基本相同的), 可向或不向上述虚拟机发送用于指示流量控制 策略的执行方切换为上述 Host的指示消息。
在本发明一些实施例中,在确定协商出的流量控制策略执行方为上述虚拟 机之后, 上述预载客户端亦可在虚拟机执行流量控制策略故障时, 向预载服务 端发送用于指示虚拟机执行流量控制策略故障的指示消息,而 Host在确定协商 出的流量控制策略的执行方为上述虚拟机之后,若接收到来自虚拟机的用于指 示虚拟机执行流量控制策略故障的指示消息,则上述 Host可将流量控制策略的 执行方切换为上述 Host。
在本发明一些实施例中,在确定协商出的流量控制策略执行方为上述虚拟 机之后,预载服务端亦可周期性的或非周期性的向预载客户端发送用于查询虚 拟机执行流量控制策略是否正常的状态查询消息,若在设定时长之内未接收到 来自虚拟机的用于响应上述状态查询消息的状态指示消息,或接收到来自虚拟 机的用于指示虚拟机执行流量控制策略故障的指示消息,则可确定虚拟机执行 流量控制策略故障。 当然,预载服务端亦可通过其它方式监测虚拟机执行流量 控制策略是否故障。 若确定虚拟机执行流量控制策略故障, Host可将流量控制 策略的执行方切换为上述 Host。
可以看出, 本实施例的方案中,基于上述虚拟机的流量控制能力在上述虚 拟机与 Host之间协商流量控制策略的执行方;若确定协商出的流量控制策略执 行方为上述虚拟机,则上述虚拟机基于上述流量控制策略对待转发处理的报文 进行转发处理; 若确定协商出的流量控制策略的执行方为上述 Host, 则上述虚 拟机将待转发处理的报文发送给上述 Host, 以便上述 Host基于上述流量控制策 略对接收到的上述报文进行转发处理。通过引入虚拟机与 Host协商流量控制策 略执行方的机制, 使得虚拟机与 Host都有机会成为流量控制策略执行方, 这使 得由执行虚拟机流量控制策略变得可能,这样就有利于尽可能早的对报文流进 行流量控制, 进而有利于减少无效处理、 减少无效报文流量对带宽和 Host地址 空间的占用。可见, 上述方案有利于减少转发处理虚拟机出方向的报文流量对 Host地址空间的占用。 并且由于是通过协商来确定流量控制策略执行方, 因此 有利于提高流量控制策略执行的可靠性。
进一步的, 当虚拟机与 Host都支持执行流量控制策略时, 优先让虚拟机来 执行流量控制策略, 这样进一步有利于尽可能早的对报文进行流量控制, 进而 进一步有利于减少无效处理和无效报文流量对带宽的占用。 本发明流量控制方法的另一个实施例, 另一种报文流量控制方法包括: 基 于虚拟机的流量控制能力在上述虚拟机与 Host之间协商流量控制策略的执行 方; 上述 Host若确定协商出的流量控制策略执行方为上述 Host, 上述 Host在接 收到来自上述虚拟机的报文之后,基于上述流量控制策略对接收到的上述报文 进行转发处理。
请参见图 4-a, 图 4-a为本发明的另一个实施例提供的另一种报文流量控制 方法的流程示意图。 其中, 如图 4-a所示, 本发明的另一个实施例提供的另一 种报文流量控制方法可包括以下内容:
401、 基于虚拟机的流量控制能力在上述虚拟机与 Host之间协商流量控制 策略的执行方。
在本发明一些实施例中, Host与虚拟机可通过多种方式来基于上述虚拟机 的流量控制能力在上述虚拟机与 Host之间协商流量控制策略的执行方。
举例来说,上述宿主机 Host与虚拟机基于上述虚拟机的流量控制能力在上 述虚拟机与 Host之间协商流量控制策略的执行方, 可包括: Host接收虚拟机发 送的携带上述虚拟机的流量控制能力的描述信息的执行方协商请求; 若上述 Host根据上述流量控制能力的描述信息确定上述虚拟机支持执行流量控制策 略, 则向上述虚拟机发送协商确认指示, 上述协商确认指示用于表示协商出的 流量控制策略执行方为上述虚拟机; 和 /或, 若上述 Host根据上述流量控制能 力的描述信息确定上述虚拟机不支持执行流量控制策略,则向上述虚拟机发送 协商否认指示,上述协商否认指示用于表示协商出的流量控制策略执行方为上 述 Host。
又举例来说,上述宿主机 Host与虚拟机基于上述虚拟机的流量控制能力在 上述虚拟机与 Host之间协商流量控制策略的执行方, 可包括: Host接收虚拟机 发送的携带上述虚拟机的流量控制能力的描述信息的执行方协商请求, 其中, 上述流量控制能力的描述信息用于描述出上述虚拟机支持执行的流量控制策 略的版本;若上述 Host根据上述流量控制能力的描述信息确定上述虚拟机支持 执行当前最新版本或者预设版本的流量控制策略,则向上述虚拟机发送协商确 认指示, 其中, 上述协商确认指示用于表示协商出的流量控制策略执行方为上 述虚拟机; 和 /或若上述 Hos 艮据上述流量控制能力的描述信息确定上述虚拟 机不支持执行当前最新版本或者预设版本的流量控制策略,则向上述虚拟机发 送协商否认指示, 其中, 上述协商否认指示用于表示协商出的流量控制策略执 行方为上述 Host。
可以理解,虚拟机与宿主机 Host基于上述虚拟机的流量控制能力在上述虚 拟机与 Host之间协商流量控制策略的执行方的具体方式并不限于上述举例。
402、 若确定协商出的流量控制策略执行方为上述 Host, 上述 Host在接收 到来自上述虚拟机的报文之后,基于上述流量控制策略对接收到的上述报文进 行转发处理。
可以理解的是, 上面提到的 "双方"是指参与协商流量控制策略执行方的 对象双方, 而此处, 这对象双方即上述虚拟机与上述 Host。
此外, 若协商出的流量控制策略执行方为该虚拟机, 则上述虚拟机可基于 上述流量控制策略对待转发处理的报文进行转发处理。
本实施例中提及的流量控制策略例如可为基于服务质量的流量控制策略 和 /或基于访问控制列表的流量控制策略, 当然流量控制策略也可是参考其他 因素的流量控制策略。
其中,基于服务质量的流量控制策略主要基于待转发处理报文对应的业务 优先级, 来确定该报文的具体转发处理方式(其中, 具体转发处理方式可以是 延迟发送报文、 无延迟的发送报文或丟弃报文等)。 例如, 当前緩存中存在多 个待转发处理的报文,则所对应业务优先级越高的报文发送延迟可能越短甚至 无延迟, 所对应业务优先级越低的报文发送延迟可能越长,甚至可以丟弃所对 的保障高优先级业务的服务质量。 即,基于服务质量的流量控制策略对待转发 处理的报文进行转发处理具体可包括:按照待转发处理报文的业务优先级所对 应的转发处理方式对该待转发处理的报文进行转发处理。
其中,基于访问控制列表的流量控制策略, 主要基于待转发处理报文所携 带信息与访问控制列表所包含记录之间是否匹配,来确定报文的具体转发处理 方式。 例如, 访问控制列表为限制访问控制列表(类似黑名单), 对于待转发 处理报文的源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包 含的特定关键字等等信息, 若限制访问控制列表中有与之匹配的记录, 则该待 转发处理报文的转发处理方式可以是直接丟弃,反之,对于待转发处理报文的 源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包含的关键字 等信息,若限制访问控制列表中没有与之匹配的记录, 则该待转发处理报文的 转发处理方式可以是转发该报文。 又举例来说,假设访问控制列表为允许访问 控制列表(类似白名单), 则对于待转发处理报文的源 /目的地址、 应用层协议 类型、 传输层协议类型和 /或报文头所包含的特定关键字等信息, 若允许访问 控制列表中没有与之匹配的记录,则该待转发处理报文的转发处理方式可为直 接丟弃, 而对于待转发处理报文的源 /目的地址、 应用层协议类型、 传输层协 议类型和 /或报文头所包含的关键字等信息, 若允许访问控制列表中有与之匹 配的记录, 则该待转发处理报文的转发处理方式可为转发该报文。 其它情况以 此类推。
在本发明一些实施例中, 上述协商确认指示包含上述流量控制策略; 上述 虚拟机基于上述流量控制策略对待转发处理的报文进行转发处理包括:上述虚 拟机基于上述协商确认指示中包含的流量控制策略对待转发处理的报文进行 转发处理。
当然, Host亦可通过其它方式将流量控制策略传递给虚拟机, 以便于虚拟 机在确定协商出的流量控制策略执行方为上述虚拟机之后,基于 Host传递过来 的流量控制策略对待转发处理的报文进行转发处理。 当然,也可以在虚拟机中 预配置流量控制策略,当上述虚拟机确定协商出的流量控制策略执行方为上述 虚拟机,上述虚拟机基于预配置的流量控制策略对待转发处理的报文进行转发 处理。
在本发明一些实施例中, 可在虚拟机中部署于预载客户端, 可 Host中部署 于预载服务端,可由预载客户端和预载服务端来基于上述虚拟机的流量控制能 力在上述虚拟机与 Host之间协商流量控制策略的执行方。 例如, 上述虚拟机与 宿主机 Host基于上述虚拟机的流量控制能力在上述虚拟机与 Host之间协商流 量控制策略的执行方可包括:部署于 Host中的预载服务端与部署于虚拟机中的 预载客户端之间的连接建立完成之后,上述预载服务端基于建立的上述连接与 上述预载客户端基于上述虚拟机的流量控制能力,在上述虚拟机与 Host之间协 商流量控制策略的执行方。
在本发明一些实施例中, 进一步的, 在确定协商出的流量控制策略执行方 为上述虚拟机之后,上述预载客户端可基于上述连接周期性的向上述预载服务 端发送心跳消息。 发送心跳消息的目的之一是将虚拟机工作正常的状态通知 Host, Host若在设定时长内未接收到来自上述虚拟机的心跳消息, 则 Host可默 认为虚拟机可能存在故障。 举例来说, Host在确定协商出的流量控制策略的执 行方为上述虚拟机之后, 若在设定时长内未接收到来自上述虚拟机的心跳消 息, 则上述 Host可将流量控制策略的执行方切换为上述 Host (即无论虚拟机是 否基于流量控制策略对待转发处理的报文进行转发处理, Host也基于流量控制 策略对来自该虚拟机的报文进行转发处理,由于 Host和虚拟机中执行的流量控 制策略相同, 因此, 对于同一报文流而言, 若 Host和 /或虚拟机执行流量控制 策略, 最终报文输出情况是基本相同的), 可向或不向上述虚拟机发送用于指 示流量控制策略的执行方切换为上述 Host的指示消息。
可以看出, 本实施例的方案中, Host与虚拟机基于上述虚拟机的流量控制 能力在上述虚拟机与 Host之间协商流量控制策略的执行方; 上述 Host若确定协 商出的流量控制策略执行方为上述 Host, 上述 Host在接收到来自上述虚拟机的 报文之后,基于上述流量控制策略对接收到的上述报文进行转发处理。通过引 入虚拟机与 Host协商流量控制策略执行方的机制, 使得虚拟机与 Host都有机会 成为流量控制策略执行方, 这使得由执行虚拟机流量控制策略变得可能, 这样 就有利于尽可能早的对报文流进行流量控制, 进而有利于减少无效处理、减少 无效报文流量对带宽和 Host地址空间的占用。 可见, 上述方案有利于减少转发 处理虚拟机出方向的报文流量对 Host地址空间的占用。 并且, 由于是通过协商 方式来确定流量控制策略执行方, 因此有利于提高流量控制策略执行的可靠 性。
进一步的, 当虚拟机与 Host都支持执行流量控制策略时, 优先让虚拟机来 执行流量控制策略, 这样进一步有利于尽可能早的对报文进行流量控制, 进而 进一步有利于减少无效处理和无效报文流量对带宽的占用。
本发明实施例还提供一种报文流量控制方法, 可包括: 基于虚拟机的流量 控制能力, 在宿主机 Host和所述虚拟机之间协商出流量控制策略的执行方; 若 协商出的流量控制策略执行方为所述虚拟机,则基于所述流量控制策略对所述 虚拟机待转发处理的报文进行转发处理;若协商出的流量控制策略的执行方为 所述 Host, 则将所述虚拟机待转发处理的报文发送给所述 Host; 基于所述流量 控制策略对所述 Host接收到的待转发处理的所述报文进行转发处理。
在本发明一些实施例中, 所述基于虚拟机的流量控制能力, 在宿主机 Host 和所述虚拟机之间协商出流量控制策略的执行方包括:
向 Host发送所述虚拟机待向所述 Host发送的执行方协商请求, 所述执行方 协商请求携带所述虚拟机的流量控制能力的描述信息;
在所述 Host接收到所述执行方协商请求之后,若根据所述流量控制能力的 描述信息确定所述虚拟机支持执行流量控制策略, 则向所述虚拟机发送所述 Host待向所述虚拟机发送的协商确认指示, 其中, 所述协商确认指示用于表示 协商出的流量控制策略执行方为所述虚拟机; 和 /或, 若根据所述流量控制能 力的描述信息确定所述虚拟机不支持执行流量控制策略,则向所述虚拟机发送 所述 Host待向所述虚拟机发送的协商否认指示,所述协商否认指示用于表示协 商出的流量控制策略执行方为所述 Host;
或者,
所述基于虚拟机的流量控制能力,在宿主机 Host和所述虚拟机之间协商出 流量控制策略的执行方包括:
向 Host发送所述虚拟机待向所述 Host发送的执行方协商请求, 所述执行方 协商请求携带所述虚拟机的流量控制能力的描述信息,所述流量控制能力的描 述信息用于描述出所述虚拟机支持执行的流量控制策略的版本;
在所述 Host接收到所述执行方协商请求之后,若根据所述流量控制能力的 描述信息,确定所述虚拟机支持执行当前最新版本或者预设版本的流量控制策 略, 则向所述虚拟机发送所述 Host待向所述虚拟机发送的协商确认指示, 所述 协商确认指示用于表示协商出的流量控制策略执行方为所述虚拟机; 和 /或若 根据所述流量控制能力的描述信息确定所述虚拟机不支持执行当前最新版本 或者预设版本的流量控制策略,则向所述虚拟机发送所述 Host待向所述虚拟机 发送的协商否认指示, 其中, 所述协商否认指示用于表示协商出的流量控制策 略执行方为所述 Host。
在本发明一些实施例中, 所述协商确认指示中包含所述流量控制策略; 其中,所述基于所述流量控制策略对所述虚拟机待转发处理的报文进行转 发处理包括:基于所述协商确认指示中包含的所述流量控制策略对所述虚拟机 待转发处理的报文进行转发处理。
在本发明一些实施例中,在协商出的流量控制策略的执行方为所述虚拟机 之后, 若所述 Host在设定时长内未接收到来自所述虚拟机的心跳消息, 向所述 虚拟机发送所述 Host待向所述虚拟机发送的,用于指示流量控制策略的执行方 切换为所述 Host的指示消息。
本实施例中提及的上述处理器处理待转发处理的报文所基于的流量控制 策略例如可为基于服务质量的流量控制策略和 /或基于访问控制列表的流量控 制策略, 当然流量控制策略也可是参考其他因素的流量控制策略。
其中,基于服务质量的流量控制策略主要基于待转发处理报文对应的业务 优先级, 来确定该报文的具体转发处理方式(其中, 具体转发处理方式可以是 延迟发送报文、 无延迟的发送报文或丟弃报文等)。 例如, 当前緩存中存在多 个待转发处理的报文,则所对应业务优先级越高的报文发送延迟可能越短甚至 无延迟, 所对应业务优先级越低的报文发送延迟可能越长,甚至可以丟弃所对 的保障高优先级业务的服务质量。 即,基于服务质量的流量控制策略对待转发 处理的报文进行转发处理具体可包括:按照待转发处理报文的业务优先级所对 应的转发处理方式对该待转发处理的报文进行转发处理。
其中,基于访问控制列表的流量控制策略, 主要基于待转发处理报文所携 带信息与访问控制列表所包含记录之间是否匹配,来确定报文的具体转发处理 方式。 例如, 访问控制列表为限制访问控制列表(类似黑名单), 对于待转发 处理报文的源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包 含的特定关键字等等信息, 若限制访问控制列表中有与之匹配的记录, 则该待 转发处理报文的转发处理方式可以是直接丟弃,反之,对于待转发处理报文的 源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包含的关键字 等信息, 若限制访问控制列表中没有与之匹配的记录, 则该待转发处理报文的 转发处理方式可以是转发该报文。 又举例来说,假设访问控制列表为允许访问 控制列表(类似白名单), 则对于待转发处理报文的源 /目的地址、 应用层协议 类型、 传输层协议类型和 /或报文头所包含的特定关键字等信息, 若允许访问 控制列表中没有与之匹配的记录,则该待转发处理报文的转发处理方式可为直 接丟弃, 而对于待转发处理报文的源 /目的地址、 应用层协议类型、 传输层协 议类型和 /或报文头所包含的关键字等信息, 若允许访问控制列表中有与之匹 配的记录, 则该待转发处理报文的转发处理方式可为转发该报文。 其它情况以 此类推。
在本发明一些实施例中, 所述向 Host发送所述虚拟机待向所述 Host发送的 执行方协商请求包括: 在虚拟机在接收到用户态进程发起的协商启动请求之 后, 向 Host发送所述虚拟机待向所述 Host发送的执行方协商请求; 或者, 在虚 拟机在接收到来自所述 Host的协商启动请求之后, 向所述 Host发送所述虚拟机 待向所述 Host发送的执行方协商请求。
在本发明一些实施例中, 基于虚拟机的流量控制能力, 在宿主机 Host和所 述虚拟机之间协商出流量控制策略的执行方包括:在部署于虚拟机中的预载客 户端与部署于 Host中的预载服务端之间的连接建立完成之后,通过建立的所述 连接, 基于虚拟机的流量控制能力, 在宿主机 Host和所述虚拟机之间协商出流 量控制策略的执行。
其中, 本实施例上述步骤可由处理器或其它硬件来执行。 请参见图 4-b, 图 4-b为本发明的另一个实施例提供的另一种报文流量控制 方法的流程示意图。 其中, 如图 4-b所示, 本发明的另一个实施例提供的另一 种报文流量控制方法可包括以下内容:
s401、 处理器基于虚拟机的流量控制能力, 在宿主机 Host和上述虚拟机之 间协商出流量控制策略的执行方。
s402、 若协商出的流量控制策略执行方为上述虚拟机, 则上述处理器基于 s403、 若协商出的流量控制策略的执行方为上述 Host, 则上述处理器将上 述虚拟机待转发处理的报文发送给上述 Host;上述处理器基于上述流量控制策 略对上述 Host接收到的待转发处理的上述报文进行转发处理。
在本发明一些实施例中, 上述处理器基于虚拟机的流量控制能力, 在宿主 机 Host和上述虚拟机之间协商出流量控制策略的执行方, 可包括:
上述处理器基于虚拟机的流量控制能力,在宿主机 Host和上述虚拟机之间 协商出流量控制策略的执行方包括:上述处理器向 Host发送上述虚拟机待向上 述 Host发送的执行方协商请求,上述执行方协商请求携带上述虚拟机的流量控 制能力的描述信息;
在上述 Host接收到上述执行方协商请求之后,上述处理器若根据上述流量 控制能力的描述信息确定上述虚拟机支持执行流量控制策略,则上述处理器向 上述虚拟机发送上述 Host待向上述虚拟机发送的协商确认指示, 其中, 上述协 商确认指示用于表示协商出的流量控制策略执行方为上述虚拟机; 和 /或, 上 述处理器若根据上述流量控制能力的描述信息,确定上述虚拟机不支持执行流 量控制策略,则上述处理器向上述虚拟机发送上述 Host待向上述虚拟机发送的 协商否认指示, 其中, 上述协商否认指示用于表示协商出的流量控制策略执行 方为上述 Host;
或者,
上述处理器基于虚拟机的流量控制能力,在宿主机 Host和上述虚拟机之间 协商出流量控制策略的执行方包括:上述处理器向 Host发送上述虚拟机待向上 述 Host发送的执行方协商请求,上述执行方协商请求携带上述虚拟机的流量控 制能力的描述信息,上述流量控制能力的描述信息用于描述出上述虚拟机支持 执行的流量控制策略的版本;
在上述 Host接收到上述执行方协商请求之后,上述处理器若根据上述流量 控制能力的描述信息,确定上述虚拟机支持执行当前最新版本或者预设版本的 流量控制策略,则上述处理器向上述虚拟机发送上述 Host待向上述虚拟机发送 的协商确认指示,上述协商确认指示用于表示协商出的流量控制策略执行方为 上述虚拟机; 和 /或上述处理器若根据上述流量控制能力的描述信息确定上述 虚拟机不支持执行当前最新版本或者预设版本的流量控制策略,则上述处理器 向上述虚拟机发送上述 Host待向上述虚拟机发送的协商否认指示, 其中, 上述 协商否认指示用于表示协商出的流量控制策略执行方为上述 Host。 在本发明一些实施例中, 上述协商确认指示中包含上述流量控制策略。 其中,上述处理器基于上述流量控制策略对上述虚拟机待转发处理的报文 进行转发处理包括:上述处理器基于上述协商确认指示中包含的上述流量控制 当然, Host亦可通过其它方式将流量控制策略传递给虚拟机, 以便于在确 定协商出的流量控制策略执行方为上述虚拟机之后,上述处理器基于 Host传递 过来的流量控制策略对虚拟机待转发处理的报文进行转发处理。 当然,也可以 在虚拟机中预配置流量控制策略,当确定协商出的流量控制策略执行方为上述 虚拟机,上述处理器基于预配置的流量控制策略对上述虚拟机待转发处理的报 文进行转发处理。
在本发明的一些实施例中,在协商出的流量控制策略的执行方为上述虚拟 机后, 若上述 Host在设定时长内未接收到来自上述虚拟机的心跳消息, 上述处 理器向上述虚拟机发送上述 Host待向上述虚拟机发送的,用于指示流量控制策 略的执行方切换为上述 Host的指示消息。
在本发明一些实施例中,上述流量控制策略为基于服务质量的流量控制策 略和 /或基于访问控制列表的流量控制策略。
在本发明一些实施例中, 上述处理器向 Host发送上述虚拟机待向上述 Host 发送的执行方协商请求可包括:
在虚拟机在接收到用户态进程发起的协商启动请求之后, 上述处理器向 Host发送上述虚拟机待向上述 Host发送的执行方协商请求; 或者, 在虚拟机在 接收到来自上述 Host的协商启动请求之后, 上述处理器向上述 Host发送上述虚 拟机待向上述 Host发送的执行方协商请求。
本实施例中提及的上述处理器处理待转发处理的报文所基于的流量控制 策略例如可为基于服务质量的流量控制策略和 /或基于访问控制列表的流量控 制策略, 当然流量控制策略也可是参考其他因素的流量控制策略。
其中,基于服务质量的流量控制策略主要基于待转发处理报文对应的业务 优先级, 来确定该报文的具体转发处理方式(其中, 具体转发处理方式可以是 延迟发送报文、 无延迟的发送报文或丟弃报文等)。 例如, 当前緩存中存在多 个待转发处理的报文,则所对应业务优先级越高的报文发送延迟可能越短甚至 无延迟, 所对应业务优先级越低的报文发送延迟可能越长,甚至可以丟弃所对 的保障高优先级业务的服务质量。 即,基于服务质量的流量控制策略对待转发 处理的报文进行转发处理具体可包括:按照待转发处理报文的业务优先级所对 应的转发处理方式对该待转发处理的报文进行转发处理。
其中,基于访问控制列表的流量控制策略, 主要基于待转发处理报文所携 带信息与访问控制列表所包含记录之间是否匹配,来确定报文的具体转发处理 方式。 例如, 访问控制列表为限制访问控制列表(类似黑名单), 对于待转发 处理报文的源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包 含的特定关键字等等信息, 若限制访问控制列表中有与之匹配的记录, 则该待 转发处理报文的转发处理方式可以是直接丟弃,反之,对于待转发处理报文的 源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包含的关键字 等信息,若限制访问控制列表中没有与之匹配的记录, 则该待转发处理报文的 转发处理方式可以是转发该报文。 又举例来说,假设访问控制列表为允许访问 控制列表(类似白名单), 则对于待转发处理报文的源 /目的地址、 应用层协议 类型、 传输层协议类型和 /或报文头所包含的特定关键字等信息, 若允许访问 控制列表中没有与之匹配的记录,则该待转发处理报文的转发处理方式可为直 接丟弃, 而对于待转发处理报文的源 /目的地址、 应用层协议类型、 传输层协 议类型和 /或报文头所包含的关键字等信息, 若允许访问控制列表中有与之匹 配的记录, 则该待转发处理报文的转发处理方式可为转发该报文。 其它情况以 此类推。
在本发明一些实施例中, 上述基于虚拟机的流量控制能力, 在宿主机 Host 和上述虚拟机之间协商出流量控制策略的执行方, 可包括: 在部署于虚拟机中 的预载客户端与部署于 Host中的预载服务端之间的连接建立完成之后,上述处 理器通过建立的上述连接, 基于虚拟机的流量控制能力, 在宿主机 Host和上述 虚拟机之间协商出流量控制策略的执行。
可以看出, 本实施例的方案中, 在处理器的协助下, 虚拟机与宿主机 Host 基于上述虚拟机的流量控制能力在上述虚拟机与 Host之间协商流量控制策略 的执行方; 若上述虚拟机确定协商出的流量控制策略执行方为上述虚拟机, 则 上述虚拟机基于上述流量控制策略对待转发处理的报文进行转发处理;若上述 虚拟机确定协商出的流量控制策略的执行方为上述 Host,则上述虚拟机将待转 发处理的报文发送给上述 Host, 以便上述 Host基于上述流量控制策略对接收到 的上述报文进行转发处理。通过弓 I入虚拟机与 Host协商流量控制策略执行方的 机制, 使得虚拟机与 Host都有机会成为流量控制策略执行方, 这使得由执行虚 拟机流量控制策略变得可能, 这样就有利于尽可能早的对报文流进行流量控 制, 进而有利于减少无效处理、 减少无效报文流量对带宽和 Host地址空间的占 用。 可见, 上述方案有利于减少转发处理虚拟机出方向的报文流量对 Host地址 空间的占用。 并且由于是通过协商来确定流量控制策略执行方, 因此有利于提 高流量控制策略执行的可靠性。
进一步的, 当虚拟机与 Host都支持执行流量控制策略时, 优先让虚拟机来 执行流量控制策略, 这样进一步有利于尽可能早的对报文进行流量控制, 进而 进一步有利于减少无效处理和无效报文流量对带宽的占用。 为便于更好的理解和实施本发明实施例的上述方案,下面通过一些具体例 子进行举例说明。
参见图 5-a和图 5-b, 其中, 图 5-a为本发明的另一个实施例提供的另一种报 文流量控制方法的流程示意图。 图 5-b为本发明实施例提供的一种可用于实施 如图 5-a所示流量控制方法的计算节点结构示意图。 图 5-b中举例部署于计算节 点中的 Host和虚拟机的一种具体内部逻辑架构, 当然 Host和虚拟机亦可具有区 别于图 5-b举例的其它内部逻辑架构。 本实施例中主要以在图 5-b所示架构下实 施流量控制方法为例进行描述。
如图 5-a所示, 本发明的另一个实施例提供的另一种报文流量控制方法可 包括以下内容:
501、 虚拟机 VM-m中部署的预载客户端 (英文: preload client )与 Host中 部署的预载服务端 (英文: preload server )建立连接。 其中, 该连接传输控制 协议连接或其它类型的通信连接。
其中,虚拟机 VM-m中部署的 preload client与 Host中部署的 preload server之 间存在固有通信连接或可直接通信, 则步骤 501亦可省略之。 502、 虚拟机 VM-m中部署的 preload client接收 Host中部署的 preload server 发送的协商启动请求。
503、 虚拟机 VM-m中部署的 preload client, 向 Host中部署的 preload server 发送携带虚拟机 VM-m的流量控制能力的描述信息的执行方协商请求。
可以理解, 步骤 502中 Host中部署的 preload server向虚拟机 VM-m中部署的 preload client发送协商启动请求, 主要目的是为了触发虚拟机 VM-m中部署的 preload client发起协商流量控制策略执行方, 当然, 虚拟机 VM-m中部署的 preload client也可能在其它条件(举例来说, 接收到用户态进程发起的协商启 动请求(即可能由用户态应用或用户指令触发)) 的触发下, 发起协商流量控 制策略执行方。 若虚拟机 VM-m中部署的 preload client自主发起流量控制策略 执行方的协商, 则步骤 502可以省略。
504、 Host中部署的 preload server接收携带虚拟机 VM-m的流量控制能力的 描述信息的执行方协商请求, 其中, 该执行方协商请求携带的上述流量控制能 力的描述信息用于指示出虚拟机 VM-m是否支持执行流量控制策略, 因此 Host 中部署的 preload server可根据上述流量控制能力的描述信息, 确定上述虚拟机
VM-m是否支持执行流量控制策略。
本实施例下面以 Host中部署的 preload server确定上述虚拟机 VM-m支持执 行流量控制策略为例。 因此, Host中部署的 preload server可向虚拟机 VM-m中 部署的 preload client发送协商确认指示, 其中, 上述协商确认指示用于表示协 商出的流量控制策略执行方为上述虚拟机 VM-m, 其中, 上述协商确认指示中 可携带流量控制策略。 其中, Host中部署的 preload server还通知 Host中部署的 预载内核 (英文: preload kernel ) 不执行流量控制策略。
505、 虚拟机 VM-m中部署的 preload client接收 Host中部署的 preload server 发送的协商确认指示之后, 确定协商出的流量控制策略执行方为上述虚拟机 VM-m, 因此, 虚拟机 VM-m中部署的 preload client向虚拟机 VM-m中部署的网 卡对应的 FE发送上述协商确认指示中携带的流量控制策略, 以通知虚拟机 VM-m中部署的网卡对应的 FE执行流量控制策略。
其中, 通过执行步骤 503~505, 虚拟机 VM-m中部署的 preload client和 Host 中部署的 preload server双方协商出了流量控制策略的执行方。 506、 虚拟机 VM-m中部署的网卡对应的 FE接收到流量控制策略后, 基于 接收到的流量控制策略, 对来自虚拟机 VM-m中部署的用户态应用的待转发处 理报文进行转发处理。
本实施例中以流量控制策略为基于服务质量的流量控制策略或基于访问 控制列表的流量控制策略为例。
其中,基于服务质量的流量控制策略主要基于待转发处理报文对应的业务 优先级, 来确定该报文的具体转发处理方式(其中, 具体转发处理方式可以是 延迟发送报文、 无延迟的发送报文或丟弃报文等)。 例如, 当前緩存中存在多 个待转发处理的报文,则所对应业务优先级越高的报文发送延迟可能越短甚至 无延迟, 所对应业务优先级越低的报文发送延迟可能越长,甚至可以丟弃所对 的保障高优先级业务的服务质量。
其中,基于访问控制列表的流量控制策略, 主要基于待转发处理报文所携 带信息与访问控制列表所包含记录之间是否匹配,来确定报文的具体转发处理 方式。 例如, 访问控制列表为限制访问控制列表(类似黑名单), 对于待转发 处理报文的源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包 含的特定关键字等等信息, 若限制访问控制列表中有与之匹配的记录, 则该待 转发处理报文的转发处理方式可以是直接丟弃,反之,对于待转发处理报文的 源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包含的关键字 等信息, 若限制访问控制列表中没有与之匹配的记录, 则该待转发处理报文的 转发处理方式可以是转发该报文。 又举例来说,假设访问控制列表为允许访问 控制列表(类似白名单), 则对于待转发处理报文的源 /目的地址、 应用层协议 类型、 传输层协议类型和 /或报文头所包含的特定关键字等信息, 若允许访问 控制列表中没有与之匹配的记录,则该待转发处理报文的转发处理方式可为直 接丟弃。 而对于待转发处理报文的源 /目的地址、 应用层协议类型、 传输层协 议类型和 /或报文头所包含的关键字等信息, 若允许访问控制列表中有与之匹 配的记录, 则该待转发处理报文的转发处理方式可为转发该报文。 其它情况以 此类推。
因此, 虚拟机 VM-m中部署的网卡对应的 FE, 基于流量控制策略对来自虚 拟机 VM-m中部署的网卡对应的 FE丟弃来自虚拟机 VM-m中部署的用户态应用 的待转发处理的报文;或者,虚拟机 VM-m中部署的网卡对应的 FE,有延迟(延 迟程度可能与待转发处理报文的业务优先级和当前待转发处理报文数量相关) 的发送来自虚拟机 VM-m中部署的用户态应用的待转发处理的报文; 或虚拟机 VM-m中部署的网卡对应的 FE, 无延迟的发送来自虚拟机 VM-m中部署的用户 态应用的待转发处理的报文, 其它方式此处不再列举。
Host中部署的网卡对应的 BE若接收到来自虚拟机 VM-m中部署的网卡对 应的 FE的报文, 则向 Host中部署的 preload kernel转发接收到的报文。
由于 Host中部署的 preload kernel无需执行流量控制策略, 因此 Host中部署 的 preload kernel可直接通过网卡驱动向网卡转发接收到的报文, 网卡则对接收 到的报文进行相应转发处理。
在本发明一些实施例中,在确定协商出的流量控制策略执行方为上述虚拟 机 VM-m之后,上述 preload client可基于上述连接周期性的向上述 preload server 发送心跳消息。 其中, 发送心跳消息的目的之一是将虚拟机 VM-m工作正常的 状态通知上述 preload server, preload server若在设定时长内未接收到来自上述 preload client的心跳消息, 则上述 preload server可默认为 VM-m可能存在故障。 例如, 上述 preload server在确定协商出的流量控制策略的执行方为上述虚拟机 VM-m之后, 若设定时长内未接收到来自上述 preload client的心跳消息, 则上 述 preload server可将流量控制策略的执行方切换为上述 Host (即无论虚拟机 VM-m中部署的网卡对应的 FE是否基于流量控制策略对待转发处理的报文进 行转发处理, 上述 preload kernel都基于流量控制策略来对来自该虚拟机 VM-m 的报文进行转发处理, 由于 Host和虚拟机 VM-m中执行的流量控制策略相同, 因此, 对于同一报文流, 若上述 preload kernel和 /或虚拟机 VM-m中部署的网卡 对应的 FE执行同一个流量控制策略, preload kernel最终报文输出情况是基本相 同的),可向上述 preload client发送用于指示流量控制策略的执行方切换为上述 Host的指示消息。
在本发明的一些实施例中,在确定协商出的流量控制策略执行方为上述虚 拟机 VM-m之后,上述 preload client亦可在虚拟机 VM-m中部署的网卡对应的 FE 执行流量控制策略故障时, 向上述 preload server发送用于指示虚拟机 VM-m执 行流量控制策略故障的指示消息。 而上述 preload server在确定协商出的流量控 制策略的执行方为上述虚拟机之后, 若接收到来自上述 preload client的用于指 示虚拟机 VM-m执行流量控制策略故障的指示消息, 则上述 preload server可将 流量控制策略的执行方切换为 Host , 上述 preload server可通知上述 preload kernel执行流量控制策略。
在本发明的一些实施例中,在确定协商出的流量控制策略执行方为上述虚 拟机 VM-m之后, 上述 preload server亦可周期性的或非周期性的向上述 preload client亦发送用于查询虚拟机 VM-m执行流量控制策略是否正常的状态查询消 息, 若在设定时长之内未接收到来自 preload client的用于响应上述状态查询消 息的状态指示消息, 或接收到来自 preload client的用于指示虚拟机 VM-m执行 流量控制策略故障的指示消息, 则可确定虚拟机 VM-m执行流量控制策略故 障。 当然, preload server亦可通过其它方式监测虚拟机 VM-m执行流量控制策 略是否故障。若确定虚拟机 VM-m执行流量控制策略故障,则上述 preload server 可将流量控制策略的执行方切换为 Host, 上述 preload server可通知上述 preload kernel执行流量控制策略。
在被通知执行流量控制策略之后, 上述 preload kernel则基于上述流量控制 策略对来自虚拟机 VM-m的待转发处理报文进行转发处理。
参见图 5-c, 图 5-c本发明实施例提供的一种流量控制效果示意图, 图 5-c中 示出, 来自虚拟机 VM-m中的用户态应用的大带宽报文流量, 经过网卡对应的 FE执行流量控制策略之后, 报文流量的带宽变小了, 可见, 通过尽早进行流 量控制有利于减少资源消耗。
可以看出, 本实施例的方案中, 通过引入虚拟机与 Host协商流量控制策略 执行方的机制, 使得虚拟机与 Host都有机会成为流量控制策略执行方, 这使得 由执行虚拟机流量控制策略变得可能,这样就有利于尽可能早的对报文流进行 流量控制, 进而有利于减少无效处理、 减少无效报文流量对带宽和 Host地址空 间的占用。 可见, 上述方案有利于减少转发处理虚拟机出方向的报文流量对 Host地址空间的占用。 并且由于是通过协商方式来确定流量控制策略执行方, 因此有利于提高流量控制策略执行的可靠性。 进一步的, 当虚拟机与 Host都支持执行流量控制策略时, 优先让虚拟机来 执行流量控制策略, 这样进一步有利于尽可能早的对报文进行流量控制, 进而 进一步有利于减少无效处理和无效报文流量对带宽的占用。
进一步的, 虚拟机与 Host釆用模块化架构设计, 有利于提升产品在复杂应 用环境下的适应性, 降低环境迁移的升级成本。 参见图 6-a, 其中, 图 6-a为本发明的另一个实施例提供的另一种报文流量 控制方法的流程示意图。 图 5-b为本发明实施例提供的一种可用于实施如图 6所 示流量控制方法的计算节点结构示意图。 图 5-b中举例出了部署于计算节点中 的 Host和虚拟机的一种具体内部逻辑架构, 当然 Host和虚拟机亦可具有区别于 图 5-b举例的其它内部逻辑架构。 本实施例中主要以在图 5-b所示架构下实施流 量控制方法为例进行描述。
如图 6-a所示, 本发明的另一个实施例提供的另一种报文流量控制方法可 包括以下内容:
601、 虚拟机 VM-m中部署的 preload client与 Host中部署的 preload server建 立连接。 其中, 该连接传输控制协议连接或其它类型的通信连接。
其中,虚拟机 VM-m中部署的 preload client与 Host中部署的 preload server之 间存在固有通信连接或可直接通信, 则步骤 601亦可省略之。
602、 虚拟机 VM-m中部署的 preload client接收 Host中部署的 preload server 发送的协商启动请求。
603、 虚拟机 VM-m中部署的 preload client, 向 Host中部署的 preload server 发送携带虚拟机 VM-m的流量控制能力的描述信息的执行方协商请求。
可以理解, 步骤 601中 Host中部署的 preload server向虚拟机 VM-m中部署的 preload client发送协商启动请求, 主要目的是为了触发虚拟机 VM-m中部署的 preload client发起协商流量控制策略执行方, 当然, 虚拟机 VM-m中部署的 preload client也可能在其它条件(举例来说, 接收到用户态进程发起的协商启 动请求(即可能由用户态应用或用户指令触发)) 的触发下, 发起协商流量控 制策略执行方。 若虚拟机 VM-m中部署的 preload client自主发起流量控制策略 执行方的协商, 则步骤 602可以省略。 604、 Host中部署的 preload server接收携带虚拟机 VM-m的流量控制能力的 描述信息的执行方协商请求, 其中, 该执行方协商请求携带的上述流量控制能 力的描述信息用于指示出虚拟机 VM-m是否支持执行流量控制策略, 因此 Host 中部署的 preload server可根据上述流量控制能力的描述信息, 确定上述虚拟机 VM-m是否支持执行流量控制策略。
本实施例下面以 Host中部署的 preload server确定上述虚拟机 VM-m不支持 执行流量控制策略为例。 因此, Host中部署的 preload server可向虚拟机 VM-m 中部署的 preload client发送协商否认指示, 其中, 上述协商否认指示用于表示 协商出的流量控制策略执行方为上述 Host。 其中, Host中部署的 preload server 还通知 Host中部署的预载内核 ( preload kernel )执行流量控制策略。
605、 虚拟机 VM-m中部署的 preload client接收 Host中部署的 preload server 发送的协商否认指示之后, 确定协商出的流量控制策略执行方为上述 Host, 因 此,虚拟机 VM-m中部署的 preload client通知虚拟机 VM-m中部署的网卡对应的 FE不执行流量控制策略。
其中, 通过执行步骤 603~605, 虚拟机 VM-m中部署的 preload client和 Host 中部署的 preload server双方协商出了流量控制策略的执行方。
虚拟机 VM-m中部署的网卡对应的 FE转发来自虚拟机 VM-m中部署的用户 态应用的待转发处理报文。 此处, 虚拟机 VM-m中部署的网卡对应的 FE不对待 转发处理报文进行流量控制。
606、 Host中部署的网卡对应的 BE若接收到来自虚拟机 VM-m中部署的网 卡对应的 FE的报文, 则向 Host中部署的 preload kernel转发接收到的报文。
其中, preload kernel基于流量控制策略对接收到的报文进行转发处理。 本实施例中以流量控制策略为基于服务质量的流量控制策略或基于访问 控制列表的流量控制策略为例。
其中,基于服务质量的流量控制策略主要基于待转发处理报文对应的业务 优先级, 来确定该报文的具体转发处理方式(其中, 具体转发处理方式可以是 延迟发送报文、 无延迟的发送报文或丟弃报文等)。 例如, 当前緩存中存在多 个待转发处理的报文,则所对应业务优先级越高的报文发送延迟可能越短甚至 无延迟, 所对应业务优先级越低的报文发送延迟可能越长,甚至可以丟弃所对 的保障高优先级业务的服务质量。
其中,基于访问控制列表的流量控制策略, 主要基于待转发处理报文所携 带信息与访问控制列表所包含记录之间是否匹配,来确定报文的具体转发处理 方式。 例如, 访问控制列表为限制访问控制列表(类似黑名单), 对于待转发 处理报文的源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包 含的特定关键字等等信息, 若限制访问控制列表中有与之匹配的记录, 则该待 转发处理报文的转发处理方式可以是直接丟弃,反之,对于待转发处理报文的 源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包含的关键字 等信息,若限制访问控制列表中没有与之匹配的记录, 则该待转发处理报文的 转发处理方式可以是转发该报文。 又举例来说,假设访问控制列表为允许访问 控制列表(类似白名单), 则对于待转发处理报文的源 /目的地址、 应用层协议 类型、 传输层协议类型和 /或报文头所包含的特定关键字等信息, 若允许访问 控制列表中没有与之匹配的记录,则该待转发处理报文的转发处理方式可为直 接丟弃。 而对于待转发处理报文的源 /目的地址、 应用层协议类型、 传输层协 议类型和 /或报文头所包含的关键字等信息, 若允许访问控制列表中有与之匹 配的记录, 则该待转发处理报文的转发处理方式可为转发该报文。 其它情况以 此类推。
因此, preload kernel基于流量控制策略对来自虚拟机 VM-m的待转发处理 的报文进行转发处理可包括: preload kernel丟弃来自虚拟机 VM-m的待转发处 理的报文; 或者, preload kernel有延迟(延迟程度可能与待转发处理报文的业 务优先级和当前待转发处理报文数量相关 )的发送来自虚拟机 VM-m的待转发 处理的报文; 或 preload kernel无延迟的发送来自虚拟机 VM-m的待转发处理的 报文, 其它方式此处不再列举。
网卡若通过网卡驱动接收到 preload kernel发送的报文, 网卡则对接收到的 报文进行相应转发处理。
参见图 6-b, 图 6-b本发明实施例提供的另一种流量控制效果示意图, 图 6-b 中示出, 虚拟机 VM-m中的用户态应用发出大带宽才艮文流量, 网卡对应的 FE未 执行流量控制策略之后, 由 Host中的 preload kernel执行流量控制策略之后报文 流量的带宽变小了。
可以看出, 本实施例的方案中, 通过引入虚拟机与 Host协商流量控制策略 执行方的机制, 使得虚拟机与 Host都有机会成为流量控制策略执行方, 这使得 由执行虚拟机流量控制策略变得可能,这样就有利于尽可能早的对报文流进行 流量控制, 进而有利于减少无效处理、 减少无效报文流量对带宽和 Host地址空 间的占用。 可见, 上述方案有利于减少转发处理虚拟机出方向的报文流量对 Host地址空间的占用。 并且由于是通过协商方式来确定流量控制策略执行方, 因此有利于提高流量控制策略执行的可靠性。
进一步的, 当虚拟机与 Host都支持执行流量控制策略时, 优先让虚拟机来 执行流量控制策略, 这样进一步有利于尽可能早的对报文进行流量控制, 进而 进一步有利于减少无效处理和无效报文流量对带宽的占用。
进一步的, 虚拟机与 Host釆用模块化架构设计, 有利于提升产品在复杂应 用环境下的适应性, 降低环境迁移的升级成本。 参见图 7, 其中, 图 7为本发明的另一个实施例提供的另一种报文流量控制 方法的流程示意图。 图 5-b为本发明实施例提供的一种可用于实施如图 7所示流 量控制方法的计算节点结构示意图。 图 7中举例了部署于计算节点中的 Host和 虚拟机的一种具体内部逻辑架构, 当然 Host和虚拟机亦可具有区别于图 5-b举 例的其它内部逻辑架构。 本实施例中主要以在图 5-b所示架构下实施流量控制 方法为例进行描述。
如图 7所示, 本发明的另一个实施例提供的另一种报文流量控制方法可包 括以下内容:
701、 虚拟机 VM-m中部署的 preload client与 Host中部署的 preload server建 立连接。 其中, 该连接传输控制协议连接或其它类型的通信连接。
其中,虚拟机 VM-m中部署的 preload client与 Host中部署的 preload server之 间存在固有通信连接或可直接通信, 则步骤 501亦可省略之。
702、 虚拟机 VM-m中部署的 preload client接收 Host中部署的 preload server 发送的协商启动请求。
703、 虚拟机 VM-m中部署的 preload client, 向 Host中部署的 preload server 发送携带虚拟机 VM-m的流量控制能力的描述信息的执行方协商请求。
可以理解, 步骤 702中 Host中部署的 preload server向虚拟机 VM-m中部署的 preload client发送协商启动请求, 主要目的是为了触发虚拟机 VM-m中部署的 preload client发起协商流量控制策略执行方, 当然, 虚拟机 VM-m中部署的 preload client也可能在其它条件(举例来说, 接收到用户态进程发起的协商启 动请求(即可能由用户态应用或用户指令触发)) 的触发下, 发起协商流量控 制策略执行方。 若虚拟机 VM-m中部署的 preload client自主发起流量控制策略 执行方的协商, 则步骤 702可以省略。
704、 Host中部署的 preload server接收携带虚拟机 VM-m的流量控制能力的 描述信息的执行方协商请求, 其中, 该执行方协商请求携带的上述流量控制能 力的描述信息用于指示出虚拟机 VM-m支持执行流量控制策略的版本, 因此 Host中部署的 preload server可才艮据上述流量控制能力的描述信息, 确定上述虚 拟机 VM-m是否支持执行当前最新版本或预设版本的流量控制策略。
在本发明的一些实施例中,由于上述流量控制能力的描述信息用于描述出 上述虚拟机支持执行的流量控制策略的版本, 因此, preload server根据上述流 量控制能力的描述信息确定上述虚拟机是否支持执行当前最新版本或者预设 版本的流量控制策略, 具体可包括: 比较上述流量控制能力的描述信息所描述 出上述虚拟机支持执行的流量控制策略的版本是否与流量控制策略的当前最 新版本或者预设版本相同, 若是, 则可确定上述虚拟机支持执行当前最新版本 或者预设版本的流量控制策略; 若否, 则可确定上述虚拟机不支持执行当前最 新版本或者预设版本的流量控制策略。 又例如, preload server根据上述流量控 制能力的描述信息确定上述虚拟机是否支持执行当前最新版本或者预设版本 的流量控制策略具体可包括:比较上述流量控制能力的描述信息所描述出上述 虚拟机支持执行的流量控制策略的 k个(k为正整数)版本中的每个版本, 是否 与流量控制策略的当前最新版本或者预设版本相同, 若比较出上述 k个版本中 的其中 1个版本与流量控制策略的当前最新版本或者预设版本相同, 则可确定 上述虚拟机支持执行当前最新版本或者预设版本的流量控制策略;若比较出上 述 k个版本中的任意 1个版本与流量控制策略的当前最新版本或者预设版本均 不同,则可确定上述虚拟机不支持执行当前最新版本或者预设版本的流量控制 策略。
其中, 本实施例下面以 Host中部署的 preload server确定上述虚拟机 VM-m 支持执行当前最新版本或者预设版本的流量控制策略为例。 因此, Host中部署 的 preload server可向虚拟机 VM-m中部署的 preload client发送协商确认指示,其 中, 上述协商确认指示用于表示协商出的流量控制策略执行方为上述虚拟机 VM-m, 其中, 上述协商确认指示中可携带当前最新版本或者预设版本的流量 控制策略。 Host中部署的 preload server还通知 Host中部署的 preload kernel不执 行流量控制策略。
705、 虚拟机 VM-m中部署的 preload client接收 Host中部署的 preload server 发送的协商确认指示之后, 确定协商出的流量控制策略执行方为上述虚拟机 VM-m, 因此, 虚拟机 VM-m中部署的 preload client向虚拟机 VM-m中部署的网 卡对应的 FE发送上述协商确认指示中携带的流量控制策略。
其中, 通过执行步骤 703~705, 虚拟机 VM-m中部署的 preload client和 Host 中部署的 preload server双方协商出了流量控制策略的执行方。
706、 虚拟机 VM-m中部署的网卡对应的 FE接收到流量控制策略后, 基于 接收到的流量控制策略, 对虚拟机 VM-m中部署的用户态应用发送的待转发处 理报文进行转发处理。
本实施例中以流量控制策略为基于服务质量的流量控制策略或基于访问 控制列表的流量控制策略为例。
其中,基于服务质量的流量控制策略主要基于待转发处理报文对应的业务 优先级, 来确定该报文的具体转发处理方式(其中, 具体转发处理方式可以是 延迟发送报文、 无延迟的发送报文或丟弃报文等)。 例如, 当前緩存中存在多 个待转发处理的报文,则所对应业务优先级越高的报文发送延迟可能越短甚至 无延迟, 所对应业务优先级越低的报文发送延迟可能越长,甚至可以丟弃所对 的保障高优先级业务的服务质量。
其中,基于访问控制列表的流量控制策略, 主要基于待转发处理报文所携 带信息与访问控制列表所包含记录之间是否匹配,来确定报文的具体转发处理 方式。 例如, 访问控制列表为限制访问控制列表(类似黑名单), 对于待转发 处理报文的源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包 含的特定关键字等等信息, 若限制访问控制列表中有与之匹配的记录, 则该待 转发处理报文的转发处理方式可以是直接丟弃,反之,对于待转发处理报文的 源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包含的关键字 等信息,若限制访问控制列表中没有与之匹配的记录, 则该待转发处理报文的 转发处理方式可以是转发该报文。 又举例来说,假设访问控制列表为允许访问 控制列表(类似白名单), 则对于待转发处理报文的源 /目的地址、 应用层协议 类型、 传输层协议类型和 /或报文头所包含的特定关键字等信息, 若允许访问 控制列表中没有与之匹配的记录,则该待转发处理报文的转发处理方式可为直 接丟弃。 而对于待转发处理报文的源 /目的地址、 应用层协议类型、 传输层协 议类型和 /或报文头所包含的关键字等信息, 若允许访问控制列表中有与之匹 配的记录, 则该待转发处理报文的转发处理方式可为转发该报文。 其它情况以 此类推。
因此, 虚拟机 VM-m中部署的网卡对应的 FE, 基于流量控制策略对来自虚 拟机 VM-m中部署的网卡对应的 FE丟弃来自虚拟机 VM-m中部署的用户态应用 的待转发处理的报文;或者,虚拟机 VM-m中部署的网卡对应的 FE,有延迟(延 迟程度可能与待转发处理报文的业务优先级和当前待转发处理报文数量相关) 的发送来自虚拟机 VM-m中部署的用户态应用的待转发处理的报文; 或虚拟机 VM-m中部署的网卡对应的 FE, 无延迟的发送来自虚拟机 VM-m中部署的用户 态应用的待转发处理的报文, 其它方式此处不再列举。
Host中部署的网卡对应的 BE若接收到来自虚拟机 VM-m中部署的网卡对 应的 FE的报文, 则向 Host中部署的 preload kernel转发接收到的报文。
由于 Host中部署的 preload kernel无需执行流量控制策略, 因此 Host中部署 的 preload kernel可直接通过网卡驱动向网卡转发接收到的报文, 网卡则对接收 到的报文进行相应转发处理。
在本发明一些实施例中,在确定协商出的流量控制策略执行方为上述虚拟 机 VM-m之后,上述 preload client可基于上述连接周期性的向上述 preload server 发送心跳消息。 其中, 发送心跳消息的目的之一是将虚拟机 VM-m工作正常的 状态通知上述 preload server, preload server若在设定时长内未接收到来自上述 preload client的心跳消息, 则上述 preload server可默认为 VM-m可能存在故障。 例如, 上述 preload server在确定协商出的流量控制策略的执行方为上述虚拟机 VM-m之后, 若设定时长内未接收到来自上述 preload client的心跳消息, 则上 述 preload server可将流量控制策略的执行方切换为上述 Host (即无论虚拟机 VM-m中部署的网卡对应的 FE是否基于流量控制策略对待转发处理的报文进 行转发处理, 上述 preload kernel都基于流量控制策略来对来自该虚拟机 VM-m 的报文进行转发处理, 由于 Host和虚拟机 VM-m中执行的流量控制策略相同, 因此, 对于同一报文流, 若上述 preload kernel和 /或虚拟机 VM-m中部署的网卡 对应的 FE执行同一个流量控制策略, preload kernel最终报文输出情况是基本相 同的),可向上述 preload client发送用于指示流量控制策略的执行方切换为上述 Host的指示消息。
在本发明的一些实施例中,在确定协商出的流量控制策略执行方为上述虚 拟机 VM-m之后,上述 preload client亦可在虚拟机 VM-m中部署的网卡对应的 FE 执行流量控制策略故障时, 向上述 preload server发送用于指示虚拟机 VM-m执 行流量控制策略故障的指示消息。 而上述 preload server在确定协商出的流量控 制策略的执行方为上述虚拟机之后, 若接收到来自上述 preload client的用于指 示虚拟机 VM-m执行流量控制策略故障的指示消息, 则上述 preload server可将 流量控制策略的执行方切换为 Host, 上述 preload server可通知上述 preload kernel执行流量控制策略。
在本发明的一些实施例中,在确定协商出的流量控制策略执行方为上述虚 拟机 VM-m之后, 上述 preload server亦可周期性的或非周期性的向上述 preload client亦发送用于查询虚拟机 VM-m执行流量控制策略是否正常的状态查询消 息, 若在设定时长之内未接收到来自 preload client的用于响应上述状态查询消 息的状态指示消息, 或接收到来自 preload client的用于指示虚拟机 VM-m执行 流量控制策略故障的指示消息, 则可确定虚拟机 VM-m执行流量控制策略故 障。 当然, preload server亦可通过其它方式监测虚拟机 VM-m执行流量控制策 略是否故障。若确定虚拟机 VM-m执行流量控制策略故障,则上述 preload server 可将流量控制策略的执行方切换为 Host, 上述 preload server可通知上述 preload kemel执行流量控制策略。
在被通知执行流量控制策略之后, 上述 preload kernel则基于上述流量控制 策略对来自虚拟机 VM-m的待转发处理报文进行转发处理。
可以看出, 本实施例的方案中, 通过引入虚拟机与 Host协商流量控制策略 执行方的机制, 使得虚拟机与 Host都有机会成为流量控制策略执行方, 这使得 由执行虚拟机流量控制策略变得可能,这样就有利于尽可能早的对报文流进行 流量控制, 进而有利于减少无效处理、 减少无效报文流量对带宽和 Host地址空 间的占用。 可见, 上述方案有利于减少转发处理虚拟机出方向的报文流量对 Host地址空间的占用。 并且由于是通过协商方式来确定流量控制策略执行方, 因此有利于提高流量控制策略执行的可靠性。
进一步的, 当虚拟机与 Host都支持执行流量控制策略时, 优先让虚拟机来 执行流量控制策略, 这样进一步有利于尽可能早的对报文进行流量控制, 进而 进一步有利于减少无效处理和无效报文流量对带宽的占用。
进一步的, 虚拟机与 Host釆用模块化架构设计, 有利于提升产品在复杂应 用环境下的适应性, 降低环境迁移的升级成本。 参见图 8, 其中, 图 8为本发明的另一个实施例提供的另一种报文流量控制 方法的流程示意图。 图 5-b为本发明实施例提供的一种可用于实施如图 8所示流 量控制方法的计算节点结构示意图。 图 5 -b中举例出了部署于计算节点中的 Host和虚拟机的一种具体内部逻辑架构, 当然 Host和虚拟机亦可具有区别于图 5-b举例的其它内部逻辑架构。 本实施例中主要以在图 5-b所示架构下实施流量 控制方法为例进行描述。
如图 8所示, 本发明的另一个实施例提供的另一种报文流量控制方法可包 括以下内容:
801、 虚拟机 VM-m中部署的 preload client与 Host中部署的 preload server建 立连接。 其中, 该连接传输控制协议连接或其它类型的通信连接。
其中,虚拟机 VM-m中部署的 preload client与 Host中部署的 preload server之 间存在固有通信连接或可直接通信, 则步骤 601亦可省略之。
802、 虚拟机 VM-m中部署的 preload client接收 Host中部署的 preload server 发送的协商启动请求。
803、 虚拟机 VM-m中部署的 preload client, 向 Host中部署的 preload server 发送携带虚拟机 VM-m的流量控制能力的描述信息的执行方协商请求。
可以理解, 步骤 802中 Host中部署的 preload server向虚拟机 VM-m中部署的 preload client发送协商启动请求, 主要目的是为了触发虚拟机 VM-m中部署的 preload client发起协商流量控制策略执行方, 当然, 虚拟机 VM-m中部署的 preload client也可能在其它条件(举例来说, 接收到用户态进程发起的协商启 动请求(即可能由用户态应用或用户指令触发)) 的触发下, 发起协商流量控 制策略执行方。 若虚拟机 VM-m中部署的 preload client自主发起流量控制策略 执行方的协商, 则步骤 802可以省略。
804、 Host中部署的 preload server接收携带虚拟机 VM-m的流量控制能力的 描述信息的执行方协商请求。其中, 该执行方协商请求携带的上述流量控制能 力的描述信息用于指示出虚拟机 VM-m支持执行流量控制策略的版本, 因此 Host中部署的 preload server可才艮据上述流量控制能力的描述信息, 确定上述虚 拟机 VM-m是否支持执行当前最新版本或预设版本的流量控制策略。
在本发明的一些实施例中,由于上述流量控制能力的描述信息用于描述出 上述虚拟机支持执行的流量控制策略的版本, 因此, preload server根据上述流 量控制能力的描述信息确定上述虚拟机是否支持执行当前最新版本或者预设 版本的流量控制策略, 具体可包括: 比较上述流量控制能力的描述信息所描述 出上述虚拟机支持执行的流量控制策略的版本是否与流量控制策略的当前最 新版本或者预设版本相同, 若是, 则可确定上述虚拟机支持执行当前最新版本 或者预设版本的流量控制策略; 若否, 则可确定上述虚拟机不支持执行当前最 新版本或者预设版本的流量控制策略。 又例如, preload server根据上述流量控 制能力的描述信息确定上述虚拟机是否支持执行当前最新版本或者预设版本 的流量控制策略具体可包括:比较上述流量控制能力的描述信息所描述出上述 虚拟机支持执行的流量控制策略的 k个(k为正整数)版本中的每个版本, 是否 与流量控制策略的当前最新版本或者预设版本相同, 若比较出上述 k个版本中 的其中 1个版本与流量控制策略的当前最新版本或者预设版本相同, 则可确定 上述虚拟机支持执行当前最新版本或者预设版本的流量控制策略;若比较出上 述 k个版本中的任意 1个版本与流量控制策略的当前最新版本或者预设版本均 不同,则可确定上述虚拟机不支持执行当前最新版本或者预设版本的流量控制 策略。
本实施例下面以 Host中部署的 preload server确定上述虚拟机 VM-m不支持 执行当前最新版本或者预设版本的流量控制策略为例。 因此, Host中部署的 preload server可向虚拟机 VM-m中部署的 preload client发送协商否认指示, 其 中, 上述协商否认指示用于表示协商出的流量控制策略执行方为上述 Host。 其 中, Host中部署的 preload server还通知 Host中部署的子贞载内核 ( reload kernel ) 执行流量控制策略。
805、 虚拟机 VM-m中部署的 preload client接收 Host中部署的 preload server 发送的协商否认指示之后, 确定协商出的流量控制策略执行方为上述 Host, 因 此,虚拟机 VM-m中部署的 preload client通知虚拟机 VM-m中部署的网卡对应的 FE不执行流量控制策略。
其中, 通过执行步骤 803~805, 虚拟机 VM-m中部署的 preload client和 Host 中部署的 preload server双方协商出了流量控制策略的执行方。
虚拟机 VM-m中部署的网卡对应的 FE转发来自虚拟机 VM-m中部署的用户 态应用的待转发处理报文。 此处, 虚拟机 VM-m中部署的网卡对应的 FE不对待 转发处理报文进行流量控制。
806、 Host中部署的网卡对应的 BE若接收到来自虚拟机 VM-m中部署的网 卡对应的 FE的报文, 则向 Host中部署的 preload kernel转发接收到的报文。
其中, preload kernel基于流量控制策略对接收到的报文进行转发处理。 本实施例中以流量控制策略为基于服务质量的流量控制策略或基于访问 控制列表的流量控制策略为例。
其中,基于服务质量的流量控制策略主要基于待转发处理报文对应的业务 优先级, 来确定该报文的具体转发处理方式(其中, 具体转发处理方式可以是 延迟发送报文、 无延迟的发送报文或丟弃报文等)。 例如, 当前緩存中存在多 个待转发处理的报文,则所对应业务优先级越高的报文发送延迟可能越短甚至 无延迟, 所对应业务优先级越低的报文发送延迟可能越长,甚至可以丟弃所对 的保障高优先级业务的服务质量。
其中,基于访问控制列表的流量控制策略, 主要基于待转发处理报文所携 带信息与访问控制列表所包含记录之间是否匹配,来确定报文的具体转发处理 方式。 例如, 访问控制列表为限制访问控制列表(类似黑名单), 对于待转发 处理报文的源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包 含的特定关键字等等信息, 若限制访问控制列表中有与之匹配的记录, 则该待 转发处理报文的转发处理方式可以是直接丟弃,反之,对于待转发处理报文的 源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包含的关键字 等信息,若限制访问控制列表中没有与之匹配的记录, 则该待转发处理报文的 转发处理方式可以是转发该报文。 又举例来说,假设访问控制列表为允许访问 控制列表(类似白名单), 则对于待转发处理报文的源 /目的地址、 应用层协议 类型、 传输层协议类型和 /或报文头所包含的特定关键字等信息, 若允许访问 控制列表中没有与之匹配的记录,则该待转发处理报文的转发处理方式可为直 接丟弃。 而对于待转发处理报文的源 /目的地址、 应用层协议类型、 传输层协 议类型和 /或报文头所包含的关键字等信息, 若允许访问控制列表中有与之匹 配的记录, 则该待转发处理报文的转发处理方式可为转发该报文。 其它情况以 此类推。
因此, preload kernel基于当前最新版本或者预设版本流量控制策略对来自 虚拟机 VM-m的待转发处理的报文进行转发处理可包括: preload kernel丟弃来 自虚拟机 VM-m的待转发处理的报文; 或者, preload kernel有延迟(延迟程度 可能与待转发处理报文的业务优先级和当前待转发处理报文数量相关)的发送 来自虚拟机 VM-m的待转发处理的报文; 或 preload kernel无延迟的发送来自虚 拟机 VM-m的待转发处理的报文, 其它方式此处不再列举。
网卡若通过网卡驱动接收到 preload kernel发送的报文, 网卡则对接收到的 报文进行相应转发处理。
可以看出, 本实施例的方案中, 通过引入虚拟机与 Host协商流量控制策略 执行方的机制, 使得虚拟机与 Host都有机会成为流量控制策略执行方, 这使得 由执行虚拟机流量控制策略变得可能,这样就有利于尽可能早的对报文流进行 流量控制, 进而有利于减少无效处理、 减少无效报文流量对带宽和 Host地址空 间的占用。 可见, 上述方案有利于减少转发处理虚拟机出方向的报文流量对 Host地址空间的占用。 并且由于是通过协商方式来确定流量控制策略执行方, 因此有利于提高流量控制策略执行的可靠性。
进一步的, 当虚拟机与 Host都支持执行流量控制策略时, 优先让虚拟机来 执行流量控制策略, 这样进一步有利于尽可能早的对报文进行流量控制, 进而 进一步有利于减少无效处理和无效报文流量对带宽的占用。
进一步的, 虚拟机与 Host釆用模块化架构设计, 有利于提升产品在复杂应 用环境下的适应性, 降低环境迁移的升级成本。
为便于更好的实施本发明实施的上方案,下面还提供用于实施上述方案的 相关装置。 参见图, 本发明实施例提供的一种虚拟机 900可包括: 第一协商单元 910 和报文处理单元 920。
其中, 第一协商单元 910, 用于基于上述虚拟机的流量控制能力在上述虚 拟机 900与 Host之间协商流量控制策略的执行方。
报文处理单元 920, 用于若确定协商出的流量控制策略的执行方为上述虚 拟机, 则基于上述流量控制策略对待转发处理的报文进行转发处理; 若确定协 商出的流量控制策略的执行方为上述 Host,则将待转发处理的报文发送给上述 Host, 以便于上述 Host基于上述流量控制策略对接收到的上述报文进行转发处 理。
在本发明的一些实施例中, 第一协商单元 910可具体用于, 向 Host发送携 带上述虚拟机的流量控制能力的描述信息的执行方协商请求, 若接收到上述 Host在根据上述流量控制能力的描述信息确定上述虚拟机支持执行流量控制 策略之后发送的协商确认指示,则确定协商出的流量控制策略执行方为上述虚 拟机;若接收到上述 Host在根据上述流量控制能力的描述信息确定上述虚拟机 不支持执行流量控制策略之后发送的协商否认指示,则确定协商出的流量控制 策略执行方为上述 Host;
或者,
第一协商单元 910可具体用于, 向 Host发送携带上述虚拟机的流量控制能 力的描述信息的执行方协商请求, 其中, 上述流量控制能力的描述信息用于描 述出上述虚拟机支持执行的流量控制策略的版本,若接收到上述 Host在根据上 述流量控制能力的描述信息确定上述虚拟机支持执行当前最新版本或者预设 版本的流量控制策略之后发送的协商确认指示,则确定协商出的流量控制策略 执行方为上述虚拟机;若接收到上述 Host在根据上述流量控制能力的描述信息 确定上述虚拟机不支持执行当前最新版本或者预设版本的流量控制策略之后 发送的协商否认指示, 则确定协商出的流量控制策略执行方为上述 Host;
或者,
第一协商单元 910可具体用于, 向 Host发送携带上述虚拟机的流量控制能 力的描述信息的执行方协商请求,若接收到上述 Host在根据上述流量控制能力 的描述信息确定上述虚拟机支持执行流量控制策略之后发送的协商确认指示, 则确定协商出的流量控制策略执行方为上述虚拟机;若在第一设定时长内未接 收到上述 Host发送的用于响应上述执行方协商请求的协商确认指示,则确定协 商出的流量控制策略执行方为上述 Host;
或者,
第一协商单元 910可具体用于, 向 Host发送携带上述虚拟机的流量控制能 力的描述信息的执行方协商请求, 其中, 上述流量控制能力的描述信息用于描 述出上述虚拟机支持执行的流量控制策略的版本,若接收到上述 Host在根据上 述流量控制能力的描述信息确定上述虚拟机支持执行当前最新版本或者预设 版本的流量控制策略之后发送的协商确认指示,则确定协商出的流量控制策略 执行方为上述虚拟机;若在第一设定时长之内未接收到上述 Host发送的用于响 应上述执行方协商请求的协商确认指示,则确定协商出的流量控制策略执行方 为上述 Host;
或者,
第一协商单元 910可具体用于, 向 Host发送携带上述虚拟机的流量控制能 力的描述信息的执行方协商请求,若接收到上述 Host在根据上述流量控制能力 的描述信息确定上述虚拟机不支持执行流量控制策略之后发送的协商否认指 示, 则确定协商出的流量控制策略执行方为上述 Host; 若在第二设定时长内未 接收到上述 Host发送的用于响应上述执行方协商请求的协商否认指示,则确定 协商出的流量控制策略执行方为上述虚拟机;
或者,
第一协商单元 910可具体用于, 向 Host发送携带上述虚拟机的流量控制能 力的描述信息的执行方协商请求, 其中, 上述流量控制能力的描述信息用于描 述出上述虚拟机支持执行的流量控制策略的版本,若接收到上述 Host在根据上 述流量控制能力的描述信息确定上述虚拟机支持执行当前最新版本或者预设 版本的流量控制策略之后发送的协商否认指示,则确定协商出的流量控制策略 执行方为上述 Host; 若在第二设定时长之内未接收到上述 Host发送的用于响应 上述执行方协商请求的协商否认指示,则确定协商出的流量控制策略执行方为 上述虚拟机。
在本发明的一些实施例中,若上述流量控制能力的描述信息用于描述出上 述虚拟机 900支持执行的流量控制策略的版本, 则 Host可根据上述流量控制能 力的描述信息确定上述虚拟机 900是否支持执行当前最新版本或者预设版本的 流量控制策略, 具体可包括: 比较上述流量控制能力的描述信息所描述出上述 虚拟机 900支持执行的流量控制策略的版本是否与流量控制策略的当前最新版 本或者预设版本相同, 若是, 则可确定上述虚拟机 900支持执行当前最新版本 或者预设版本的流量控制策略; 若否, 则可确定上述虚拟机 900不支持执行当 前最新版本或者预设版本的流量控制策略。 又例如, Host可根据上述流量控制 能力的描述信息确定上述虚拟机 900是否支持执行当前最新版本或者预设版本 的流量控制策略具体可包括:比较上述流量控制能力的描述信息所描述出上述 虚拟机 900支持执行的流量控制策略的 k个(k为正整数)版本中的每个版本, 是否与流量控制策略的当前最新版本或者预设版本相同, 若比较出上述 k个版 本中的其中 1个版本与流量控制策略的当前最新版本或者预设版本相同, 则可 确定上述虚拟机 900支持执行当前最新版本或者预设版本的流量控制策略; 若 比较出上述 k个版本中的任意 1个版本与流量控制策略的当前最新版本或者预 设版本均不同, 则可确定上述虚拟机 900不支持执行当前最新版本或者预设版 本的流量控制策略。
在本发明的一些实施例中, 虚拟机 900还可包括:
发送单元(图 9之中未示出), 用于在确定协商出的流量控制策略的执行方 为上述虚拟机之后, 周期性的向上述 Host发送心跳消息。
本实施例中提及的流量控制策略例如可为基于服务质量的流量控制策略 和 /或基于访问控制列表的流量控制策略, 当然流量控制策略也可是参考其他 因素的流量控制策略。
其中,基于服务质量的流量控制策略主要基于待转发处理报文对应的业务 优先级, 来确定该报文的具体转发处理方式(其中, 具体转发处理方式可以是 延迟发送报文、 无延迟的发送报文或丟弃报文等)。 例如, 当前緩存中存在多 个待转发处理的报文,则所对应业务优先级越高的报文发送延迟可能越短甚至 无延迟, 所对应业务优先级越低的报文发送延迟可能越长,甚至可以丟弃所对 的保障高优先级业务的服务质量。 即,基于服务质量的流量控制策略对待转发 处理的报文进行转发处理具体可包括:按照待转发处理报文的业务优先级所对 应的转发处理方式对该待转发处理的报文进行转发处理。
其中,基于访问控制列表的流量控制策略, 主要基于待转发处理报文所携 带信息与访问控制列表所包含记录之间是否匹配,来确定报文的具体转发处理 方式。 例如, 访问控制列表为限制访问控制列表(类似黑名单), 对于待转发 处理报文的源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包 含的特定关键字等等信息, 若限制访问控制列表中有与之匹配的记录, 则该待 转发处理报文的转发处理方式可以是直接丟弃,反之,对于待转发处理报文的 源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包含的关键字 等信息,若限制访问控制列表中没有与之匹配的记录, 则该待转发处理报文的 转发处理方式可以是转发该报文。 又举例来说,假设访问控制列表为允许访问 控制列表(类似白名单), 则对于待转发处理报文的源 /目的地址、 应用层协议 类型、 传输层协议类型和 /或报文头所包含的特定关键字等信息, 若允许访问 控制列表中没有与之匹配的记录,则该待转发处理报文的转发处理方式可为直 接丟弃, 而对于待转发处理报文的源 /目的地址、 应用层协议类型、 传输层协 议类型和 /或报文头所包含的关键字等信息, 若允许访问控制列表中有与之匹 配的记录, 则该待转发处理报文的转发处理方式可为转发该报文。 其它情况以 此类推。 可以理解的是, 本实施例中的虚拟机 900各个模块的功能可根据上述方法 实施例介绍的方法具体实现,其具体实现过程可以参见上述实施例中的相关描 述, 在此不再赘述。
可以看出, 本实施例的方案中, 通过引入虚拟机与 Host协商流量控制策略 执行方的机制, 使得虚拟机与 Host都有机会成为流量控制策略执行方, 这使得 由执行虚拟机流量控制策略变得可能,这样就有利于尽可能早的对报文流进行 流量控制, 进而有利于减少无效处理、 减少无效报文流量对带宽和 Host地址空 间的占用。 可见, 上述方案有利于减少转发处理虚拟机出方向的报文流量对 Host地址空间的占用。 并且由于是通过协商方式来确定流量控制策略执行方, 因此有利于提高流量控制策略执行的可靠性。
进一步的, 当虚拟机与 Host都支持执行流量控制策略时, 优先让虚拟机来 执行流量控制策略, 这样进一步有利于尽可能早的对报文进行流量控制, 进而 进一步有利于减少无效处理和无效报文流量对带宽的占用。
进一步的, 虚拟机与 Host釆用模块化架构设计, 有利于提升产品在复杂应 用环境下的适应性, 降低环境迁移的升级成本。 参见图 10、 本发明实施例还提供宿主机 1000, 可包括: 第二协商单元 1010 和报文处理单元 1020。
其中, 第二协商单元 1010, 用于基于上述虚拟机的流量控制能力在上述虚 拟机与宿主机 1000之间协商流量控制策略的执行方。
报文处理单元 1020,用于若确定协商出的流量控制策略的执行方为上述宿 主机,在接收到来自上述虚拟机的报文之后,基于上述流量控制策略对接收到 的上述报文进行转发处理。
在本发明的一些实施例中, 第二协商单元 1010可具体用于,接收虚拟机发 送的携带上述虚拟机的流量控制能力的描述信息的执行方协商请求,若根据上 述流量控制能力的描述信息确定上述虚拟机支持执行流量控制策略,则向上述 虚拟机发送协商确认指示,上述协商确认指示用于表示协商出的流量控制策略 执行方为上述虚拟机; 和 /或, 若根据上述流量控制能力的描述信息确定上述 虚拟机不支持执行流量控制策略, 则向上述虚拟机发送协商否认指示, 上述协 商否认指示用于表示协商出的流量控制策略执行方为上述宿主机。 在本发明的另一些实施例中, 第二协商单元 1010可具体用于,接收虚拟机 发送的携带有上述虚拟机的流量控制能力的描述信息的执行方协商请求, 其 中,上述流量控制能力的描述信息用于描述出上述虚拟机支持执行的流量控制 策略的版本,若根据上述流量控制能力的描述信息确定上述虚拟机支持执行当 前最新版本或者预设版本的流量控制策略, 则向上述虚拟机发送协商确认指 示, 其中, 上述协商确认指示用于表示协商出的流量控制策略执行方为上述虚 拟机; 和 /或, 若根据上述流量控制能力的描述信息确定上述虚拟机不支持执 行当前最新版本或者预设版本的流量控制策略,则向上述虚拟机发送协商否认 指示, 其中, 上述协商否认指示用于表示协商出的流量控制策略执行方为上述 宿主机。
在本发明的一些实施例中,若上述流量控制能力的描述信息用于描述出上 述虚拟机支持执行的流量控制策略的版本,则第二协商单元 1010可根据上述流 量控制能力的描述信息确定上述虚拟机是否支持执行当前最新版本或预设版 本的流量控制策略, 具体可包括: 比较上述流量控制能力的描述信息所描述出 上述虚拟机支持执行的流量控制策略的版本是否与流量控制策略的当前最新 版本或者预设版本相同, 若是, 则可确定上述虚拟机支持执行当前最新版本或 者预设版本的流量控制策略; 若否, 则可确定上述虚拟机不支持执行当前最新 版本或者预设版本的流量控制策略。又例如第二协商单元 1010可根据上述流量 控制能力的描述信息确定上述虚拟机是否支持执行当前最新版本或预设版本 的流量控制策略具体可包括:比较上述流量控制能力的描述信息所描述出上述 虚拟机支持执行的流量控制策略的 k个(k为正整数)版本中的每个版本, 是否 与流量控制策略的当前最新版本或者预设版本相同, 若比较出上述 k个版本中 的其中 1个版本与流量控制策略的当前最新版本或者预设版本相同, 则可确定 上述虚拟机支持执行当前最新版本或者预设版本的流量控制策略;若比较出上 述 k个版本中的任意 1个版本与流量控制策略的当前最新版本或者预设版本均 不同,则可确定上述虚拟机不支持执行当前最新版本或者预设版本的流量控制 策略。
在本发明的一些实施例中,报文处理单元 1020还用于,在确定协商出的流 量控制策略的执行方为上述虚拟机之后,若在设定时长内未接收到来自上述虚 拟机的心跳消息,则向上述虚拟机发送用于指示流量控制策略执行方切换为上 述 Host的指示消息。 策略例如可为基于服务质量的流量控制策略和 /或基于访问控制列表的流量控 制策略, 当然流量控制策略也可是参考其他因素的流量控制策略。
其中,基于服务质量的流量控制策略主要基于待转发处理报文对应的业务 优先级, 来确定该报文的具体转发处理方式(其中, 具体转发处理方式可以是 延迟发送报文、 无延迟的发送报文或丟弃报文等)。 例如, 当前緩存中存在多 个待转发处理的报文,则所对应业务优先级越高的报文发送延迟可能越短甚至 无延迟, 所对应业务优先级越低的报文发送延迟可能越长,甚至可以丟弃所对 的保障高优先级业务的服务质量。 即,基于服务质量的流量控制策略对待转发 处理的报文进行转发处理具体可包括:按照待转发处理报文的业务优先级所对 应的转发处理方式对该待转发处理的报文进行转发处理。
其中,基于访问控制列表的流量控制策略, 主要基于待转发处理报文所携 带信息与访问控制列表所包含记录之间是否匹配,来确定报文的具体转发处理 方式。 例如, 访问控制列表为限制访问控制列表(类似黑名单), 对于待转发 处理报文的源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包 含的特定关键字等等信息, 若限制访问控制列表中有与之匹配的记录, 则该待 转发处理报文的转发处理方式可以是直接丟弃,反之,对于待转发处理报文的 源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包含的关键字 等信息, 若限制访问控制列表中没有与之匹配的记录, 则该待转发处理报文的 转发处理方式可以是转发该报文。 又举例来说,假设访问控制列表为允许访问 控制列表(类似白名单), 则对于待转发处理报文的源 /目的地址、 应用层协议 类型、 传输层协议类型和 /或报文头所包含的特定关键字等信息, 若允许访问 控制列表中没有与之匹配的记录,则该待转发处理报文的转发处理方式可为直 接丟弃, 而对于待转发处理报文的源 /目的地址、 应用层协议类型、 传输层协 议类型和 /或报文头所包含的关键字等信息, 若允许访问控制列表中有与之匹 配的记录, 则该待转发处理报文的转发处理方式可为转发该报文。 其它情况以 此类推。
可以理解的是, 本实施例中的 Host 1000各个模块的功能可根据上述方法 实施例介绍的方法具体实现,其具体实现过程可以参见上述实施例中的相关描 述, 在此不再赘述。
可以看出, 本实施例的方案中, 通过引入虚拟机与 Host协商流量控制策略 执行方的机制, 使得虚拟机与 Host都有机会成为流量控制策略执行方, 这使得 由执行虚拟机流量控制策略变得可能,这样就有利于尽可能早的对报文流进行 流量控制, 进而有利于减少无效处理、 减少无效报文流量对带宽和 Host地址空 间的占用。可见上述方案有利于减少转发处理虚拟机出方向的报文流量对 Host 地址空间的占用。 并且由于是通过协商方式来确定流量控制策略执行方, 因此 有利于提高流量控制策略执行的可靠性。
进一步的, 当虚拟机与 Host都支持执行流量控制策略时, 优先让虚拟机来 执行流量控制策略, 这样进一步有利于尽可能早的对报文进行流量控制, 进而 进一步有利于减少无效处理和无效报文流量对带宽的占用。
进一步的, 虚拟机与 Host釆用模块化架构设计, 有利于提升产品在复杂应 用环境下的适应性, 降低环境迁移的升级成本, 降低环境迁移的升级成本。 参见图 11, 本发明实施例还提供一种计算节点 1100, 可以包括: 硬件层 1110、运行在上述硬件层之上的宿主机 1102、 以及运行在上述宿主机 1102之上 的至少一个虚拟机 1103。
其中, 虚拟机 1103, 用于基于上述虚拟机 1103的流量控制能力在上述虚拟 机 1103与宿主机 1102之间协商流量控制策略的执行方;若确定协商出的流量控 制策略执行方为上述虚拟机,则基于上述流量控制策略对待转发处理的报文进 行转发处理; 若确定协商出的流量控制策略的执行方为上述宿主机 1102, 则将 待转发处理的报文发送给上述宿主机 1102;
上述宿主机 1102,用于若确定协商出的流量控制策略执行方为上述宿主机 1102, 则在接收到来自上述虚拟机的报文之后,基于上述流量控制策略对接收 到的上述报文进行转发处理。 在本发明的一些实施例中,在基于上述虚拟机 1103的流量控制能力在上述 虚拟机 1103与宿主机 1102之间协商流量控制策略的执行方的方面,上述虚拟机 具体用于,向宿主机 1102发送携带上述虚拟机的流量控制能力的描述信息的执 行方协商请求,若接收到上述宿主机 1102在根据上述流量控制能力的描述信息 确定上述虚拟机支持执行流量控制策略之后发送的协商确认指示,则确定协商 出的流量控制策略执行方为上述虚拟机;若接收到上述宿主机 1102在根据上述 流量控制能力的描述信息确定上述虚拟机不支持执行流量控制策略之后发送 的协商否认指示, 则确定协商出的流量控制策略执行方为上述宿主机 1102; 或者,在基于上述虚拟机 1103的流量控制能力在上述虚拟机 1103与宿主机 1102之间协商流量控制策略的执行方的方面, 上述虚拟机具体用于, 向宿主机 1102发送携带上述虚拟机的流量控制能力的描述信息的执行方协商请求, 其 中,上述流量控制能力的描述信息用于描述出上述虚拟机支持执行的流量控制 策略的版本,若接收到上述宿主机 1102在根据上述流量控制能力的描述信息确 定上述虚拟机支持执行当前最新版本或者预设版本的流量控制策略之后发送 的协商确认指示, 则确定协商出的流量控制策略执行方为上述虚拟机; 若接收 到上述宿主机 1102在根据上述流量控制能力的描述信息确定上述虚拟机不支 持执行当前最新版本或者预设版本的流量控制策略之后发送的协商否认指示, 则确定协商出的流量控制策略执行方为上述宿主机 1102;
或者,在基于上述虚拟机 1103的流量控制能力在上述虚拟机 1103与宿主机 1102之间协商流量控制策略的执行方的方面, 上述虚拟机具体用于, 向宿主机 1102发送携带上述虚拟机的流量控制能力的描述信息的执行方协商请求,若接 收到上述宿主机 1102在根据上述流量控制能力的描述信息确定上述虚拟机支 持执行流量控制策略之后发送的协商确认指示,则确定协商出的流量控制策略 执行方为上述虚拟机;若在第一设定时长内未接收到上述宿主机 1102发送的用 于响应上述执行方协商请求的协商确认指示,则确定协商出的流量控制策略执 行方为上述宿主机 1102;
或者,在基于上述虚拟机 1103的流量控制能力在上述虚拟机 1103与宿主机 1102之间协商流量控制策略的执行方的方面, 上述虚拟机具体用于, 向宿主机 1102发送携带上述虚拟机的流量控制能力的描述信息的执行方协商请求, 其 中,上述流量控制能力的描述信息用于描述出上述虚拟机支持执行的流量控制 策略的版本,若接收到上述宿主机 1102在根据上述流量控制能力的描述信息确 定上述虚拟机支持执行当前最新版本或者预设版本的流量控制策略之后发送 的协商确认指示, 则确定协商出的流量控制策略执行方为上述虚拟机; 若在第 一设定时长之内未接收到上述宿主机 1102发送的用于响应上述执行方协商请 求的协商确认指示, 则确定协商出的流量控制策略执行方为上述宿主机 1102; 或者,在基于上述虚拟机 1103的流量控制能力在上述虚拟机 1103与宿主机 1102之间协商流量控制策略的执行方的执行方的方面, 上述虚拟机具体用于, 向宿主机 1102发送携带上述虚拟机的流量控制能力的描述信息的执行方协商 请求,若接收到上述宿主机 1102在根据上述流量控制能力的描述信息确定上述 虚拟机不支持执行流量控制策略之后发送的协商否认指示,则确定协商出的流 量控制策略执行方为上述宿主机 1102;若在第二设定时长内未接收到上述宿主 机 1102发送的用于响应上述执行方协商请求的协商否认指示,则确定协商出的 流量控制策略执行方为上述虚拟机;
或者,在基于上述虚拟机 1103的流量控制能力在上述虚拟机 1103与宿主机
1102之间协商流量控制策略的执行方的执行方的方面,上述虚拟机 1103具体用 于向宿主机 1102发送携带上述虚拟机的流量控制能力的描述信息的执行方协 商请求, 其中, 上述流量控制能力的描述信息用于描述出上述虚拟机支持执行 的流量控制策略的版本,若接收到上述宿主机 1102在根据上述流量控制能力的 描述信息确定上述虚拟机支持执行当前最新版本或者预设版本的流量控制策 略之后发送的协商否认指示,则确定协商出的流量控制策略执行方为上述宿主 机 1102;若在第二设定时长之内未接收到上述宿主机 1102发送的用于响应上述 执行方协商请求的协商否认指示,则确定协商出的流量控制策略执行方为上述 虚拟机。
其中, 在本发明的一些实施例中, 宿主机 1102可接收虚拟机发送的携带上 述虚拟机的流量控制能力的描述信息的执行方协商请求,若根据上述流量控制 能力的描述信息确定上述虚拟机支持执行流量控制策略,则向上述虚拟机发送 协商确认指示,上述协商确认指示用于表示协商出的流量控制策略执行方为上 述虚拟机; 和 /或, 若根据上述流量控制能力的描述信息确定上述虚拟机不支 持执行流量控制策略, 则向上述虚拟机发送协商否认指示, 上述协商否认指示 用于表示协商出的流量控制策略执行方为上述宿主机。
在本发明的另一些实施例中,宿主机 1102可接收虚拟机发送的携带有上述 虚拟机的流量控制能力的描述信息的执行方协商请求,其中, 上述流量控制能 力的描述信息用于描述出上述虚拟机支持执行的流量控制策略的版本,若根据 上述流量控制能力的描述信息确定上述虚拟机支持执行当前最新版本或者预 设版本的流量控制策略, 则向上述虚拟机发送协商确认指示, 其中, 上述协商 确认指示用于表示协商出的流量控制策略执行方为上述虚拟机; 和 /或, 若根 据上述流量控制能力的描述信息确定上述虚拟机不支持执行当前最新版本或 者预设版本的流量控制策略, 则向上述虚拟机发送协商否认指示, 其中, 上述 协商否认指示用于表示协商出的流量控制策略执行方为上述宿主机。
在本发明的一些实施例中,若上述流量控制能力的描述信息用于描述出上 述虚拟机支持执行的流量控制策略的版本,则宿主机 1102可根据上述流量控制 能力的描述信息确定上述虚拟机是否支持执行当前最新版本或者预设版本的 流量控制策略, 具体可包括: 比较上述流量控制能力的描述信息所描述出上述 虚拟机支持执行的流量控制策略的版本是否与流量控制策略的当前最新版本 或者预设版本相同, 若是, 则可确定上述虚拟机支持执行当前最新版本或者预 设版本的流量控制策略; 若否, 则可确定上述虚拟机不支持执行当前最新版本 或者预设版本的流量控制策略。 又例如, 宿主机 1102可根据上述流量控制能力 的描述信息确定上述虚拟机是否支持执行当前最新版本或者预设版本的流量 控制策略具体可包括:比较上述流量控制能力的描述信息所描述出上述虚拟机 支持执行的流量控制策略的 k个(k为正整数)版本中的每个版本, 是否与流量 控制策略的当前最新版本或者预设版本相同,若比较出上述 k个版本中的其中 1 个版本与流量控制策略的当前最新版本或者预设版本相同,则可确定上述虚拟 机支持执行当前最新版本或者预设版本的流量控制策略; 若比较出上述 k个版 本中的任意 1个版本与流量控制策略的当前最新版本或者预设版本均不同, 则 可确定上述虚拟机不支持执行当前最新版本或者预设版本的流量控制策略。
在本发明的一些实施例中, 上述宿主机 1102还用于, 在确定协商出的流量 控制策略的执行方为上述虚拟机之后,若在设定时长内未接收到来自上述虚拟 机的心跳消息,则向上述虚拟机发送用于指示流量控制策略执行方切换为上述 宿主机 1102的指示消息。
在本发明的一些实施例中,所述协商确认指示中可以包含所述流量控制策 略; 其中, 在所述虚拟机基于所述流量控制策略对待转发处理的报文进行转发 处理的方面, 所述虚拟机具体用于,基于所述协商确认指示中包含的流量控制 策略对待转发处理的报文进行转发处理。
当然, 宿主机 1102亦可通过其它方式将流量控制策略传递给虚拟机, 以便 于虚拟机 1103在确定协商出的流量控制策略执行方为上述虚拟机之后,基于宿 主机 1102传递过来的流量控制策略对待转发处理的报文进行转发处理。当然也 可以在虚拟机 1103中预配置流量控制策略, 当上述虚拟机 1103确定协商出的流 量控制策略执行方为上述虚拟机 1103,上述虚拟机 1103基于预配置的流量控制 策略对待转发处理的报文进行转发处理。
在本发明的一些实施例中,在所述虚拟机 1102向宿主机 1102发送携带虚拟 机 1102的流量控制能力的描述信息的执行方协商请求的方面,虚拟机 1102具体 用于在接收到用户态进程发起的协商启动请求之后,向宿主机 1102发送携带虚 拟机 1102的流量控制能力的描述信息的执行方协商请求; 或者, 在接收到来自 宿主机 1102的协商启动请求之后,向宿主机 1102发送携带虚拟机 1102的流量控 制能力的描述信息的执行方协商请求。
其中,本实施例中宿主机 1102或虚拟机 1102处理待转发处理的报文所基于 的流量控制策略例如可以为基于服务质量的流量控制策略和 /或基于访问控制 列表的流量控制策略, 当然, 上述流量控制策略也可是参考其他因素的流量控 制策略。
其中,基于服务质量的流量控制策略主要基于待转发处理报文对应的业务 优先级, 来确定该报文的具体转发处理方式(其中, 具体转发处理方式可以是 延迟发送报文、 无延迟的发送报文或丟弃报文等)。 例如, 当前緩存中存在多 个待转发处理的报文,则所对应业务优先级越高的报文发送延迟可能越短甚至 无延迟, 所对应业务优先级越低的报文发送延迟可能越长,甚至可以丟弃所对 的保障高优先级业务的服务质量。 即,基于服务质量的流量控制策略对待转发 处理的报文进行转发处理具体可包括:按照待转发处理报文的业务优先级所对 应的转发处理方式对该待转发处理的报文进行转发处理。
其中,基于访问控制列表的流量控制策略, 主要基于待转发处理报文所携 带信息与访问控制列表所包含记录之间是否匹配,来确定报文的具体转发处理 方式。 例如, 访问控制列表为限制访问控制列表(类似黑名单), 对于待转发 处理报文的源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包 含的特定关键字等等信息, 若限制访问控制列表中有与之匹配的记录, 则该待 转发处理报文的转发处理方式可以是直接丟弃,反之,对于待转发处理报文的 源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包含的关键字 等信息,若限制访问控制列表中没有与之匹配的记录, 则该待转发处理报文的 转发处理方式可以是转发该报文。 又举例来说,假设访问控制列表为允许访问 控制列表(类似白名单), 则对于待转发处理报文的源 /目的地址、 应用层协议 类型、 传输层协议类型和 /或报文头所包含的特定关键字等信息, 若允许访问 控制列表中没有与之匹配的记录,则该待转发处理报文的转发处理方式可为直 接丟弃, 而对于待转发处理报文的源 /目的地址、 应用层协议类型、 传输层协 议类型和 /或报文头所包含的关键字等信息, 若允许访问控制列表中有与之匹 配的记录, 则该待转发处理报文的转发处理方式可为转发该报文。 其它情况以 此类推。
可以理解的是,本实施例中的计算节点 1100各个单元的功能可根据上述方 法实施例介绍的方法具体实现,其具体实现过程可以参见上述实施例中的相关 描述, 在此不再赘述。
可以看出, 本实施例的方案中, 通过在计算节点 1100中引入虚拟机与 Host 协商流量控制策略执行方的机制,使得虚拟机与 Host都有机会成为流量控制策 略执行方, 这使得由执行虚拟机流量控制策略变得可能, 这样就有利于尽可能 早的对报文流进行流量控制, 进而有利于减少无效处理、减少无效报文流量对 带宽和 Host地址空间的占用。 可见, 上述方案有利于减少转发处理虚拟机出方 向的报文流量对 Host地址空间的占用。并且由于是通过协商方式来确定流量控 制策略执行方, 因此有利于提高流量控制策略执行的可靠性。
进一步的, 当虚拟机与 Host都支持执行流量控制策略时, 优先让虚拟机来 执行流量控制策略, 这样进一步有利于尽可能早的对报文进行流量控制, 进而 进一步有利于减少无效处理和无效报文流量对带宽的占用。
进一步的, 虚拟机与 Host釆用模块化架构设计, 有利于提升产品在复杂应 用环境下的适应性, 降低环境迁移的升级成本。 图 12描述了本发明实施例提供的一种计算节点 1200的结构, 该计算节点
1200包括: 至少一个处理器 1201, 例如 CPU, 至少一个网络接口 1204或者其他 用户接口 1203, 存储器 1205, 至少一个通信总线 1202。 通信总线 1202用于实现 这些组件之间的连接通信。该计算节点 1200可选的包含用户接口 1203, 包括显 示器, 键盘或者点击设备(例如, 鼠标, 轨迹球(trackball ) , 触感板或者触 感显示屏)。 存储器 1205可能包含高速 RAM存储器, 也可能还包括非不稳定的 存储器( non-volatile memory ), 例如至少一个磁盘存储器。 存储器 1205可选的 可以包含至少一个处于远离前述处理器 1201的存储装置。其中, 网络接口 1204 包括物理网卡等。
在一些实施方式中,存储器 1205存储了如下的元素, 可执行模块或者数据 结构, 或者他们的子集, 或者他们的扩展集: 宿主机 12051和至少一个虚拟机 12052。 其中, 受处理器 1201的调用, 宿主机 12051可具有如上述实施例所描述 宿主机的部分或全部功能, 受处理器 1201的调用, 虚拟机 12052可以具有如上 述实施例所描述虚拟机的部分或全部功能。
其中, 在本发明的实施例中, 受处理器 1201的调用, 虚拟机 12052用于基 于上述虚拟机的流量控制能力在上述虚拟机 12052与 Host 12051之间协商流量 控制策略的执行方; 若确定协商出的流量控制策略执行方为上述虚拟机, 则基 于上述流量控制策略对待转发处理的报文进行转发处理;若确定协商出的流量 控制策略的执行方为上述宿主机 12051, 则将待转发处理的报文发送给上述宿 主机 12051 ;
受处理器 1201的调用, 上述宿主机 12051用于若确定协商出的流量控制策 略执行方为上述宿主机 12051,在接收到来自虚拟机 12052的报文后,基于上述 流量控制策略对接收到的上述报文进行转发处理。
在本发明一些实施例中,在基于上述虚拟机的流量控制能力在上述虚拟机 12052与 Host 12051之间协商流量控制策略的执行方的方面, 受处理器 1201的 调用,虚拟机 12052具体用于, 向宿主机 12051发送携带上述虚拟机的流量控制 能力的描述信息的执行方协商请求, 若接收到上述宿主机 12051在根据上述流 量控制能力的描述信息确定上述虚拟机支持执行流量控制策略之后发送的协 商确认指示, 则确定协商出的流量控制策略执行方为上述虚拟机; 若接收到上 述宿主机 12051在根据上述流量控制能力的描述信息确定上述虚拟机不支持执 行流量控制策略之后发送的协商否认指示,则确定协商出的流量控制策略执行 方为上述宿主机 12051;
或者, 在基于上述虚拟机的流量控制能力在上述虚拟机 12052与 Host 12051之间协商流量控制策略的执行方的方面, 受处理器 1201的调用, 虚拟机 12052具体用于,向宿主机 12051发送携带上述虚拟机的流量控制能力的描述信 息的执行方协商请求, 其中, 上述流量控制能力的描述信息用于描述出上述虚 拟机支持执行的流量控制策略的版本, 若接收到上述宿主机 12051在根据上述 流量控制能力的描述信息确定上述虚拟机支持执行当前最新版本或者预设版 本的流量控制策略之后发送的协商确认指示,则确定协商出的流量控制策略执 行方为上述虚拟机; 若接收到上述宿主机 12051在根据上述流量控制能力的描 述信息确定上述虚拟机不支持执行当前最新版本或者预设版本的流量控制策 略之后发送的协商否认指示,则确定协商出的流量控制策略执行方为上述宿主 机 12051 ;
或者, 在基于上述虚拟机的流量控制能力在上述虚拟机 12052与 Host
12051之间协商流量控制策略的执行方的方面, 受处理器 1201的调用, 虚拟机 12052具体用于,向宿主机 12051发送携带上述虚拟机的流量控制能力的描述信 息的执行方协商请求, 若接收到上述宿主机 12051在根据上述流量控制能力的 描述信息确定上述虚拟机支持执行流量控制策略之后发送的协商确认指示,则 确定协商出的流量控制策略执行方为上述虚拟机;若在第一设定时长内未接收 确定协商出的流量控制策略执行方为上述宿主机 12051 ;
或者, 在基于上述虚拟机的流量控制能力在上述虚拟机 12052与 Host 12051之间协商流量控制策略的执行方的方面, 受处理器 1201的调用, 虚拟机 12052具体用于,向宿主机 12051发送携带上述虚拟机的流量控制能力的描述信 息的执行方协商请求, 其中, 上述流量控制能力的描述信息用于描述出上述虚 拟机支持执行的流量控制策略的版本, 若接收到上述宿主机 12051在根据上述 流量控制能力的描述信息确定上述虚拟机支持执行当前最新版本或者预设版 本的流量控制策略之后发送的协商确认指示,则确定协商出的流量控制策略执 行方为上述虚拟机; 若在第一设定时长之内未接收到上述宿主机 12051发送的 用于响应上述执行方协商请求的协商确认指示,则确定协商出的流量控制策略 执行方为上述宿主机 12051;
或者, 在基于上述虚拟机的流量控制能力在上述虚拟机 12052与 Host 12051之间协商流量控制策略的执行方的方面, 受处理器 1201的调用, 虚拟机 12052具体用于,向宿主机 12051发送携带上述虚拟机的流量控制能力的描述信 息的执行方协商请求, 若接收到上述宿主机 12051在根据上述流量控制能力的 描述信息确定上述虚拟机不支持执行流量控制策略之后发送的协商否认指示, 则确定协商出的流量控制策略执行方为上述宿主机 12051; 若在第二设定时长 指示, 则确定协商出的流量控制策略执行方为上述虚拟机;
或者, 在基于上述虚拟机的流量控制能力在上述虚拟机 12052与 Host 12051之间协商流量控制策略的执行方的方面, 受处理器 1201的调用, 虚拟机 12052具体用于,向宿主机 12051发送携带上述虚拟机的流量控制能力的描述信 息的执行方协商请求, 其中, 上述流量控制能力的描述信息用于描述出上述虚 拟机支持执行的流量控制策略的版本, 若接收到上述宿主机 12051在根据上述 流量控制能力的描述信息确定上述虚拟机支持执行当前最新版本或者预设版 本的流量控制策略之后发送的协商否认指示,则确定协商出的流量控制策略执 行方为上述宿主机 12051 ; 若在第二设定时长之内未接收到上述宿主机 12051 发送的用于响应上述执行方协商请求的协商否认指示,则确定协商出的流量控 制策略执行方为上述虚拟机。
在本发明的一些实施例中,若上述流量控制能力的描述信息用于描述出上 述虚拟机支持执行的流量控制策略的版本,受处理器 1201的调用,宿主机 12051 可根据上述流量控制能力的描述信息确定上述虚拟机是否支持执行当前最新 版本或者预设版本的流量控制策略, 具体可包括: 比较上述流量控制能力的描 述信息所描述出上述虚拟机支持执行的流量控制策略的版本是否与流量控制 策略的当前最新版本或者预设版本相同, 若是, 则可确定上述虚拟机支持执行 当前最新版本或者预设版本的流量控制策略; 若否, 则可确定上述虚拟机不支 持执行当前最新版本或者预设版本的流量控制策略。 又例如, 受处理器 1201 的调用, 宿主机 12051可根据上述流量控制能力的描述信息确定上述虚拟机是 否支持执行当前最新版本或者预设版本的流量控制策略具体可包括:比较上述 流量控制能力的描述信息所描述出上述虚拟机支持执行的流量控制策略的 k个 ( k为正整数)版本中的每个版本, 是否与流量控制策略的当前最新版本或者 预设版本相同,若比较出上述 k个版本中的其中 1个版本与流量控制策略的当前 最新版本或者预设版本相同,则可确定上述虚拟机支持执行当前最新版本或者 预设版本的流量控制策略;若比较出上述 k个版本中的任意 1个版本与流量控制 策略的当前最新版本或者预设版本均不同,则可确定上述虚拟机不支持执行当 前最新版本或者预设版本的流量控制策略。
在本发明的一些实施例中, 受处理器 1201的调用, 上述宿主机 12051还用 于,在确定协商出的流量控制策略的执行方为上述虚拟机之后, 若在设定时长 内未接收到来自上述虚拟机的心跳消息,则向上述虚拟机发送用于指示流量控 制策略执行方切换为上述宿主机 12051的指示消息。
在本发明的一些实施例中,所述协商确认指示中可以包含所述流量控制策 略; 其中, 在所述虚拟机基于所述流量控制策略对待转发处理的报文进行转发 处理的方面, 所述虚拟机 12052具体用于, 基于所述协商确认指示中包含的流 量控制策略对待转发处理的报文进行转发处理。
当然宿主机 12051亦可通过其它方式将流量控制策略传递给虚拟机, 以便 于虚拟机 12052在确定协商出的流量控制策略执行方为上述虚拟机之后, 基于 宿主机 12051传递过来的流量控制策略对待转发处理的报文进行转发处理。 当 然,也可以在虚拟机 12052中预配置流量控制策略, 当上述虚拟机 12052确定协 商出的流量控制策略执行方为上述虚拟机 12052,上述虚拟机 12052基于预配置 的流量控制策略对待转发处理的报文进行转发处理。
在本发明的一些实施例中,在所述虚拟机 12051向宿主机 12051发送携带虚 拟机 12051的流量控制能力的描述信息的执行方协商请求的方面, 受处理器 1201的调用, 虚拟机 12051具体用于在接收到用户态进程发起的协商启动请求 之后,向宿主机 12051发送携带虚拟机 12051的流量控制能力的描述信息的执行 方协商请求; 或者在接收到来自宿主机 12051的协商启动请求之后, 向宿主机 12051发送携带虚拟机 12051的流量控制能力的描述信息的执行方协商请求。
其中,本实施例中宿主机 12051或虚拟机 12052处理待转发处理的报文所基 于的流量控制策略例如可以为基于服务质量的流量控制策略和 /或基于访问控 制列表的流量控制策略, 当然, 上述流量控制策略也可是参考其他因素的流量 控制策略。
其中,基于服务质量的流量控制策略主要基于待转发处理报文对应的业务 优先级, 来确定该报文的具体转发处理方式(其中, 具体转发处理方式可以是 延迟发送报文、 无延迟的发送报文或丟弃报文等)。 例如, 当前緩存中存在多 个待转发处理的报文,则所对应业务优先级越高的报文发送延迟可能越短甚至 无延迟, 所对应业务优先级越低的报文发送延迟可能越长,甚至可以丟弃所对 的保障高优先级业务的服务质量。 即,基于服务质量的流量控制策略对待转发 处理的报文进行转发处理具体可包括:按照待转发处理报文的业务优先级所对 应的转发处理方式对该待转发处理的报文进行转发处理。
其中,基于访问控制列表的流量控制策略, 主要基于待转发处理报文所携 带信息与访问控制列表所包含记录之间是否匹配,来确定报文的具体转发处理 方式。 例如, 访问控制列表为限制访问控制列表(类似黑名单), 对于待转发 处理报文的源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包 含的特定关键字等等信息, 若限制访问控制列表中有与之匹配的记录, 则该待 转发处理报文的转发处理方式可以是直接丟弃,反之,对于待转发处理报文的 源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包含的关键字 等信息, 若限制访问控制列表中没有与之匹配的记录, 则该待转发处理报文的 转发处理方式可以是转发该报文。 又举例来说,假设访问控制列表为允许访问 控制列表(类似白名单), 则对于待转发处理报文的源 /目的地址、 应用层协议 类型、 传输层协议类型和 /或报文头所包含的特定关键字等信息, 若允许访问 控制列表中没有与之匹配的记录,则该待转发处理报文的转发处理方式可为直 接丟弃, 而对于待转发处理报文的源 /目的地址、 应用层协议类型、 传输层协 议类型和 /或报文头所包含的关键字等信息, 若允许访问控制列表中有与之匹 配的记录, 则该待转发处理报文的转发处理方式可为转发该报文。 其它情况以 此类推。
可以理解的是,本实施例中的计算节点 1200各个单元的功能可根据上述方 法实施例介绍的方法具体实现,其具体实现过程可以参见上述实施例中的相关 描述, 在此不再赘述。
可以看出, 本实施例的方案中, 通过在计算节点 1200中引入虚拟机与 Host 协商流量控制策略执行方的机制,使得虚拟机与 Host都有机会成为流量控制策 略执行方, 这使得由执行虚拟机流量控制策略变得可能, 这样就有利于尽可能 早的对报文流进行流量控制, 进而有利于减少无效处理、减少无效报文流量对 带宽和 Host地址空间的占用。 可见, 上述方案有利于减少转发处理虚拟机出方 向的报文流量对 Host地址空间的占用。并且由于是通过协商方式来确定流量控 制策略执行方, 因此有利于提高流量控制策略执行的可靠性。
进一步的, 当虚拟机与 Host都支持执行流量控制策略时, 优先让虚拟机来 执行流量控制策略, 这样进一步有利于尽可能早的对报文进行流量控制, 进而 进一步有利于减少无效处理和无效报文流量对带宽的占用。 图 13描述了本发明实施例提供的一种计算节点 1300的结构, 该计算节点 1300包括: 至少一个处理器 1301, 例如 CPU, 至少一个网络接口 1304, 存储器 1305, 至少一个通信总线 1302。通信总线 1302用于实现这些组件之间的连接通 信。 该计算节点 1300可选的包含用户接口 1303, 包括显示器, 键盘或者点击设 备(例如, 鼠标, 轨迹球(英文: trackball ) , 触感板或者触感显示屏)。 存储 器 1305可能包含高速 RAM存储器, 也可能还包括非不稳定的存储器 (英文: non- volatile memory ), 例如至少一个磁盘存储器。 存储器 1305可选的可以包含 至少一个处于远离前述处理器 1301的存储装置。 其中, 网络接口 1304包括物理 网卡等。
在一些实施方式中,存储器 1305存储了如下的元素, 可执行模块或者数据 结构, 或者他们的子集, 或者他们的扩展集: 宿主机 13051和至少一个虚拟机 13052。 其中, 受处理器 1301的调用, 宿主机 13051可具有如上述实施例所描述 宿主机的部分或全部功能, 受处理器 1301的调用, 虚拟机 13052可以具有如上 述实施例所描述虚拟机的部分或全部功能。
其中, 在本发明实施例中, 通过调用存储器 1305存储的程序或指令, 处理 器 1301可以用于,基于虚拟机 13052的流量控制能力,在宿主机 13051和上述虚 拟机 13052之间协商出流量控制策略的执行方。 若协商出的流量控制策略执行 方为上述虚拟机 13052,则基于上述流量控制策略对上述虚拟机 13052待转发处 理的报文进行转发处理; 若协商出的流量控制策略的执行方为上述宿主机 于上述流量控制策略对上述宿主机 13051接收到的待转发处理的上述报文进行 转发处理。
在本发明的一些实施例中, 上述处理器 1301基于虚拟机 13052的流量控制 能力,在宿主机 13051和上述虚拟机 13052之间协商出流量控制策略的执行方可
13051发送的执行方协商请求,上述执行方协商请求携带上述虚拟机 13052的流 量控制能力的描述信息;
在上述宿主机 13051接收到上述执行方协商请求之后, 上述处理器 1301若 根据上述流量控制能力的描述信息确定上述虚拟机 13052支持执行流量控制策 略,则上述处理器 1301向上述虚拟机 13052发送上述宿主机 13051待向上述虚拟 机 13052发送的协商确认指示, 其中, 上述协商确认指示用于表示协商出的流 量控制策略执行方为上述虚拟机 13052; 和 /或上述处理器 1301若根据上述流量 控制能力的描述信息, 确定上述虚拟机 13052不支持执行流量控制策略, 则上 述处理器 1301向上述虚拟机 13052发送上述宿主机 13051待向上述虚拟机 13052 发送的协商否认指示, 其中, 上述协商否认指示用于表示协商出的流量控制策 略执行方为上述宿主机 13051;
或者, 上述处理器 1301基于虚拟机 13052的流量控制能力,在宿主机 13051 和上述虚拟机 13052之间协商出流量控制策略的执行方包括: 上述处理器 1301 求, 上述执行方协商请求携带虚拟机 13052的流量控制能力的描述信息, 上述 流量控制能力的描述信息用于描述出上述虚拟机 13052支持执行的流量控制策 略的版本;
在上述宿主机 13051接收到上述执行方协商请求之后, 上述处理器 1301若 根据上述流量控制能力的描述信息, 确定上述虚拟机 13052支持执行当前最新 版本或者预设版本的流量控制策略, 则上述处理器 1301向上述虚拟机 13052发 指示用于表示协商出的流量控制策略执行方为上述虚拟机 13052; 和 /或上述处 理器 1301若根据上述流量控制能力的描述信息确定上述虚拟机 13052不支持执 行当前最新版本或者预设版本的流量控制策略,则上述处理器 1301向上述虚拟 中, 上述协商否认指示用于表示协商出的流量控制策略执行方为上述宿主机 13051。
在本发明的另一些实施例中, 上述处理器 1301基于虚拟机 13052的流量控 制能力,在宿主机 13051和上述虚拟机 13052之间协商出流量控制策略的执行方
13051发送的执行方协商请求,上述执行方协商请求携带上述虚拟机 13052的流 量控制能力的描述信息;若虚拟机 13052接收到上述宿主机 13051发送的用于响 应上述执行方协商请求的协商确认指示, 处理器 13051确定协商出的流量控制 策略执行方为上述虚拟机;若虚拟机 13052接收到上述宿主机 13051发送的用于 响应上述执行方协商请求的协商否认指示, 则处理器 13051确定协商出的流量 控制策略执行方为上述宿主机 13051。
或者, 上述处理器 1301基于虚拟机 13052的流量控制能力,在宿主机 13051 和上述虚拟机 13052之间协商出流量控制策略的执行方可包括: 上述处理器 协商请求, 上述执行方协商请求携带上述虚拟机 13052的流量控制能力的描述 信息, 上述流量控制能力的描述信息用于描述出上述虚拟机 13052支持执行的 流量控制策略的版本;若虚拟机 13052接收到上述宿主机 13051发送的用于响应 上述执行方协商请求的协商确认指示, 则处理器 13051确定协商出的流量控制 策略执行方为虚拟机 13052; 若虚拟机 13052接收到上述宿主机 13051在发送的 用于响应上述执行方协商请求的协商否认指示,则确定协商出的流量控制策略 执行方为上述宿主机 13051。
或者, 上述处理器 1301基于虚拟机 13052的流量控制能力,在宿主机 13051 和上述虚拟机 13052之间协商出流量控制策略的执行方可包括: 上述处理器 协商请求, 上述执行方协商请求携带上述虚拟机 13052的流量控制能力的描述 请求的协商确认指示,则上述处理器 1301确定协商出的流量控制策略执行方为 上述虚拟机;若虚拟机 13052在第一设定时长内未接收到上述宿主机 13051发送 的用于响应上述执行方协商请求的协商确认指示,则上述处理器 1301确定协商 出的流量控制策略执行方为上述宿主机 13051。
或者, 上述处理器 1301基于虚拟机 13052的流量控制能力,在宿主机 13051 和上述虚拟机 13052之间协商出流量控制策略的执行方可包括: 上述处理器 协商请求, 上述执行方协商请求携带上述虚拟机 13052的流量控制能力的描述 信息, 其中, 上述流量控制能力的描述信息用于描述出上述虚拟机支持执行的 流量控制策略的版本,若虚拟机 13052接收到上述宿主机 13051发送的用于响应 上述执行方协商请求的协商确认指示,则处理器 1301确定协商出的流量控制策 略执行方为上述虚拟机; 若虚拟机 13052在第一设定时长之内未接收到上述宿 主机 13051发送的用于响应上述执行方协商请求的协商确认指示, 则处理器 1301可确定协商出的流量控制策略执行方为上述宿主机 13051。
或者, 上述处理器 1301基于虚拟机 13052的流量控制能力,在宿主机 13051 和上述虚拟机 13052之间协商出流量控制策略的执行方可包括: 上述处理器 协商请求, 上述执行方协商请求携带上述虚拟机 13052的流量控制能力的描述 请求的协商否认指示,则处理器 1301确定协商出的流量控制策略执行方为上述 宿主机 13051 ; 若上述虚拟机 13052在第二设定时长内未接收到上述宿主机 13051发送的用于响应上述执行方协商请求的协商否认指示, 则上述处理器 1301确定协商出的流量控制策略执行方为上述虚拟机;
或者, 上述处理器 1301基于虚拟机 13052的流量控制能力,在宿主机 13051 和上述虚拟机 13052之间协商出流量控制策略的执行方可包括: 上述处理器 协商请求, 上述执行方协商请求携带上述虚拟机 13052的流量控制能力的描述 信息, 其中, 上述流量控制能力的描述信息用于描述出上述虚拟机支持执行的 流量控制策略的版本,若虚拟机 13052接收到上述宿主机 13051发送的用于响应 上述执行方协商请求的协商否认指示,则处理器 1301确定协商出的流量控制策 略执行方为上述宿主机 13051 ;若虚拟机 13052在第二设定时长之内未接收到上 器 1301确定协商出的流量控制策略执行方为上述虚拟机。
在本发明一些实施例中, 上述协商确认指示中包含上述流量控制策略。 其中, 上述处理器 1301基于上述流量控制策略对上述虚拟机 13052待转发 处理的报文进行转发处理可以包括:上述处理器 1301基于上述协商确认指示中 包含的上述流量控制策略, 对上述虚拟机 13052待转发处理的报文进行转发处 理。
当然, 宿主机 13051亦可通过其它方式将流量控制策略传递给虚拟机 13052, 以便在确定协商出的流量控制策略执行方为上述虚拟机 13052之后, 上 述处理器 1301基于宿主机 13051传递过来的流量控制策略对虚拟机 13052待转 发处理的报文进行转发处理。 当然, 也可以在虚拟机 13052中预配置流量控制 策略, 当确定协商出的流量控制策略执行方为上述虚拟机 13052, 上述处理器 发处理。
在本发明的一些实施例中, 在上述宿主机 13051接收到上述执行方协商请 求之后,若上述流量控制能力的描述信息用于描述出上述虚拟机支持执行的流 量控制策略的版本,处理器 1301可根据上述流量控制能力的描述信息确定上述 虚拟机是否支持执行当前最新版本或者预设版本的流量控制策略, 具体可包 括:比较上述流量控制能力的描述信息所描述出上述虚拟机支持执行的流量控 制策略的版本是否与流量控制策略的当前最新版本或者预设版本相同, 若是, 则可确定上述虚拟机支持执行当前最新版本或者预设版本的流量控制策略;若 否,则可确定上述虚拟机不支持执行当前最新版本或者预设版本的流量控制策 略。 又例如, 处理器 1301可根据上述流量控制能力的描述信息确定上述虚拟机 是否支持执行当前最新版本或者预设版本的流量控制策略具体可包括:比较上 述流量控制能力的描述信息所描述出上述虚拟机支持执行的流量控制策略的 k 个(k为正整数)版本中的每个版本, 是否与流量控制策略的当前最新版本或 者预设版本相同,若比较出上述 k个版本中的其中 1个版本与流量控制策略的当 前最新版本或者预设版本相同,则可确定上述虚拟机支持执行当前最新版本或 者预设版本的流量控制策略;若比较出上述 k个版本中的任意 1个版本与流量控 制策略的当前最新版本或者预设版本均不同,则可确定上述虚拟机不支持执行 当前最新版本或者预设版本的流量控制策略。
在本发明一些实施例中, 上述处理器 1301还用于,在协商出的流量控制策 略的执行方为上述虚拟机 13052后,若上述宿主机 13051在设定时长内未接收到 来自上述虚拟机 13052的心跳消息, 向上述虚拟机 13052发送上述宿主机 13051 待向上述虚拟机 13052发送的, 用于指示流量控制策略的执行方切换为上述宿 主机 13051的指示消息。
其中,本实施例中处理器 1301处理宿主机 13052或虚拟机 13051待转发处理 的报文所基于的流量控制策略例如可以为基于服务质量的流量控制策略和 /或 基于访问控制列表的流量控制策略, 当然, 上述流量控制策略也可是参考其他 因素的流量控制策略。
其中,基于服务质量的流量控制策略主要基于待转发处理报文对应的业务 优先级, 来确定该报文的具体转发处理方式(其中, 具体转发处理方式可以是 延迟发送报文、 无延迟的发送报文或丟弃报文等)。 例如, 当前緩存中存在多 个待转发处理的报文,则所对应业务优先级越高的报文发送延迟可能越短甚至 无延迟, 所对应业务优先级越低的报文发送延迟可能越长,甚至可以丟弃所对 的保障高优先级业务的服务质量。 即,基于服务质量的流量控制策略对待转发 处理的报文进行转发处理具体可包括:按照待转发处理报文的业务优先级所对 应的转发处理方式对该待转发处理的报文进行转发处理。
其中,基于访问控制列表的流量控制策略, 主要基于待转发处理报文所携 带信息与访问控制列表所包含记录之间是否匹配,来确定报文的具体转发处理 方式。 例如, 访问控制列表为限制访问控制列表(类似黑名单), 对于待转发 处理报文的源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包 含的特定关键字等等信息, 若限制访问控制列表中有与之匹配的记录, 则该待 转发处理报文的转发处理方式可以是直接丟弃,反之,对于待转发处理报文的 源 /目的地址、 应用层协议类型、 传输层协议类型和 /或报文头所包含的关键字 等信息,若限制访问控制列表中没有与之匹配的记录, 则该待转发处理报文的 转发处理方式可以是转发该报文。 又举例来说,假设访问控制列表为允许访问 控制列表(类似白名单), 则对于待转发处理报文的源 /目的地址、 应用层协议 类型、 传输层协议类型和 /或报文头所包含的特定关键字等信息, 若允许访问 控制列表中没有与之匹配的记录,则该待转发处理报文的转发处理方式可为直 接丟弃, 而对于待转发处理报文的源 /目的地址、 应用层协议类型、 传输层协 议类型和 /或报文头所包含的关键字等信息, 若允许访问控制列表中有与之匹 配的记录, 则该待转发处理报文的转发处理方式可为转发该报文。 其它情况以 此类推。
在本发明一些实施例中, 上述处理器 1301向宿主机 13051发送上述虚拟机 13052待向上述宿主机 13051发送的执行方协商请求可包括:
在虚拟机 13052在接收到用户态进程发起的协商启动请求之后, 上述处理 方协商请求; 或者, 在虚拟机 13052在接收到来自上述宿主机 13051的协商启动 宿主机 13051发送的执行方协商请求。
在本发明一些实施例中, 上述基于虚拟机 13052的流量控制能力, 在宿主 机 13051和上述虚拟机 13052之间协商出流量控制策略的执行方, 可包括: 在部 署于虚拟机 13052中的预载客户端与部署于宿主机 13051中的预载服务端之间 的连接建立完成之后,上述处理器 1301通过建立的上述连接,基于虚拟机 13052 的流量控制能力,在宿主机 13051和上述虚拟机 13052之间协商出流量控制策略 的执行。
可以理解的是,本实施例中的计算节点 1300各个单元的功能可以根据上述 方法实施例介绍的方法具体实现,其具体实现过程可以参见上述实施例中的相 关描述, 在此不再赘述。
可见, 釆用上述方案后, 在计算节点 1300中引入在虚拟机 13052与宿主机
13051之间协商流量控制策略执行方的机制, 在处理器 1301协助之下, 使得虚 拟机 13052与宿主机 13051都有机会成为流量控制策略执行方,这使得由执行虚 拟机 13052流量控制策略变得可能, 这样就有利于尽可能早的对报文流进行流 量控制, 进而有利于减少无效处理、 减少无效报文流量对带宽和宿主机 13051 地址空间的占用。 可见, 上述方案有利于减少转发处理虚拟机 13052出方向的 报文流量对宿主机 13051地址空间的占用。 并且由于是通过协商方式来确定流 量控制策略执行方, 因此有利于提高流量控制策略执行的可靠性。
进一步的, 当虚拟机 13052与宿主机 13051都支持执行流量控制策略时,优 先让虚拟机 13052来执行流量控制策略, 这样进一步有利于尽可能早的对报文 进行流量控制, 进而进一步有利于减少无效处理和无效报文流量对带宽的占 用。
本发明实施例还提供一种计算机存储介质, 其中, 该计算机存储介质可存 储有程序,该程序执行时包括上述方法实施例中记载的报文流量控制方法的部 分或全部步骤。
需要说明的是, 对于前述的各方法实施例, 为了简单描述, 故将其都表述 为一系列的动作组合,但是本领域技术人员应该知悉, 本发明并不受所描述的 动作顺序的限制,因为依据本发明,某些步骤可以釆用其他顺序或者同时进行。 其次, 本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施 例, 所涉及的动作和模块并不一定是本发明所必须的。
在上述实施例中,对各个实施例的描述都各有侧重, 某个实施例中没有详 述的部分, 可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的装置, 可通过其 它的方式实现。 例如, 以上所描述的装置实施例仅仅是示意性的, 例如上述单 元的划分, 仅仅为一种逻辑功能划分, 实际实现时可以有另外的划分方式, 例 如多个单元或组件可以结合或者可以集成到另一个系统, 或一些特征可以忽 略, 或不执行。 另一点, 所显示或讨论的相互之间的耦合或直接辆合或通信连 接可以是通过一些接口, 装置或单元的间接辆合或通信连接, 可以是电性或其 它的形式。 单元显示的部件可以是或者也可以不是物理单元, 即可以处于一个地方, 或者 也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部 单元来实现本实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元中, 也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元 中。上述集成的单元既可以釆用硬件的形式实现,也可以釆用软件功能单元的 形式实现。
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售 或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发 明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全 部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储 介质中, 包括若干指令用以使得一台计算机设备(可为个人计算机、 服务器或 者网络设备或者与内存连接的处理器等)执行本发明各个实施例上述方法的全 部或部分步骤。 而前述的存储介质包括: U盘、 只读存储器(英文: read-only memory, 缩写: ROM )、 随机存取存储器 (英文: random access memory, 缩 写: RAM )、 移动硬盘、 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述, 以上实施例仅用以说明本发明的技术方案, 而非对其限制; 尽 管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理 解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分 技术特征进行等同替换; 而这些修改或者替换, 并不使相应技术方案的本质脱 离本发明各实施例技术方案的范围。

Claims

权 利 要 求
1、 一种报文流量控制方法, 其特征在于, 包括:
基于虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协商流量控 制策略的执行方;
若确定协商出的流量控制策略执行方为所述虚拟机,则所述虚拟机基于所 述流量控制策略对待转发处理的报文进行转发处理;
若确定协商出的流量控制策略的执行方为所述 Host,则所述虚拟机将待转 发处理的报文发送给所述 Host, 以便于所述 Host基于所述流量控制策略对接收 到的所述报文进行转发处理。
2、 根据权利要求 1所述的方法, 其特征在于,
所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方, 包括:
虚拟机向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方 协商请求;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机支持执行流量控制策略之后发送的协商确认指示,则所述虚拟机确 定协商出的流量控制策略执行方为所述虚拟机;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机不支持执行流量控制策略之后发送的协商否认指示,则所述虚拟机 确定协商出的流量控制策略执行方为所述 Host;
或者,
所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方, 包括:
虚拟机向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方 协商请求, 其中, 所述流量控制能力的描述信息用于描述出所述虚拟机支持执 行的流量控制策略的版本;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机支持执行当前最新版本或者预设版本的流量控制策略之后发送的 协商确认指示, 则所述虚拟机确定协商出的流量控制策略执行方为所述虚拟 机;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机不支持执行当前最新版本或者预设版本的流量控制策略之后发送 的协商否认指示, 则所述虚拟机确定协商出的流量控制策略执行方为所述 Host;
或者,
所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方, 包括:
虚拟机向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方 协商请求;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机支持执行流量控制策略之后发送的协商确认指示,则所述虚拟机确 定协商出的流量控制策略执行方为所述虚拟机;
所述虚拟机若在第一设定时长内未接收到所述 Host发送的用于响应所述 执行方协商请求的协商确认指示,则所述虚拟机确定协商出的流量控制策略执 行方为所述 Host;
或者,
所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方, 包括:
虚拟机向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方 协商请求, 其中, 所述流量控制能力的描述信息用于描述出所述虚拟机支持执 行的流量控制策略的版本;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机支持执行当前最新版本或者预设版本的流量控制策略之后发送的 协商确认指示, 则所述虚拟机确定协商出的流量控制策略执行方为所述虚拟 机;
所述虚拟机若在第一设定时长内未接收到所述 Host发送的用于响应所述 执行方协商请求的协商确认指示,则所述虚拟机确定协商出的流量控制策略执 行方为所述 Host; 或者,
所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方, 包括:
虚拟机向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方 协商请求;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机不支持执行流量控制策略之后发送的协商否认指示,则所述虚拟机 确定协商出的流量控制策略执行方为所述 Host;
所述虚拟机在第二设定时长内未接收到所述 Host发送的用于响应所述执 行方协商请求的协商否认指示,则所述虚拟机确定协商出的流量控制策略执行 方为所述虚拟机;
或者,
所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方, 包括:
虚拟机向 Host发送携带所述虚拟机的流量控制能力的描述信息的执行方 协商请求, 其中, 所述流量控制能力的描述信息用于描述出所述虚拟机支持执 行的流量控制策略的版本;
所述虚拟机若接收到所述 Host在根据所述流量控制能力的描述信息确定 所述虚拟机支持执行当前最新版本或者预设版本的流量控制策略之后发送的 协商否认指示, 则所述虚拟机确定协商出的流量控制策略执行方为所述 Host; 所述虚拟机若在第二设定时长内未接收到所述 Host发送的用于响应所述 执行方协商请求的协商否认指示,则所述虚拟机确定协商出的流量控制策略执 行方为所述虚拟机。
3、根据权利要求 2所述的方法, 其特征在于, 所述协商确认指示中包含所 述流量控制策略;
其中,所述虚拟机基于所述流量控制策略对待转发处理的报文进行转发处 理包括:所述虚拟机基于所述协商确认指示中包含的流量控制策略对待转发处 理的报文进行转发处理。
4、 根据权利要求 2或 3所述的方法, 其特征在于, 所述虚拟机向 Host发送携带所述虚拟机的流量控制能力的描述信息的执 行方协商请求包括:
虚拟机在接收到用户态进程发起的协商启动请求之后,向 Host发送携带所 述虚拟机的流量控制能力的描述信息的执行方协商请求; 或者,虚拟机在接收 到来自所述 Host的协商启动请求之后, 向所述 Host发送携带所述虚拟机的流量 控制能力的描述信息的执行方协商请求。
5、 根据权利要求 1至 4任一项所述的方法, 其特征在于, 所述基于所述虚 拟机的流量控制能力在所述虚拟机与宿主机 Host之间协商流量控制策略的执 行方包括:部署于虚拟机中的预载客户端与部署于 Host中的预载服务端之间的 连接建立完成之后,所述预载客户端基于建立的所述连接与所述预载服务端基 于所述虚拟机的流量控制能力在上述虚拟机与 Host之间协商流量控制策略的 执行方。
6、 根据权利要求 5所述的方法, 其特征在于,
所述方法还包括:
在确定协商出的流量控制策略执行方为所述虚拟机之后,所述预载客户端 基于所述连接周期性的向所述预载服务端发送心跳消息。
7、 根据权利要求 1至 6任一项所述的方法, 其特征在于,
所述流量控制策略为基于服务质量的流量控制策略和 /或基于访问控制列 表的流量控制策略。
8、 一种报文流量控制方法, 其特征在于, 包括:
基于虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协商流量控 制策略的执行方;
若确定协商出的流量控制策略执行方为所述 Host, 所述 Host在接收到来自 所述虚拟机的报文之后,基于所述流量控制策略对接收到的所述报文进行转发 处理。
9、 根据权利要求 8所述的方法, 其特征在于,
基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协商流 量控制策略的执行方, 包括:
Host接收虚拟机发送的携带所述虚拟机的流量控制能力的描述信息的执 行方协商请求;
若所述 Host根据所述流量控制能力的描述信息确定所述虚拟机支持执行 流量控制策略, 则向所述虚拟机发送协商确认指示, 所述协商确认指示用于表 示协商出的流量控制策略执行方为所述虚拟机;
若所述 Host根据所述流量控制能力的描述信息确定所述虚拟机不支持执 行流量控制策略, 则向所述虚拟机发送协商否认指示, 所述协商否认指示用于 表示协商出的流量控制策略执行方为所述 Host;
或者,
基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协商流 量控制策略的执行方, 包括:
Host接收虚拟机发送的携带所述虚拟机的流量控制能力的描述信息的执 行方协商请求, 其中, 所述流量控制能力的描述信息用于描述出所述虚拟机支 持执行的流量控制策略的版本;
若所述 Host根据所述流量控制能力的描述信息确定所述虚拟机支持执行 当前最新版本或者预设版本的流量控制策略,则向所述虚拟机发送协商确认指 示, 其中, 所述协商确认指示用于表示协商出的流量控制策略执行方为所述虚 拟机;
若所述 Host根据所述流量控制能力的描述信息确定所述虚拟机不支持执 行当前最新版本或者预设版本的流量控制策略,则向所述虚拟机发送协商否认 指示, 其中, 所述协商否认指示用于表示协商出的流量控制策略执行方为所述 Host。
10、 根据权利要求 8或 9所述的方法, 其特征在于,
所述基于所述虚拟机的流量控制能力在所述虚拟机与宿主机 Host之间协 商流量控制策略的执行方, 包括: 在 Host中的预载服务端与虚拟机中的预载客 户端之间的连接建立完成之后,所述预载服务端通过所述连接与所述预载客户 端基于所述虚拟机的流量控制能力,在所述虚拟机与宿主机 Host之间协商流量 控制策略的执行方。
11、 根据权利要求 8至 10任一项所述的方法, 其特征在于,
所述方法还包括: 在确定协商出的流量控制策略的执行方为所述虚拟机之后,若在设定时长 内未接收到来自所述虚拟机的心跳消息,则所述 Host向所述虚拟机发送用于指 示流量控制策略的执行方切换为所述 Host的指示消息。
12、 根据权利要求 8至 11任一项所述的方法, 其特征在于,
所述流量控制策略为基于服务质量的流量控制策略和 /或基于访问控制列 表的流量控制策略。
13、 一种虚拟机, 其特征在于, 包括:
第一协商单元,用于基于所述虚拟机的流量控制能力在所述虚拟机与宿主 机 Host之间协商流量控制策略的执行方;
报文处理单元, 用于若确定协商出的流量控制策略的执行方为所述虚拟 机, 则基于所述流量控制策略对待转发处理的报文进行转发处理; 若确定协商 出的流量控制策略的执行方为所述 Host, 则将待转发处理的报文发送给所述 Host, 以便于所述 Host基于所述流量控制策略对接收到的所述报文进行转发处 理。
14、 根据权利要求 13所述的虚拟机, 其特征在于,
所述第一协商单元具体用于,向 Host发送携带所述虚拟机的流量控制能力 的描述信息的执行方协商请求,若接收到所述 Host在根据所述流量控制能力的 描述信息确定所述虚拟机支持执行流量控制策略之后发送的协商确认指示,则 确定协商出的流量控制策略执行方为所述虚拟机;若接收到所述 Host在根据所 述流量控制能力的描述信息确定所述虚拟机不支持执行流量控制策略之后发 送的协商否认指示, 则确定协商出的流量控制策略执行方为所述 Host;
或者,
所述第一协商单元具体用于,向 Host发送携带所述虚拟机的流量控制能力 的描述信息的执行方协商请求, 其中, 所述流量控制能力的描述信息用于描述 出所述虚拟机支持执行的流量控制策略的版本,若接收到所述 Host在根据所述 流量控制能力的描述信息确定所述虚拟机支持执行当前最新版本或者预设版 本的流量控制策略之后发送的协商确认指示,则确定协商出的流量控制策略执 行方为所述虚拟机;若接收到所述 Host在根据所述流量控制能力的描述信息确 定所述虚拟机不支持执行当前最新版本或者预设版本的流量控制策略之后发 送的协商否认指示, 则确定协商出的流量控制策略执行方为所述 Host;
或者,
所述第一协商单元具体用于,向 Host发送携带所述虚拟机的流量控制能力 的描述信息的执行方协商请求,若接收到所述 Host在根据所述流量控制能力的 描述信息确定所述虚拟机支持执行流量控制策略之后发送的协商确认指示,则 确定协商出的流量控制策略执行方为所述虚拟机;若在第一设定时长内未接收 到所述 Host发送的用于响应所述执行方协商请求的协商确认指示,则确定协商 出的流量控制策略执行方为所述 Host;
或者,
所述第一协商单元具体用于,向 Host发送携带所述虚拟机的流量控制能力 的描述信息的执行方协商请求, 其中, 所述流量控制能力的描述信息用于描述 出所述虚拟机支持执行的流量控制策略的版本,若接收到所述 Host在根据所述 流量控制能力的描述信息确定所述虚拟机支持执行当前最新版本或者预设版 本的流量控制策略之后发送的协商确认指示,则确定协商出的流量控制策略执 行方为所述虚拟机;若在第一设定时长之内未接收到所述 Host发送的用于响应 所述执行方协商请求的协商确认指示,则确定协商出的流量控制策略执行方为 所述 Host;
或者,
所述第一协商单元具体用于,向 Host发送携带所述虚拟机的流量控制能力 的描述信息的执行方协商请求,若接收到所述 Host在根据所述流量控制能力的 描述信息确定所述虚拟机不支持执行流量控制策略之后发送的协商否认指示, 则确定协商出的流量控制策略执行方为所述 Host;若在第二设定时长内未接收 到所述 Host发送的用于响应所述执行方协商请求的协商否认指示,则确定协商 出的流量控制策略执行方为所述虚拟机;
或者,
所述第一协商单元具体用于,向 Host发送携带所述虚拟机的流量控制能力 的描述信息的执行方协商请求, 其中, 所述流量控制能力的描述信息用于描述 出所述虚拟机支持执行的流量控制策略的版本,若接收到所述 Host在根据所述 流量控制能力的描述信息确定所述虚拟机支持执行当前最新版本或者预设版 本的流量控制策略之后发送的协商否认指示,则确定协商出的流量控制策略执 行方为所述 Host; 若在第二设定时长之内未接收到所述 Host发送的用于响应所 述执行方协商请求的协商否认指示,则确定协商出的流量控制策略执行方为所 述虚拟机。
15、 根据权利要求 13至 14任一项所述的虚拟机, 其特征在于,
所述虚拟机还包括: 发送单元, 用于在确定协商出的流量控制策略的执行 方为所述虚拟机之后, 周期性的向所述 Host发送心跳消息。
16、 根据权利要求 13至 15任一项所述的虚拟机, 其特征在于,
所述流量控制策略为基于服务质量的流量控制策略和 /或基于访问控制列 表的流量控制策略。
17、 一种宿主机, 其特征在于, 包括:
第二协商单元,用于基于所述虚拟机的流量控制能力在所述虚拟机与所述 宿主机之间协商流量控制策略的执行方;
报文处理单元, 用于若确定协商出的流量控制策略的执行方为所述宿主 机,在接收到来自所述虚拟机的报文之后,基于所述流量控制策略对接收到的 所述报文进行转发处理。
18、 根据权利要求 17所述的宿主机, 其特征在于,
所述第二协商单元具体用于,接收虚拟机发送的携带所述虚拟机的流量控 制能力的描述信息的执行方协商请求,若根据所述流量控制能力的描述信息确 定所述虚拟机支持执行流量控制策略, 则向所述虚拟机发送协商确认指示, 所 述协商确认指示用于表示协商出的流量控制策略执行方为所述虚拟机;若根据 所述流量控制能力的描述信息确定所述虚拟机不支持执行流量控制策略,则向 所述虚拟机发送协商否认指示,所述协商否认指示用于表示协商出的流量控制 策略执行方为所述宿主机;
或者,
所述第二协商单元具体用于,接收虚拟机发送的携带有所述虚拟机的流量 控制能力的描述信息的执行方协商请求, 其中, 所述流量控制能力的描述信息 用于描述出所述虚拟机支持执行的流量控制策略的版本,若根据所述流量控制 能力的描述信息确定所述虚拟机支持执行当前最新版本或者预设版本的流量 控制策略, 则向所述虚拟机发送协商确认指示, 其中, 所述协商确认指示用于 表示协商出的流量控制策略执行方为所述虚拟机;若根据所述流量控制能力的 描述信息确定所述虚拟机不支持执行当前最新版本或者预设版本的流量控制 策略, 则向所述虚拟机发送协商否认指示, 其中, 所述协商否认指示用于表示 协商出的流量控制策略执行方为所述宿主机。
19、 根据权利要求 17至 18任一项所述的宿主机, 其特征在于, 所述报文处 理单元还用于,在确定协商出的流量控制策略的执行方为所述虚拟机之后, 若 在设定时长内未接收到来自所述虚拟机的心跳消息,则向所述虚拟机发送用于 指示流量控制策略执行方切换为所述 Host的指示消息。
20、 一种计算节点, 其特征在于, 包括, 硬件层、 运行在所述硬件层之上 的宿主机 Host、 以及运行在所述 Host之上的至少一个虚拟机,
所述虚拟机, 用于基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流量控制策略的执行方;若确定协商出的流量控制策略执行方为 所述虚拟机, 则基于所述流量控制策略对待转发处理的报文进行转发处理; 若 确定协商出的流量控制策略的执行方为所述 Host,则将待转发处理的报文发送 给所述 Host;
所述 Host用于若确定协商出的流量控制策略执行方为所述 Host, 则在接收 到来自所述虚拟机的报文之后,基于所述流量控制策略对接收到的所述报文进 行转发处理。
21、 根据权利要求 20所述的计算节点, 其特征在于,
在基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流 量控制策略的执行方的方面, 所述虚拟机具体用于, 向 Host发送携带所述虚拟 机的流量控制能力的描述信息的执行方协商请求,若接收到所述 Host在根据所 述流量控制能力的描述信息确定所述虚拟机支持执行流量控制策略之后发送 的协商确认指示, 则确定协商出的流量控制策略执行方为所述虚拟机; 若接收 到所述 Host在根据所述流量控制能力的描述信息确定所述虚拟机不支持执行 流量控制策略之后发送的协商否认指示,则确定协商出的流量控制策略执行方 为所述 Host;
或者, 在基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流 量控制策略的执行方的方面, 所述虚拟机具体用于, 向 Host发送携带所述虚拟 机的流量控制能力的描述信息的执行方协商请求, 其中, 所述流量控制能力的 描述信息用于描述出所述虚拟机支持执行的流量控制策略的版本,若接收到所 述 Host在根据所述流量控制能力的描述信息确定所述虚拟机支持执行当前最 新版本或者预设版本的流量控制策略之后发送的协商确认指示,则确定协商出 的流量控制策略执行方为所述虚拟机;若接收到所述 Host在根据所述流量控制 能力的描述信息确定所述虚拟机不支持执行当前最新版本或者预设版本的流 量控制策略之后发送的协商否认指示,则确定协商出的流量控制策略执行方为 所述 Host;
或者,
在基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流 量控制策略的执行方的方面, 所述虚拟机具体用于, 向 Host发送携带所述虚拟 机的流量控制能力的描述信息的执行方协商请求,若接收到所述 Host在根据所 述流量控制能力的描述信息确定所述虚拟机支持执行流量控制策略之后发送 的协商确认指示, 则确定协商出的流量控制策略执行方为所述虚拟机; 若在第 一设定时长内未接收到所述 Host发送的用于响应所述执行方协商请求的协商 确认指示, 则确定协商出的流量控制策略执行方为所述 Host;
或者,
在基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流 量控制策略的执行方的方面, 所述虚拟机具体用于, 向 Host发送携带所述虚拟 机的流量控制能力的描述信息的执行方协商请求, 其中, 所述流量控制能力的 描述信息用于描述出所述虚拟机支持执行的流量控制策略的版本,若接收到所 述 Host在根据所述流量控制能力的描述信息确定所述虚拟机支持执行当前最 新版本或者预设版本的流量控制策略之后发送的协商确认指示,则确定协商出 的流量控制策略执行方为所述虚拟机; 若在第一设定时长之内未接收到所述 Host发送的用于响应所述执行方协商请求的协商确认指示,则确定协商出的流 量控制策略执行方为所述 Host;
或者, 在基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流 量控制策略的执行方的方面, 所述虚拟机具体用于, 向 Host发送携带所述虚拟 机的流量控制能力的描述信息的执行方协商请求,若接收到所述 Host在根据所 述流量控制能力的描述信息确定所述虚拟机不支持执行流量控制策略之后发 送的协商否认指示, 则确定协商出的流量控制策略执行方为所述 Host; 若在第 二设定时长内未接收到所述 Host发送的用于响应所述执行方协商请求的协商 否认指示, 则确定协商出的流量控制策略执行方为所述虚拟机;
或者,
在基于所述虚拟机的流量控制能力在所述虚拟机与所述 Host之间协商流 量控制策略的执行方的方面, 所述虚拟机具体用于, 向 Host发送携带所述虚拟 机的流量控制能力的描述信息的执行方协商请求, 其中, 所述流量控制能力的 描述信息用于描述出所述虚拟机支持执行的流量控制策略的版本,若接收到所 述 Host在根据所述流量控制能力的描述信息确定所述虚拟机支持执行当前最 新版本或者预设版本的流量控制策略之后发送的协商否认指示,则确定协商出 的流量控制策略执行方为所述 Host; 若在第二设定时长之内未接收到所述 Host 发送的用于响应所述执行方协商请求的协商否认指示,则确定协商出的流量控 制策略执行方为所述虚拟机。
22、 根据权利要求 20或 21所述的计算节点, 其特征在于,
所述 Host还用于,在确定协商出的流量控制策略的执行方为所述虚拟机之 后, 若在设定时长内未接收到来自所述虚拟机的心跳消息, 则向所述虚拟机发 送用于指示流量控制策略执行方切换为所述 Host的指示消息。
23、 一种报文流量控制方法, 其特征在于, 包括:
处理器基于虚拟机的流量控制能力,在宿主机 Host和所述虚拟机之间协商 出流量控制策略的执行方;
若协商出的流量控制策略执行方为所述虚拟机,则所述处理器基于所述流 若协商出的流量控制策略的执行方为所述 Host,则所述处理器将所述虚拟 机待转发处理的报文从所述虚拟机发送给所述 Host;所述处理器基于所述流量 控制策略对所述 Host接收到的待转发处理的所述报文进行转发处理。
24、 根据权利要求 23所述的方法, 其特征在于,
所述处理器基于虚拟机的流量控制能力,在宿主机 Host和所述虚拟机之间 协商出流量控制策略的执行方包括:所述处理器向 Host发送所述虚拟机待向所 述 Host发送的执行方协商请求,所述执行方协商请求携带所述虚拟机的流量控 制能力的描述信息;
在所述 Host接收到所述执行方协商请求之后,所述处理器若根据所述流量 控制能力的描述信息确定所述虚拟机支持执行流量控制策略,则所述处理器向 所述虚拟机发送所述 Host待向所述虚拟机发送的协商确认指示, 其中, 所述协 商确认指示用于表示协商出的流量控制策略执行方为所述虚拟机; 和 /或, 所 述处理器若根据所述流量控制能力的描述信息确定所述虚拟机不支持执行流 量控制策略,则所述处理器向所述虚拟机发送所述 Host待向所述虚拟机发送的 协商否认指示,所述协商否认指示用于表示协商出的流量控制策略执行方为所 述 Host;
或者,
所述处理器基于虚拟机的流量控制能力,在宿主机 Host和所述虚拟机之间 协商出流量控制策略的执行方包括:所述处理器向 Host发送所述虚拟机待向所 述 Host发送的执行方协商请求,所述执行方协商请求携带所述虚拟机的流量控 制能力的描述信息,所述流量控制能力的描述信息用于描述出所述虚拟机支持 执行的流量控制策略的版本;
在所述 Host接收到所述执行方协商请求之后,所述处理器若根据所述流量 控制能力的描述信息,确定所述虚拟机支持执行当前最新版本或者预设版本的 流量控制策略,则所述处理器向所述虚拟机发送所述 Host待向所述虚拟机发送 的协商确认指示,所述协商确认指示用于表示协商出的流量控制策略执行方为 所述虚拟机; 和 /或所述处理器若根据所述流量控制能力的描述信息确定所述 虚拟机不支持执行当前最新版本或者预设版本的流量控制策略,则所述处理器 向所述虚拟机发送所述 Host待向所述虚拟机发送的协商否认指示, 其中, 所述 协商否认指示用于表示协商出的流量控制策略执行方为所述 Host。
25、 根据权利要求 24所述的方法, 其特征在于, 所述协商确认指示中包含 所述流量控制策略; 其中,所述基于所述流量控制策略对所述虚拟机待转发处理的报文进行转 发处理包括:基于所述协商确认指示中包含的所述流量控制策略对所述虚拟机 待转发处理的报文进行转发处理。
26、 根据权利要求 23至 25任意一项所述方法, 其特征在于,
所述方法还包括:
在协商出的流量控制策略的执行方为所述虚拟机之后,若所述 Host在设定 时长内未接收到来自所述虚拟机的心跳消息,所述处理器向所述虚拟机发送所 述 Host待向所述虚拟机发送的, 用于指示流量控制策略的执行方切换为所述 Host的指示消息。
27、 一种计算节点, 其特征在于, 包括:
存储器, 以及与所述存储器连接的处理器;
其中, 所述处理器用于:
基于虚拟机的流量控制能力,在宿主机 Host和所述虚拟机之间协商出流量 控制策略的执行方;
若协商出的流量控制策略执行方为所述虚拟机,则基于所述流量控制策略 对所述虚拟机待转发处理的报文进行转发处理;若协商出的流量控制策略的执
Host; 基于所述流量控制策略对所述 Host接收到的待转发处理的所述报文进行 转发处理。
28、 根据权利要求 27所述的计算节点, 其特征在于,
所述处理器用于, 向 Host发送所述虚拟机待向所述 Host发送的执行方协商 请求, 所述执行方协商请求携带所述虚拟机的流量控制能力的描述信息; 在所 述 Host接收到所述执行方协商请求之后,若根据所述流量控制能力的描述信息 确定所述虚拟机支持执行流量控制策略,则向所述虚拟机发送所述 Host待向所 述虚拟机发送的协商确认指示, 其中, 所述协商确认指示用于表示协商出的流 量控制策略执行方为所述虚拟机; 和 /或, 若根据所述流量控制能力的描述信 息确定所述虚拟机不支持执行流量控制策略, 则向所述虚拟机发送所述 Host 待向所述虚拟机发送的协商否认指示,所述协商否认指示用于表示协商出的流 量控制策略执行方为所述 Host; 或者,
所述处理器用于, 向 Host发送所述虚拟机待向所述 Host发送的执行方协商 请求, 所述执行方协商请求携带所述虚拟机的流量控制能力的描述信息, 所述 流量控制能力的描述信息用于描述出所述虚拟机支持执行的流量控制策略的 版本; 在所述 Host接收到所述执行方协商请求之后, 若根据所述流量控制能力 的描述信息,确定所述虚拟机支持执行当前最新版本或者预设版本的流量控制 策略, 则向所述虚拟机发送所述 Host待向所述虚拟机发送的协商确认指示, 所 述协商确认指示用于表示协商出的流量控制策略执行方为所述虚拟机; 和 /或 若根据所述流量控制能力的描述信息确定所述虚拟机不支持执行当前最新版 本或者预设版本的流量控制策略,则向所述虚拟机发送所述 Host待向所述虚拟 机发送的协商否认指示, 其中, 所述协商否认指示用于表示协商出的流量控制 策略执行方为所述 Host。
29、 根据权利要求 28所述的计算节点, 其特征在于, 所述协商确认指示中 包含所述流量控制策略;
其中, 所述处理器用于,基于所述协商确认指示中包含的所述流量控制策 略对所述虚拟机待转发处理的报文进行转发处理。
30、 根据权利要求 27至 29任意一项所述计算节点, 其特征在于, 所述处理 器还用于, 在协商出的流量控制策略的执行方为所述虚拟机之后, 若所述 Host 在设定时长内未接收到来自所述虚拟机的心跳消息, 向所述虚拟机发送所述 Host待向所述虚拟机发送的, 用于指示流量控制策略的执行方切换为所述 Host 的指示消息。
PCT/CN2014/081642 2013-12-30 2014-07-04 报文流量控制方法及相关装置和计算节点 WO2015101000A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020167020644A KR101875710B1 (ko) 2013-12-30 2014-07-04 패킷 흐름 제어 방법, 관련 장치, 및 컴퓨팅 노드
EP14812400.1A EP2905948B1 (en) 2013-12-30 2014-07-04 Message traffic control method and related device, and calculation node
JP2016543577A JP6336602B2 (ja) 2013-12-30 2014-07-04 パケットフロー制御方法、関連装置、及びコンピューティングノード
US14/586,121 US9921867B2 (en) 2013-12-30 2014-12-30 Negotiation between virtual machine and host to determine executor of packet flow control policy with reduced address space

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310746701.5 2013-12-30
CN201310746701.5A CN103763403B (zh) 2013-12-30 2013-12-30 报文流量控制方法及相关装置和计算节点

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/586,121 Continuation US9921867B2 (en) 2013-12-30 2014-12-30 Negotiation between virtual machine and host to determine executor of packet flow control policy with reduced address space

Publications (1)

Publication Number Publication Date
WO2015101000A1 true WO2015101000A1 (zh) 2015-07-09

Family

ID=50530561

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/081642 WO2015101000A1 (zh) 2013-12-30 2014-07-04 报文流量控制方法及相关装置和计算节点

Country Status (5)

Country Link
EP (1) EP2905948B1 (zh)
JP (1) JP6336602B2 (zh)
KR (1) KR101875710B1 (zh)
CN (1) CN103763403B (zh)
WO (1) WO2015101000A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763403B (zh) * 2013-12-30 2017-03-15 华为技术有限公司 报文流量控制方法及相关装置和计算节点
US9921867B2 (en) 2013-12-30 2018-03-20 Huawei Technologies Co., Ltd. Negotiation between virtual machine and host to determine executor of packet flow control policy with reduced address space
CN104168205B (zh) * 2014-08-06 2017-08-08 新华三技术有限公司 报文处理方法及装置
CN105099821B (zh) * 2015-07-30 2020-05-12 奇安信科技集团股份有限公司 基于云的虚拟环境下流量监控的方法和装置
KR102137651B1 (ko) * 2019-06-10 2020-07-24 국방과학연구소 서비스 플로우 기반 패킷 스케줄링 장치 및 방법
CN117478612B (zh) * 2023-12-27 2024-03-15 成都新希望金融信息有限公司 流量分配方法、装置及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413183A (zh) * 2011-11-22 2012-04-11 中国联合网络通信集团有限公司 云智能交换机及其处理方法、系统
JP2013126062A (ja) * 2011-12-14 2013-06-24 Kddi Corp ネットワークトラヒック制御装置、制御方法、およびプログラム
CN103176833A (zh) * 2013-03-11 2013-06-26 华为技术有限公司 一种基于虚拟机的数据发送方法、接收方法及系统
WO2013191972A1 (en) * 2012-06-21 2013-12-27 Microsoft Corporation Offloading virtual machine flows to physical queues
CN103763403A (zh) * 2013-12-30 2014-04-30 华为技术有限公司 报文流量控制方法及相关装置和计算节点

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0517304D0 (en) * 2005-08-23 2005-10-05 Netronome Systems Inc A system and method for processing and forwarding transmitted information
US8385202B2 (en) * 2008-08-27 2013-02-26 Cisco Technology, Inc. Virtual switch quality of service for virtual machines
US10353722B2 (en) * 2010-07-21 2019-07-16 Nec Corporation System and method of offloading cryptography processing from a virtual machine to a management module
CN102594707A (zh) * 2012-03-21 2012-07-18 北京天地云箱科技有限公司 网络控制系统及网络交换适配器
JP5871233B2 (ja) * 2012-03-22 2016-03-01 株式会社日立製作所 計算機及び帯域制御方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413183A (zh) * 2011-11-22 2012-04-11 中国联合网络通信集团有限公司 云智能交换机及其处理方法、系统
JP2013126062A (ja) * 2011-12-14 2013-06-24 Kddi Corp ネットワークトラヒック制御装置、制御方法、およびプログラム
WO2013191972A1 (en) * 2012-06-21 2013-12-27 Microsoft Corporation Offloading virtual machine flows to physical queues
CN103176833A (zh) * 2013-03-11 2013-06-26 华为技术有限公司 一种基于虚拟机的数据发送方法、接收方法及系统
CN103763403A (zh) * 2013-12-30 2014-04-30 华为技术有限公司 报文流量控制方法及相关装置和计算节点

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2905948A4 *

Also Published As

Publication number Publication date
EP2905948A1 (en) 2015-08-12
CN103763403B (zh) 2017-03-15
EP2905948A4 (en) 2015-09-09
EP2905948B1 (en) 2016-06-01
KR20160103114A (ko) 2016-08-31
CN103763403A (zh) 2014-04-30
KR101875710B1 (ko) 2018-08-02
JP6336602B2 (ja) 2018-06-06
JP2017503420A (ja) 2017-01-26

Similar Documents

Publication Publication Date Title
JP6335363B2 (ja) 仮想クラウドインフラストラクチャへの仮想セキュリティ装置アーキテクチャの提供
WO2015101000A1 (zh) 报文流量控制方法及相关装置和计算节点
EP2834735B1 (en) Virtualized movement of enhanced network services associated with a virtual machine
US10333827B2 (en) Adaptive session forwarding following virtual machine migration detection
JP6055310B2 (ja) 仮想記憶ターゲットオフロード技術
JP5837683B2 (ja) ネットワークのセグメント化によるネイティブクラウドコンピューティング
US20130291088A1 (en) Cooperative network security inspection
CA2961283C (en) Resource management method, host, and endpoint
WO2017035395A1 (en) System and method for network function virtualization resource management
WO2014206105A1 (zh) 虚拟交换方法、相关装置和计算机系统
WO2014032233A1 (zh) 虚拟机热迁移的系统和方法
WO2017186042A1 (zh) 一种用于虚拟交换机技术中数据传输的方法及装置
WO2014201623A1 (zh) 用于数据传输的方法、装置和系统以及物理网卡
WO2012149718A1 (zh) 云计算系统中云终端访问云服务器的方法及云计算系统
CN113039767A (zh) 超融合存储中的分布式iscsi目标的主动-主动架构
JP2009187090A (ja) クラスタシステムおよび情報処理方法
KR101644678B1 (ko) 네크워크 입출력 가상화 환경에서 가상 머신의 이동성 지원 방법 및 이를 수행하는 장치
US9921867B2 (en) Negotiation between virtual machine and host to determine executor of packet flow control policy with reduced address space
JP2023040221A (ja) プロバイダネットワークサービス拡張
US11089066B2 (en) System and method for dynamic medium access control (MAC) relating to a virtualization environment
US10042682B2 (en) Copy message from application buffer to send buffer within kernel
US10362070B1 (en) Method, system, and apparatus for achieving user space intervention during connection-establishment handshakes

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2014812400

Country of ref document: EP

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14812400

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2016543577

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20167020644

Country of ref document: KR

Kind code of ref document: A