Inline Service Switch
Through the method of inline service switches and controller drivers, the static and load balancing problems of data message distribution methods in the data center are solved, and flexible data center deployment and efficient traffic management are achieved.
Patent Information
- Application Number
- CN202010711875.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2015-08-31
- Filing Date
- 2015-09-30
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2035-09-30
AI Technical Summary
The existing data center's data message distribution method between the application layer and the service layer is static and configured intensively, causing the load balancer to become a choke point for distributed traffic, making it difficult to seamlessly modify the distribution plan.
Use inline service switches to distribute data messages from source computing nodes to different groups of destination service computing nodes, identify service nodes through tunnels and service policies, implement cloud-based XaaS models, support load balancing and elasticity models, and control A server-driven approach to seamlessly reconfigure data center deployments.
It achieves seamless distribution of data messages between data centers without reconfiguring the server, improves the flexibility and scalability of the data center, reduces the blocking points of traffic distribution, and supports load balancing among multiple service nodes. and sticky processing of service requests.
Smart Images

Figure CN112291294B_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with application date of September 30, 2015, application number 201580057270.9, and invention name “Inline Service Switch”. Technical Field
[0002] The present application relates to an inline service switch. Background Art
[0003] Data centers today use a very static, configuration-intensive approach to distribute data messages between different application layers and different service layers. A common approach today is to configure virtual machines to send packets to virtual IP addresses, and then configure forwarding elements and load balancers in the data center with forwarding rules that instruct them to forward packets addressed to the VIP to the appropriate application and / or service layer. Another problem with existing message distribution schemes is that today's load balancers are often choke points for distributed traffic. Therefore, there is a need in the art for a new approach to seamlessly distribute data messages between different application and / or service layers in a data center. Ideally, this new approach would allow the distribution scheme to be easily modified without reconfiguring the servers that send the data messages. Summary of the invention
[0004] Some embodiments provide novel inline switches that distribute data messages from a source compute node (SCN) to different groups of destination service compute nodes (DSCN). In some embodiments, the inline switch is deployed in a source compute node data path (e.g., an egress data path). In some embodiments, the inline switch is a service switch that (1) receives data messages from the SCN, (2) identifies a service node in a service-node cluster for processing the data message based on a service policy implemented by the switch, and (3) sends the received message to the identified service node using a tunnel.
[0005] Alternatively, or in combination, the inline service switch of some embodiments (1) identifies a service-node cluster for processing a data message based on a service policy implemented by the switch, and (2) sends a received data message to the identified service-node cluster using a tunnel. In some embodiments, the service-node clusters may perform the same service or may perform different services. This tunnel-based approach for distributing data messages to service nodes / clusters is advantageous for seamlessly implementing a cloud-based XaaS model (where XaaS stands for X as a Service, and X stands for Anything) in a data center, where any number of services are provided by a service provider in the cloud.
[0006] In some embodiments, the inline service switch performs a load balancing operation to distribute data messages between several service nodes or service-node clusters that perform the same service. Alternatively, or in combination, a service cluster in some embodiments may have one or more load balancers that distribute data messages received for the cluster between the service nodes of the service cluster.
[0007] In some embodiments, at least one service cluster implements an elastic model in which a primary service node receives data messages for the cluster from an inline service switch. This service node then either performs services on the data messages itself or directs the data messages (e.g., via L3 and / or L4 network address translation, via MAC redirection, etc.) to one of the other service nodes in the cluster (referred to as a secondary service node) to perform services on the data messages. In some embodiments, the primary service node elastically shrinks or increases the number of secondary service nodes in the cluster based on the received data message load.
[0008] Some embodiments provide an inline load balancing switch that statefully distributes service load to multiple service nodes based on one or more L4+ parameters, which are packet header parameters above the L1-L4 parameters. Examples of L4+ parameters include session keys, session cookies (e.g., SSL session identifiers), file names, database server attributes (e.g., usernames), etc. In order to statefully distribute service load among server nodes, the inline load balancing switch in some embodiments establishes a layer 4 connection session (e.g., a TCP / IP session) with a data message SCN and a service node, such that the switch (1) can monitor one or more of the initial payload packets exchanged for the session, and (2) can extract and store the L4+ session parameters for use in its subsequent load balancing operations.
[0009] In some embodiments, the inline switch establishes a layer 4 connection session with the SCN and another session with the service node by performing a three-way TCP handshake with the SCN and another three-way TCP handshake with the service node. To relay data messages between the SCN and the service node, the inline switch in some embodiments may adjust the sequence numbers of the relayed data messages to account for differences in sequence numbers between the SCN and the service node.
[0010] Some embodiments provide a controller-driven method for reconfiguring an application or service layer deployment in a data center. In some embodiments, one or more controllers define data message distribution policies for SCNs in a data center and push these policies or rules based on these policies to inline switches of the SCNs. The inline switches then distribute the data messages to the DCNs identified by the distribution policies / rules as data computing nodes (DCNs) for the data messages. In some embodiments, the distribution policies or rules are expressed in terms of a DCN group address (e.g., a virtual IP address (VIP)) used by the SCN to address several DCNs in the DCN group.
[0011] This controller-driven approach can seamlessly reconfigure application or service layer deployments in a data center without having to configure the SCN to use a new DCN group address (e.g., a new VIP). The controller set only needs to provide new distribution policies or rules to the inline switches, which specify new traffic distribution patterns based on the previously configured DCN group address. In some embodiments, seamless reconfiguration can be based on any packet header parameters (e.g., L2, L3, L4, or L7 parameters) used by the SCN. In other words, in some cases, these packet header parameters do not necessarily include the DCN group address. In some embodiments, the inline switches can be configured to distribute data messages based on metadata tags associated with the packets and injected into the packets (e.g., as L7 parameters) by the application-level gateway (ALG). For example, since the ALG is configured to inspect and mark packets when they enter a network domain (e.g., a logical domain), in some embodiments the controller set is configured to push new distribution policies and / or rules to the inline switches to configure these inline switches to implement new application or service layer deployments in the network domain.
[0012] The foregoing summary is intended to serve as a brief introduction to some embodiments of the present invention. This is not meant to be an introduction or overview of all inventive subject matter disclosed in this document. The following detailed description and the drawings mentioned in the detailed description will further describe the embodiments described in the summary of the invention as well as other embodiments. Accordingly, in order to understand all embodiments described by this document, a comprehensive review of the summary of the invention, the detailed description, the drawings and the claims is required. Moreover, the claimed subject matter is not limited by the illustrative details in the summary of the invention, the detailed description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The novel features of the invention are set forth in the appended claims. However, for purposes of illustration, several embodiments of the invention are set forth in the following figures.
[0014] Figure 1 An example of a multi-host system with an inline service switch is shown.
[0015] Figure 2 The processes performed by an inline services switch in some embodiments are conceptually illustrated.
[0016] Figure 3 Different examples of service rules are shown.
[0017] Figure 4 Distributing a data message stream to service nodes in a service node cluster is conceptually illustrated.
[0018] Figure 5 The distribution of data message flows to different clusters of service nodes executing the same service is conceptually illustrated.
[0019] Figure 6 An example of sequentially calling ISSs of multiple different service nodes of different clusters is shown.
[0020] Figure 7 An example of an elastic service model using one primary service node and zero or more secondary service nodes is shown.
[0021] Figure 8 An example of sequentially forwarding data messages from a VM to different elastically scalable service clusters is shown.
[0022] Fig. 9 Another process performed by an inline services switch in some embodiments is conceptually illustrated.
[0023] Fig.10 The process performed by the primary serving node in some embodiments of the present invention is conceptually illustrated.
[0024] Fig.11 An example of a multi-host system with an inline service switch that statefully distributes service load to service nodes is shown.
[0025] Fig.12 An example of extracting and reusing session parameters is conceptually illustrated.
[0026] Fig.13 Another example of extracting and reusing session parameters is conceptually illustrated.
[0027] Fig.14 The process of some embodiments for processing service requests from associated virtual machines in a sticky manner is conceptually illustrated.
[0028] Fig.15 A more detailed architecture of the host computing device is shown.
[0029] Fig.16An example of a controller reconfiguring an application layer deployment is shown.
[0030] Fig.17 Another example of a controller reconfiguring an application layer deployment is shown.
[0031] Fig.18 The process of some embodiments of defining service policy rules for an inline switch is conceptually illustrated.
[0032] Fig.19 Conceptually illustrated are processes of some embodiments for modifying a service rule and reconfiguring an inline service switch that implements the service rule.
[0033] Fig. 20 An electronic system is conceptually illustrated with which some embodiments of the present invention may be implemented. DETAILED DESCRIPTION
[0034] In the following detailed description of the present invention, numerous details, examples and embodiments of the present invention are set forth and described. However, it will be clear and obvious to those skilled in the art that the present invention is not limited to the embodiments set forth, and the present invention can be practiced without some of the specific details and examples discussed.
[0035] Some embodiments provide novel inline switches that distribute data messages from source compute nodes (SCNs) to different groups of destination service compute nodes (DSCNs). In some embodiments, the inline switch is deployed in a source compute node data path (e.g., an egress data path). In some embodiments, the inline switch is a service switch that (1) receives data messages from the SCN, (2) identifies a service node in a service-node cluster for processing the data message based on a service policy implemented by the switch, and (3) sends the received data message to the identified service node using a tunnel.
[0036] Alternatively, or in combination, the inline service switch of some embodiments (1) identifies a service-node cluster for processing a data message based on a service policy implemented by the switch, and (2) sends a received data message to the identified service-node cluster using a tunnel. In some embodiments, the service-node clusters may perform the same service or may perform different services. This tunnel-based approach for distributing data messages to service nodes / clusters is advantageous for seamlessly implementing a cloud-based XaaS model (where XaaS stands for X as a Service, and X stands for Anything) in a data center, where any number of services are provided by a service provider in the cloud.
[0037] Tunnels use tunnel headers to encapsulate packets from one type of protocol within a datagram of a different protocol. For example, VPN (Virtual Private Network) tunnels use PPTP (Point-to-Point Tunneling Protocol) to encapsulate IP (Internet Protocol) packets over a public network such as the Internet. GRE (Generic Routing Encapsulation) tunnels use GRE headers to encapsulate a wide variety of network layer protocols within a virtual point-to-point link over an IP network. In other words, a GRE tunnel encapsulates a payload within an outer IP packet.
[0038] As used in this document, a cloud refers to one or more collections of computers in one or more data centers accessible over a network (e.g., over the Internet). In some embodiments, the XaaS model is implemented by one or more service providers operating in the same data center or in different data centers in different locations (e.g., different neighborhoods, cities, states, countries, etc.).
[0039] Furthermore, as used in this document, a data message refers to a collection of bits in a specific format that is sent across a network. One of ordinary skill in the art will recognize that the term "data message" may be used herein to refer to various formatted collections of bits that may be sent across a network, such as Ethernet frames, IP packets, TCP segments, UDP datagrams, etc. Furthermore, as used in this document, references to L2, L3, L4, and L7 layers are references to the second data link layer, the third network layer, the fourth transport layer, and the seventh application layer, respectively, of the OSI (Open Systems Interconnection) layer model.
[0040] In some embodiments, an inline service switch (ISS) performs a load balancing operation to distribute data messages between several service nodes or service node clusters that perform the same service. Alternatively, or in combination, a service cluster in some embodiments may have one or more load balancers that distribute data messages received for the cluster between the service nodes of the service cluster.
[0041] In some embodiments, at least one service cluster implements an elastic model in which a primary service node receives data messages for the cluster from an inline service switch. This service node then either performs services on the data messages itself or directs the data messages (e.g., via L3 and / or L4 network address translation, via MAC redirection, etc.) to one of the other service nodes in the cluster (referred to as a secondary service node) to perform services on the data messages. In some embodiments, the primary service node elastically shrinks or increases the number of secondary service nodes in the cluster based on the received data message load.
[0042] In some embodiments, the SCN may be a virtual machine (VM) or software container (such as a Docker container) that is executed on a host along with other VMs or containers that act as SCNs or destination computing nodes (DCNs). In some embodiments, examples of DCNs include computing end nodes that generate or consume data messages, or middleware service nodes that perform some type of data processing on data computing end nodes as they are relayed between data computing end nodes. Examples of data computing end nodes include web servers, application servers, database servers, etc., while examples of middleware service nodes include firewalls, intrusion detection systems, intrusion prevention systems, etc.
[0043] A service node is a standalone device or a DCN (e.g., a VM, container, or module) executed on a host computer. A service node can be a data computing end node (e.g., a web server, application server, database server, etc.), or can be a middleware service node (e.g., a firewall, intrusion detection system, intrusion prevention system, etc.).
[0044] In some embodiments, the inline service switch is another software module executed on the same host as the SCN. In some embodiments, two or more SCNs on a host use the same inline service switch, while in other embodiments, each SCN on a host has its own inline service switch executed on the host. In some embodiments, the host also executes a software forwarding element (SFE). The SFE communicatively couples the SCNs of the host to each other and to other devices (e.g., other SCNs) external to the host. In some embodiments, the inline switch is inserted in the egress path of the SCN before the SFE.
[0045] In some embodiments, one or more controllers configure the inline service switch by providing a service distribution policy or by providing distribution rules based on the service distribution policy definition. An example of these controllers is Figure 1 ISS controller 120. This figure shows an example of a multi-host system 100 with an inline service switch 105 of some embodiments. This system includes multiple host computing devices 110, a set of ISS controllers 120, a set of one or more VM management controllers 125, and multiple service node clusters 150. Figure 1 As shown in , host 110, ISS controller set 120, VM manager set 125, and service node cluster 150 are communicatively coupled via network 175, where network 175 may include a local area network (LAN), a wide area network (WAN), or a network of networks (e.g., the Internet).
[0046] Each host computing device 110 (e.g., a computer) executes one or more VMs 115, one or more SFEs 130 (e.g., software switches, software routers, etc.), an ISS agent 135, and one or more inline service switches 105. In some embodiments, the VMs include SCNs and DCNs. In some embodiments, the SFEs 130 on the host communicatively couple the VMs of the host to each other and to devices external to the host (e.g., coupled to VMs of other hosts). Moreover, in some embodiments, the SFEs of the host implement one or more logical networks together with the SFEs executed on other hosts. The SFEs 130 also communicatively couple the ISS 105 on the host to one or more service nodes or one or more service node clusters 150.
[0047] In some embodiments, each ISS 105 is associated with one VM on its host, while in other embodiments, one ISS 105 is associated with more than one VM on its host (e.g., associated with all VMs on its host that are part of a logical network). For data messages sent by its associated VMs, the ISS 105 enforces one or more service rules that implement one or more service policies. Based on the service rules, the ISS (1) determines whether the sent data message should be processed by one or more service nodes or clusters, and (2) if so, selects a service node or cluster to process the data message and forwards the data message to the selected node or cluster via a tunnel.
[0048] Each ISS 105 has a load balancer 160 that it uses to determine how to distribute the load of executing a service to one or more service nodes or one or more service node clusters that execute the service. In some embodiments, the ISS 105 is connected to the service nodes or clusters through a tunnel. In other embodiments, the inline switch is connected to some service nodes / clusters through a tunnel, but not to other service nodes / clusters using a tunnel. In some embodiments, the service nodes are in a different data center than the host 110 and the controllers 120 and 125, while in other embodiments, one or more service nodes are in the same data center as the host 110 and the controllers 120 and 125. In some embodiments, some service nodes are service VMs executed on the host 110.
[0049] Moreover, in some embodiments, different service node clusters may provide the same service or may provide different services. Figure 1In the example shown in , service node clusters 150a and 150b provide the same service (e.g., firewall service), while service node cluster 150c provides a different service (e.g., intrusion detection). The tunnel-based approach of distributing data messages to service nodes / clusters in the same data center or different data centers is advantageous for seamlessly implementing a cloud-based XaaS model, where any number of services are provided by a service provider in the cloud.
[0050] This tunnel-based XaaS model architecture allows hosts 110 and VMs 115 in a private data center (e.g., in an enterprise data center) to seamlessly use one or more service clusters in one or more public multi-tenant data centers in one or more locations. Private data centers are typically connected to public data centers via a public network such as the Internet. Examples of cloud service providers include: firewall service providers, email spam service providers, intrusion detection service providers, data compression service providers, etc. One provider may provide multiple cloud services (e.g., firewalls, intrusion detection, etc.), while another provider may only provide one service (e.g., data compression).
[0051] In some embodiments, the ISS for the VM is deployed in the egress data path of the VM. For example, in some embodiments, each VM has a virtual network interface card (VNIC) connected to a port of the SFE. In some of these embodiments, the inline switch for the VM is called by the VNIC of the VM or by the SFE port to which the VNIC of the VM is connected. In some embodiments, the VM executes on top of a hypervisor, which is a software layer that enables virtualization of the shared hardware resources of the host. In some of these embodiments, the hypervisor provides an inline switch that provides inline switching and load balancing services to its VMs.
[0052] Multiple inline service switches executed on multiple hosts may implement a distributed service switch. In a distributed service switch, data messages from a group of related VMs on multiple different hosts are distributed to one or more service nodes or clusters according to the same service distribution policy. These data messages are distributed according to the same service distribution policy because the various inline service switches for the SCN group are configured with the same policy or rules.
[0053] The VM management controller 125 provides control and management functions for defining (e.g., allocating or instantiating) and managing one or more VMs on each host. The ISS controller set 120 configures the inline switch 105 and its associated load balancer 160 through the ISS agent 135. In some embodiments, one of the two controller sets 120 and 125 provides control and management functions for defining and managing multiple logical networks defined on a common SFE physical infrastructure of the host. In some embodiments, the controllers 120 and 125 communicate with an agent executing on the host via out-of-band control channel communication. In some embodiments, the controllers 120 and 125 are stand-alone servers, or servers that execute on the host together with other servers.
[0054] In some embodiments, the ISS controller set 120 provides the ISS agent with high-level service policies that the ISS agent converts into service rules for the inline switch implementation. These service policies and rules include load balancing policies and rules implemented by the load balancer of the inline switch. In some embodiments, the ISS controller set provides the ISS agent with service rules that the agent passes to the inline switch and the load balancer. In still other embodiments, the ISS controller set provides both service policies and service rules to the ISS agent. In these embodiments, the ISS agent converts the service policies into service rules, and then it provides the received and converted service rules to the inline switch and the load balancer. In still other embodiments, the ISS controller set directly configures the inline switch and the load balancer without going through the ISS agent.
[0055] In some embodiments, the ISS controller set 120 also provides the ISS proxy 135, the service switch 105, or its load balancer 160 with load balancing criteria that the load balancer uses to perform its load balancing operations. For example, the load balancing criteria include a set of weight values that specify how the load balancer should distribute the data message load among the service node set in a weighted round robin method. In some embodiments, the ISS controller set 120 distributes data-message load statistics, and the service proxy 135, the ISS 105, or the load balancer 160 generates the load balancing criteria based on these statistics.
[0056] More specifically, in some embodiments, the ISS controller set 120 collects statistical information from the inline switches and dynamically adjusts the service policies, service rules and / or load balancing criteria that it distributes directly or indirectly (through the ISS agent) to the inline switches and load balancers based on the collected statistical information. In some embodiments, each inline switch stores the statistical information about its data message distribution updated on its host in a data storage device (hereinafter referred to as a STAT storage device). The ISS agent 135 periodically collects the statistical information from the STAT data storage device (hereinafter referred to as a STAT storage device). Figure 1 The agent 135 (not shown) collects the collected statistics and relays the statistics to the ISS controller set 120. In some embodiments, the agent 135 aggregates and / or analyzes some of the statistics and then relays the processed statistics to the ISS controller set 120, while in other embodiments, the agent relays the collected raw statistics to the ISS controller set 120.
[0057] The ISS controller set 120 of some embodiments aggregates the statistics it receives from the host's agents. In some embodiments, the ISS controller set 120 then distributes the aggregated statistics to the agents executing on the hosts. These agents then analyze the aggregated statistics to generate and / or adjust rules or standards enforced by their associated inline switches or their load balancers. In other embodiments, the controller set analyzes the aggregated statistics to generate and / or adjust service policies, service rules, and / or LB standards, which the controller set then distributes to the host's agents 135 for enforcement by their inline switches and load balancers.
[0058] In some of these embodiments, a controller set distributes the same policies, rules, and / or standards to each ISS in a group of associated ISSs, while in other embodiments, a controller set distributes different policies, rules, and / or standards to different ISSs in a group of associated ISSs. In some embodiments, a controller set distributes updated policies, rules, and / or standards to some inline switches in an associated switch group without distributing the updated policies, rules, and / or standards to other inline switches in the associated group. In some embodiments, a controller set updates and distributes some policies, rules, or standards based on aggregated statistical information, while also distributing some or all of the aggregated statistical information to a host so that its agent can generate other rules or standards. One of ordinary skill in the art will recognize that in some embodiments, policies, rules, and / or standards are not always adjusted based on aggregated statistical information, but are modified only when the aggregated statistical information requires such modification.
[0059] Regardless of the implementation of the update policy, rules and / or criteria, the collection and aggregation of data traffic statistics allows the switching rules or criteria to be adjusted dynamically. For example, when the statistics show that a service node is too full of data traffic, the load balancing rules or criteria can be dynamically adjusted for the load balancer that sends data messages to this service node to reduce the load on this service node while increasing the load on one or more other service nodes in the same service node cluster. In some embodiments, the collection and aggregation of data traffic statistics also allows the controller set 120 to reduce the load on any service node in the service-node cluster by dynamically instructing the service-node management controller set (not shown) to supply (one or more) new service nodes to the service cluster or allocate (one or more) previously supplied service nodes.
[0060] Figure 2 200 is shown of a process 200 performed by ISS 105 of VM 115 for a data message sent by the VM. In performing this process, ISS 105 (1) determines whether the data message should be processed by one or more service nodes or clusters, and (2) if so, selects a service node or cluster to process the data message and forwards the data message to the selected node or cluster via a tunnel. In order to select a service node or service-node cluster, the ISSS performs a load balancing operation to ensure that the data message stream it processes is distributed among several service nodes or clusters based on a set of load balancing criteria. The following will refer to Figure 3-5 The process 200 is described below. Figure 3 are different examples of service rules enforced by process 200 in some embodiments. Figure 4 and 5 ISS 105 is shown distributing a data message flow to service nodes 305 in one service node cluster 310 and distributing a data message flow to a different service node cluster 405 that performs the same service, respectively.
[0061] Process 200 begins when ISS 105 receives a data message sent by its associated VM. As mentioned above, ISS 105 is deployed in the egress data path of the VM so that it can intercept data messages sent by its VM. In some embodiments, ISS 105 is invoked by the VNIC of the VM or by an SFE port that is communicatively connected to the VNIC of the VM.
[0062] At 210, the process determines whether the data message is part of a data message stream for which the process has already processed other data messages. In some embodiments, the process makes this determination by checking a connection storage device maintained by the ISS to track the data message streams it has recently processed. When two data messages share the same message header, they are part of the same stream. For example, when two packets have the same five-tuple identifier, they are part of the same stream, and the five-tuple identifier includes the source IP address, the destination IP address, the source port, the destination port, and the protocol.
[0063] As further described below with reference to 255, the connection storage device stores a record for each data message flow that the ISS has recently processed. This record stores a description of the service rule set that must be applied to the data messages of the flow, or has a reference (e.g., a pointer) to such a description. In some embodiments, when operation of the service rule set requires discarding the data message, the connection-storage device record also specifies this action, or specifies this action in place of the service rule description. Moreover, when it is not necessary to perform services on the data messages of this flow, the connection-storage device record indicates that the ISS should allow the received data message to pass along the VM's egress data path.
[0064] In some embodiments, this record stores an identifier of the flow (e.g., a five-tuple identifier). In addition, in some embodiments, the connection storage device is hash-addressable (e.g., a location in the connection storage device is identified based on a hash of the identifier of the flow). When the process determines (at 210) that it has previously processed a data message from the same flow as the received data message, it transitions to 215, where it executes the actions or service-rule set previously specified for the data message of this flow in the connection-storage device record for this flow. After performing these service operations, the process 200 provides (at 215) the data message to the module that called it (e.g., SFE port or VNIC), assuming that the service operation does not require the data message to be discarded, in which case the process notifies the calling module so. Typically, the data message returned by the process 200 to the calling module is a modified version of the data message received at 205 because the service operation(s) are performed. The modified data message may have different header values and / or datagrams (i.e., payload) than the received data message. In some cases, the returned data message may be exactly the same as the received data message. After 215, the process ends.
[0065] When the process determines (at 210) that it has not previously processed a data message from the same data message flow, the process determines (at 220) whether a service rule that it enforces requires one or more service actions to be performed on the received data message. In some embodiments, the ISS has a service rule storage device that stores a number of service rules enforced by the ISS. Each service rule can be associated with one or more data message flows from a VM of an inline switch, and different service rules can be associated with different data message flows from this VM. In some embodiments, each service rule in the service rule storage device has (1) a set of associated data message identifiers (e.g., packet header values) and (2) a set of one or more actions.
[0066] The process 200 determines (at 220) whether the identifier (e.g., 5-tuple) of the received data message matches the data message identifier of any service rule in its service rule storage. When the data message matches more than one service rule, the process 200 of some embodiments performs only the set of actions specified by the highest priority matching service rule. In some such embodiments, the service rule storage stores the rules according to a sort based on their priority, so that, when more than one rule matches the data message, the process 200 first matches the data message to the higher priority rule before being able to match it to the lower priority rule.
[0067] When the header value of the received data message does not match the rule match identifier of any service rule that specifies a service action in the service rule storage device, the process 200 determines that it does not need to forward the data message to any service node to perform any service operation. As a result, it creates (at 222) a record in the connection storage device to specify that no service action is required for the data message that is part of the same stream as the received data message. For some embodiments of the present invention, the structure of the connection storage device has been described above and further described below. At 222, the process also notifies the module that called it (e.g., an SFE port or VM VNIC) that the process has completed processing the data message. In some embodiments, this notification is not accompanied by a data message, while in other embodiments, this notification is accompanied by a data message. When sending this notification, the process 200 allows the received data message to pass through without performing any service on it. After 222, the process ends.
[0068] When the identifier of the received data message matches the rule matching identifier of one or more service rules in the service rule storage device, the process executes 225-250 to process the action that matches one or more service rules. In some embodiments, each service rule can only specify one action, while in other embodiments, the service rule can specify a sequence of one or more actions. The service action in some embodiments requires forwarding the matched data message to a service node or cluster. For this operation, the service rule directly or through another record (referenced by the rule) identifies the cluster of a group of service clusters or the service node of the service node cluster for performing the service. As further described below, process 200 selects one of the identified service nodes or clusters.
[0069] Figure 3 Several examples of service rules that specify service actions are shown. This figure shows a service rule storage 300 that stores a plurality of service rules. Each service rule has an associated set of service rule identifiers 305 represented in terms of one or more data message header values (e.g., one or more five-tuple values as described above). The process 200 compares the set of service rule identifiers with the header values of the data message to determine whether the service rule matches the received data message.
[0070] Each service rule also specifies one or more actions, each action being specified by an action type 310 (e.g., a firewall action type, an IPS action type, an IDS action type, etc.) and a set of tunnel IDs 315. In some embodiments, the set of tunnel IDs for each action of a service rule identifies (1) one or more tunnels between the ISS and one or more service nodes in a cluster, or (2) one or more service clusters in a service cluster group that provide services. In some embodiments, the set of tunnel IDs for a service rule is provided as part of data initially provided by a set of ISS controllers (e.g., to configure the ISS), or in a subsequent update provided by the set of controllers.
[0071] When a service rule specifies more than one action, an action can be associated with more than one service. In this way, a service rule can specify a sequence of service operations that need to be performed on a matched data message. As mentioned above, some embodiments store the service rules in the data storage device 300 according to an order based on rule priority because the process 200 in these embodiments matches a data message to only one service rule, and the order of the ordering allows the process to match a data message to a matched higher priority rule instead of a matched lower priority rule.
[0072] exist Figure 3In the example shown, service rule 350 has one associated action, while service rule 355 has multiple associated actions. In other embodiments, each service rule may specify only one service action. Also, in other embodiments, the service rule does not directly identify the tunnel ID for the service node or cluster. For example, in some embodiments, process 200 identifies the tunnel ID by retrieving the tunnel ID from a table that identifies these IDs using a service-node identifier or a service-cluster identifier.
[0073] At 225, the process selects the service action of the service rule that matches the received data message header value. When the matching service rule specifies a sequence of two or more service actions, the process 200 maintains a record (e.g., a count) identifying its position in the sequence of actions it must perform so that when it returns to 225 it will know which is the next service action in the sequence it must select. This will be described further below.
[0074] In some embodiments, this service action has an associated tunnel ID set 315 that specifies one or more tunnels of one or more service nodes or service node clusters that perform the service action. Thus, at 230, process 200 uses a load balancer of the ISS to select a service node or a service node cluster for the data message from the set of service nodes or service-node clusters identified by the tunnel ID set in a load-balanced manner. In some embodiments, the ISS load balancer distributes the load in a stateful manner so that data messages that are part of the same flow are processed by the same service node or the same service node cluster.
[0075] In order to select a service node or service-node cluster in a load-balanced manner, each service rule in some embodiments specifies a set of weight values for each specified tunnel ID set of the rule (not shown). Alternatively, in other embodiments, each service rule references another record that identifies a set of weight values for each tunnel ID set identified for the rule. Each set of weight values specifies a weight value for each tunnel ID in the associated set of tunnel IDs and provides a load balancing criterion for the ISS load balancer to spread traffic to the service nodes or clusters identified by the set of tunnel IDs.
[0076] For example, in some embodiments, the ISS load balancer uses these weight values to implement a weighted round-robin scheme to spread traffic to nodes or clusters. As an example, assume that the tunnel ID set has five tunnel IDs and the weight values for the tunnel IDs are 1, 3, 1, 3, and 2. Based on these values, the ISS load balancer will distribute data messages that are part of ten new flows as follows: 1 for the first tunnel ID, 3 for the second tunnel ID, 1 for the third tunnel ID, 3 for the fourth tunnel ID, and 2 for the fifth tunnel ID. As further described below, in some embodiments, the weight values for service rules are generated and adjusted by the ISS agent 135 and / or the ISS controller set 120 based on statistical information collected by the controller set from the inline switches. In order to switch gracefully between different load balancing standards, the tunnel ID set can have multiple weight value sets, and in some embodiments, the service rules can specify different time periods during which different weight values (i.e., different load balancing standards) of the tunnel ID set are effective.
[0077] After selecting (230) a service node or service-node cluster for the data message, the process identifies (at 235) a tunnel key, encapsulates the data message with a tunnel header (including the identified tunnel key) for the tunnel to the selected service node or service-node cluster, and provides the tunnel-header encapsulated data message to its host's SFE for forwarding to the selected service node or service-node cluster. Examples of such tunnels and keys are GRE tunnels, Geneve tunnels, GRE keys, Geneve keys, etc. As further described below, the inline switches of some embodiments also forward data messages to some service nodes and service-node clusters using other redirection mechanisms (such as MAC redirection, destination network address translation, etc.).
[0078] Tunnel keys (e.g., GRE keys) allow multiple data message streams to share the same tunnel. For each data message stream, in some embodiments, the process uses a GRE key to send the data messages of the stream to a service node or cluster at the other end of the tunnel, and receives responsive data messages in response to data messages sent from this node or cluster. For data messages from a service node or cluster, the tunnel key also allows process 200 to associate the data message with the data message sent by the process to the service node or cluster.
[0079] Figure 4An example of an inline service switch 105 showing several related VMs 115 executing on the same host or different hosts is given, where the switch 105 distributes its VM data messages to multiple service nodes 405 of a service node cluster 410 that perform the same service (e.g., firewall service or IPS service) on these messages using several tunnels 450. The ISS performs a load balancing operation to select a service node for each data message flow.
[0080] exist Figure 4 In the example, each tunnel is established between an ISS 105 and a service node 405 in the cluster. For data messages of different flows that share the same tunnel to the same service node, the ISS 105 uses different tunnel keys so that different flows can share the same tunnel. Moreover, through each service-node tunnel, the ISS receives data messages in response to data messages it sends to the service node, and uses the tunnel key to associate each response data message with the data message it sends.
[0081] In some embodiments, each service node 405 is a standalone device. In other embodiments, one or more service nodes 405 are servers executed on a host computer. For such service nodes, in some embodiments, tunnel 405 is a tunnel provisioned for the host computer or the SFE of the host computer on which the service node executes. In some embodiments, on the inline switch side, the tunnel can also be provided at the host level. In other words, in some embodiments, two or more inline switches 105 executed on the same host computer use the same tunnel to the service node.
[0082] Figure 5 An example of an inline service switch 105 showing several related VMs 115 executing on the same host or different hosts is given, where the switch 105 distributes its VM data messages to multiple service node clusters 505 that perform the same service (e.g., firewall service or IPS service) for these messages using several tunnels 550. In this example, the ISS performs a load balancing operation to select a service cluster for each data message flow. Figure 4 In the example, different tunnel keys are used to identify Figure 5 In the example above, data messages of different flows share the same tunnel.
[0083] exist Figure 5In the example shown, each service cluster 505 has multiple service nodes 510 that perform the same service, and a load-balancing web server set 515 (having one or more web servers) that distributes received data messages to the service nodes of its cluster. In this example, each tunnel is established between an ISS 105 and a load-balancing web server 515 of the cluster. Through its load balancing operation 230, the ISS selects Figure 5 A cluster in a group of clusters is selected to distribute the service load to different clusters performing the same service. The load-balancing web server 515 of each cluster is then tasked with distributing the load of each cluster between the service nodes of the cluster. In some embodiments, these web servers distribute the load in a stateful manner so that the same service node in the cluster processes data messages that are part of the same flow.
[0084] In some embodiments, Figure 5 The different service clusters of the service cluster group shown in are in different data centers located in different locations. It would be advantageous to have different service clusters performing the same service at different locations because it allows different ISSs at different locations to bias their service cluster selection towards service clusters that are closer to the ISS location. Moreover, having different service clusters perform the same service actions also provides different tenants in a data center with the ability to select different service providers for the same service and to easily switch between these providers without reconfiguring the inline switches or their servers (e.g., their VMs or containers). In other embodiments, one or more of these service clusters 505 are in the same data center. Such a service cluster may be created when different service providers provide the same service in one data center.
[0085] Furthermore, in some embodiments, Figure 5 The architecture shown in is also used to terminate the tunnel on a non-service node element (e.g., on a load balancer (such as load balancer 515)) to distribute data messages received from the inline switch 105 to one or more service nodes performing the same service or different services. In one such approach, the service nodes 515 of a service provider can be in different clusters 505. Moreover, in this approach, each service cluster can have only one service node. In view of the above, it will be recognized by those of ordinary skill in the art that the tunnel used by the inline switch to forward data messages to the service node does not necessarily have to terminate at the service node (i.e., does not necessarily have to be provisioned), but can terminate at a machine or device that forwards the data messages it receives to the service node through the tunnel.
[0086] Some time after sending (235) the data message to the service node or cluster, the process receives (at 240) a service completion confirmation from the service node or cluster via the tunnel used to send the data message at 235. The confirmation is a portion of one or more data messages received from the service node or cluster and encapsulated by a tunnel header having a tunnel key. The tunnel key allows the process 200 to associate the received data message(s) with the sent data message (i.e., the data message sent at 235).
[0087] The received confirmation may indicate that the data message should be discarded (e.g., when the service node performs a security service operation (e.g., firewall, IPS, IDS, etc.) that determines that the data message should be discarded). Alternatively, the confirmation data message(s) may return a data message with one or more modified data message headers. These modified header values may redirect the data message to a different destination once process 200 completes its processing of the data message.
[0088] Furthermore, the confirmation data message(s) in some embodiments may return a new or modified payload to replace the payload of the data message sent to the service node or cluster at 235. For example, when the service node or cluster performs an encryption or compression operation, the new payload may be an encrypted or compressed version of the payload of the sent data message. When the returned data message(s) provide a new or modified payload for the sent data message, the process 200 replaces the sent data message payload with the received new or modified payload before having another service node or cluster perform another service on the data message or before having the SFE forward the data message to its final destination.
[0089] After receiving (at 240) the service completion confirmation, the process 200 determines (at 245) whether the data message should continue to be processed. When the received confirmation indicates that the data message should be discarded, the process 200 transitions to 255, where it creates a record in the ISS connection storage device to specify that the data message (such as the data message received at 205) that is part of the same flow should be discarded. This record is created so that for subsequent data messages that are part of the same flow, the process does not have to search the service rules data storage device and perform service operations before determining that it should discard the data message. At 255, the process 200 also updates the statistical information it maintains in the ISS STAT storage device to reflect the current processing of the data message by the service node(s) that processed this data message before the data message was discarded.
[0090] Alternatively, when the process determines (at 245) that it should continue processing the data message, it determines (at 250) whether its service rule check at 220 identified any other service actions that must be performed for the current data message. As mentioned above, in some embodiments, the process may identify multiple matching service rules with multiple service actions that must be performed on the data message. In other embodiments, the process may only identify one matching service rule for the data message. However, in some embodiments, a matching service rule may specify multiple service actions that must be performed on the data message.
[0091] Thus, when the process determines (at 250) that another service action needs to be performed on the data message, it returns to 225 to select another service action and repeat operations 230-250. When the matched service rule specifies a sequence of two or more service actions, the process 200 maintains a record (e.g., a count) identifying its position in the sequence of actions it must perform so that it will know which service action it must select next in the sequence when it returns to 225. In other words, this record maintains the state of where the process is in the chain of service policies it must implement for the received data message.
[0092] Figure 6 An example of sequentially calling ISSs of multiple different service nodes of different clusters executing different services in order to implement a complex service policy involving multiple different individual service policies is shown. This figure shows that the ISS 105 of the VM 115 sequentially uses X service nodes 605 of X different service clusters 610 to execute a complex service policy involving X individual service actions, where X is an integer. As shown in the figure, the ISS uses different tunnels 650 to send data messages to the X service nodes. Figure 6 The tunnels used to process data messages are shown in solid lines, while other candidate tunnels not selected by ISS 105 are shown in dashed lines. The use of tunnels allows some or all clusters to be in the cloud. In other words, tunnels allow ISS to seamlessly implement a cloud-based XaaS model.
[0093] In some embodiments, different service clusters 610 may be located in the same data center as each other, or in different data centers. Moreover, service cluster 610 may be located in the same data center as VM 115 and ISS 105, or it may be located in different data centers. VM 115 is located in a private data center (e.g., in an enterprise data center), while one or more service clusters are located in a public multi-tenant data center at different locations. As mentioned above, a tunnel-based approach for distributing data messages to service nodes / clusters in the same data center or in different data centers is advantageous for seamlessly implementing a cloud-based XaaS model, where any number of services are provided by a service provider in the cloud.
[0094] In some embodiments, when the inline switch 105 sequentially invokes multiple service nodes or clusters to perform multiple service actions on data messages that the switch has received, the inline switch sends to each service node or cluster a data message that is identical to the data message that the inline service switch originally received when process 200 began or that the inline service switch received from a previous service node that performed a previous service action on a data message that the inline service switch sent to the previous service node. In other words, in these embodiments, the inline switch simply relays in the tunnels that connect it to the service nodes or clusters the data messages that it receives (at 205) and receives from the service nodes (at 240) at the beginning of process 200. In these cases, the inline switch simply places a tunnel packet header on the data message that it receives before forwarding it to the next service action node.
[0095] In performing its service actions on received data messages, a service node may modify header values of a data message and / or its datagrams before sending back the modified data message. Despite such modifications, the discussion in this document applies to all data messages received by the inline switch as received data messages during execution of process 200 (i.e., when the switch instructs service node(s) or cluster(s) to perform a desired sequence of service operations, which are initiated upon receipt of the first data message at 205 to begin process 200). One of ordinary skill will recognize that after each service operation, the data message may be modified so that the resulting message is dissimilar to the message on which the operation was performed (e.g., has a different header value or a different datagram).
[0096] Furthermore, one of ordinary skill will appreciate that in some embodiments, the inline switch may only send a portion of a received data message to the service node. For example, in some embodiments, the inline switch may only send a header of the data message, a portion of this header, a payload of the data message, or a portion of the payload. Similarly, in some embodiments, the service nodes do not send back data messages that are modified versions of the data messages they receive, but instead send back a value (e.g., allow, drop, etc.).
[0097] When the process determines (at 250) that all of the service actions it identified have been performed for the data message received at 205, the process creates (at 255) a record in the ISS connection store to specify the service action or service-action sequence that should be performed for data messages that are part of the same flow (such as the data message received at 205). This record is created so that for subsequent data messages that are part of the same flow, the process does not have to search the service rules data store. Instead, at 210, the process can identify from the record in the connection store the service action(s) that it must perform for these subsequent data messages, and it can perform these actions at 215. For each service action identified by the process 200 in the connection store, the process also identifies in the connection store record the identified service node or cluster that must perform the service action (i.e., the node or cluster identified at 225), so that all data messages for the same flow are processed by the same service node or cluster for that service action.
[0098] At 255, process 200 also updates the statistics it maintains in the ISS STAT storage to reflect the current processing of the data message by the one or more service nodes that processed this data message. After performing the service operation, process 200 provides (255) the data message to the module that called it (e.g., SFE port or VNIC), assuming that the service operation does not require the data message to be discarded, in which case the process notifies the calling module as such. Again, due to the performance of the service operation(s), the data message returned by process 200 to the calling module is typically a modified version of the data message received at 205 (e.g., having one or more different header values and / or a modified payload), but in some cases the returned data message may be identical to the received data message. After 255, the process ends.
[0099] Reference above Figure 2-6In several examples described, an inline switch selects a service node or cluster for processing a data message in a load-balanced manner and then sends the data message to the selected node or cluster through a tunnel. In other embodiments, the inline switch does not select a service node from among several service nodes, nor does it select a service cluster from among several service clusters. For example, in some embodiments, the inline switch simply relays the data message to a service cluster along a tunnel so that a load-balancing node at the service cluster can then select a service node of the cluster to perform a service.
[0100] In some of these embodiments, at least one service cluster implements a fragmentation model in which a primary service node receives data messages for the cluster from an inline service switch. This service node then either performs services on the data messages itself or directs the data messages (e.g., through L3 and / or L4 network address translation, through MAC redirection, etc.) to one of the other service nodes (referred to as secondary service nodes) in the cluster to perform services on the data messages. In some embodiments, the primary service node elastically shrinks or increases the number of secondary service nodes in the cluster based on the received data message load.
[0101] Figure 7 An example of such an elastic service model using one primary service node and zero or more secondary service nodes is shown. This example is shown in three stages 705-715, where the operation of the service node cluster 700 at three different times is shown. The first stage 705 shows that at time T1, the cluster includes only one primary service node (PSN) 720. As shown, PSN 720 has a load balancer (LB) and a service virtual machine (SVM).
[0102] In the first phase 705, the PSN receives all the data messages that the cluster must perform its services on. These messages are captured by the inline switch 105 and sent from its VM to the cluster 700 through the tunnel 750. In the first phase 705, the SVM 730 of the PSN performs the required services on these messages and then directs these messages back to the inline switch 105 through the tunnel 750.
[0103] The second stage 710 shows that at time T2, the cluster has been expanded to include another service node SSN1 implemented by a second service virtual machine. In some embodiments, service node SSN1 is added to the cluster because the data message load on the cluster has exceeded a first threshold. In some embodiments, the controller set adds SSN1 when a service-node controller set (not shown) detects that the data message load has exceeded the first threshold, or when the PSN detects such a condition and instructs the controller set to add SSN1. In some embodiments, the service-node controller set obtains the data message load from the PSN.
[0104] In order to evaluate whether the data message load exceeds a threshold, in different embodiments, the controller set or PSN quantifies the data message load based on different metrics. In some embodiments, these metrics include one or more of the following parameters: (1) the number of flows processed by the cluster or each service node in the cluster, (2) the number of packets processed by the cluster or each service node in the cluster, (3) the amount of packet data processed by each service node in the cluster or group.
[0105] The second stage 710 also shows that at time T2, the PSN performs the cluster service on some data message flows, while directing other data message flows to SSN1 so that this service node can perform this service on these other flows. Once the PSN or SSN1 performs the service on the data message, the PSN directs the data message to the ISS 105. As shown in the figure, once SSN1 performs the service, in some embodiments, this service node returns the data message to the PSN, and the PSN directs it back to the ISS. In other embodiments, the SSN returns the processed data message directly to the inline switch. In some of these embodiments, the SSN and the inline switch are configured to insert appropriate packet header values and check appropriate packet header values to identify data messages that have been processed by the SSN. In other embodiments, once the SSN is supplied, the SSN can use the inline switch (e.g., a host using the inline switch) to establish a tunnel so that they can return their processed messages directly to the inline switch.
[0106] The load balancer 725 of the PSN performs a load balancing operation, which selects which service node (primary or secondary) in the cluster should perform the service of the group for each data message received by the PSN. In some embodiments, the load balancer 725 distributes data messages based on the hash of different tunnel keys used by the ISS 105 to send different data-message streams through the tunnel 750. This hash ensures that the data messages as part of the same stream are processed by the same service node in the cluster. In some embodiments, load balancing is also based on some internal packet header values. In other embodiments, load balancing is only based on internal packet header values (that is, it is not based on tunnel keys). In some embodiments, the load balancer 725 stores a record of each service node selection for each data-message stream in a connection storage device, and uses this record to abandon the re-evaluation selection of the service node of the stream after selecting the service node for the first data message in the stream. In some embodiments, the load balancer of the PSN also determines when a service node should be added to a cluster or removed from a cluster.
[0107] The third stage 715 shows that at time T3, the cluster has been expanded to also include another service node SSN2 as a third service virtual machine. In some embodiments, service node SSN2 is added to the cluster because the data message load on the cluster has exceeded a second threshold, which in some embodiments is the same as the first threshold, or in other embodiments is different from the first threshold. Some embodiments add service node SSN2 when the load on PSN or SSN1 exceeds a second threshold amount. Other embodiments add a new service node when the load on N (e.g., two or three) service nodes exceeds a threshold. As previously described, in some embodiments, the service node controller set adds SSN2 when it or the PSN detects that the data message load has exceeded the second threshold.
[0108] The third stage 715 also shows a time T3 when the PSN performs cluster services on some data message flows while directing other data message flows to SSN1 or SSN2 so that these service nodes can perform such services on these other flows. As shown, once any one of the service nodes PSN, SSN1 or SSN2 performs services on the data message, the PSN returns the data message to the ISS 105 via the tunnel 750. After processing the data message, SSN2 provides its reply data message to the PSN just like SSN1, so that the PSN can forward this message to the ISS 105 via the tunnel 750.
[0109] Figure 8 An example is shown in which the ISS 105 of the VM 115 sequentially forwards data messages from the VM to different clusters of the elastically adjusted service-node cluster. In this example, different service clusters perform different service operations on the data messages. In some embodiments, when multiple clusters reside in the same location, the SSN of one cluster can be the PSN of other clusters.
[0110] The ISS 105 is connected to the PSN of each service cluster through a tunnel, which allows each service cluster to reside outside the local area network of the ISS. By sequentially relaying data messages to different service clusters, the ISS 105 can implement complex service policies with multiple service actions (X in this example) on the data messages. The use of tunnels allows some or all clusters to be in the cloud. In other words, tunnels allow the ISS to seamlessly implement a cloud-based XaaS model.
[0111] Fig. 9 105 in some embodiments performs a process 900 to utilize one or more elastically scaled service node clusters to process data messages. This process is similar to the process 900 except that the process 900 does not perform a load balancing operation 230 to select a service node in the cluster. Figure 2As shown, after identifying (at 225) a service action performed by a service node of a service cluster, process 900 simply forwards (235) the data message to the service cluster along the tunnel connecting the ISS to the service cluster.
[0112] Fig.10 Conceptually, a process 1000 is shown that is performed by such a PSN in some embodiments when the PSN receives a data message. The process 1000 identifies a service node in the SN group of the PSN that should process the received data message, and then instructs the identified service node to perform the services of the SN group on the received data message. The identified service node may be the PSN itself, or it may be an SSN in the SN group.
[0113] like Fig.10 As shown in , process 1000 begins (at 1005) when a PSN receives a data message from an ISS filter through a tunnel. After receiving the data message, the process determines (at 1010) whether the received message is part of a particular data message flow for which the PSN has previously processed at least one data message.
[0114] To make this determination, the process examines (at 1010) a connection-state data store that stores (1) the identity of each of a number of data message flows that the PSN previously processed, and (2) the identities of service nodes that the PSN previously identified as service nodes for processing data messages for each identified flow. In some embodiments, the process identifies each flow in the connection-state data store by one or more flow attributes (e.g., a five-tuple identifier for the flow). Furthermore, in some embodiments, the connection-state data store is hash-indexed based on a hash of the flow attributes (e.g., a five-tuple header value for the flow). For this store, the PSN generates a hash value from a set of header parameters for the data message, and then uses this hash value to identify one or more locations in the store to check for a matching set of header parameters (i.e., for a matching set of data message flow attributes).
[0115] When the process identifies (at 1010) an entry in the stream connection-state data storage device that matches the attributes of the received data message flow (i.e., when the process determines that it has previously processed another data message that is part of the same flow as the received data message), the process directs (at 1015) the received data message to the service node (in the SN group) identified in the matching entry in the connection-state data storage device (i.e., to the service node that the PSN previously identified for processing data messages for this particular data message flow). This service node then performs service on the data message. This service node can be the PSN itself, or it can be an SSN in the SN group. After performing (at 1015) the service on the data message, the SN returns a reply data message (e.g., the processed data message) to the ISS filter that invoked it, and then ends.
[0116] On the other hand, when the process determines (at 1010) that the connection-state data store does not store an entry for the received data message (i.e., determines that it has not previously processed another data message that is part of the same flow as the received data message), the process transitions to 1020. In some embodiments, the connection-state data store periodically removes old entries that have not matched any received data messages for a given duration. Thus, in some embodiments, when the process determines (at 1010) that the connection-state data store does not store an entry for the received data message, the process may have previously identified a service node for the data message flow, but the matching entry may have been removed from the connection-state data store.
[0117] At 1020, the process determines whether the received data message should be processed locally by the PSN, or remotely by another service node of the SN group. To make this determination, in some embodiments, the PSN performs a load balancing operation to identify a service node for the received data message flow based on a set of load balancing parameters maintained by the PSN for the SN group when the data message is received. In some embodiments, the set of load balancing parameters is adjusted (1) based on updated statistics about the traffic load on each service node in the SN group, and (2) based on service nodes added to or removed from the SN group.
[0118] In different embodiments, process 1000 performs different load balancing operations (at 1020). In some embodiments, the load balancing operations rely on L2 parameters of the data message flow (e.g., generating a hash value from the L2 parameters (such as the source MAC address) to identify a hash range that specifies a service node for the generated hash value) to distribute the data message to the service nodes, while in other embodiments, the load balancing operations rely on L3 / L4 parameters of the flow (e.g., generating a hash value from the L3 / L4 parameters (such as the five-tuple header value) to identify a hash range that specifies a service node for the generated hash value) to distribute the data message to the service nodes. In still other embodiments, the load balancing operations (at 1020) use different techniques (e.g., round-robin techniques) to distribute the load among the service nodes.
[0119] When the process determines (at 1020) that the PSN should process the received data message, the process instructs (at 1025) the service module of the PSN to perform the service of the SN group on the received data message. At 1025, the process 1000 also creates an entry in the stream connection-state data storage device to identify the PSN as a service node for processing data messages that are part of the same stream as the received data message. In some embodiments, this entry identifies the PSN and identifies the received data message header value (e.g., a five-tuple value) that specifies the stream of the message. After performing (1025) the service on the data message, the PSN returns a reply data message (e.g., the processed data message) to the ISS filter that invoked it, and then ends.
[0120] When the process determines (at 1020) that the PSN should not process the received data message based on its set of load balancing parameters, the process identifies (at 1020) another service node in the PSN's SN group to service the data message. Thus, in this case, the process directs (at 1030) the message to another service node in the PSN's SN group. To redirect the data message, the PSN uses different techniques in different embodiments, such as MAC redirection (for L2 forwarding), IP destination network address translation (for L3 forwarding), port address translation (for L4 forwarding), L2 / L3 tunneling, etc.
[0121] To perform the MAC redirection, in some embodiments, the process 1000 changes the MAC address to the MAC address of the service node it identified at 1020. For example, in some embodiments, the process changes the MAC address to the MAC address of another SFE port in the port group containing the SFE port connected to the PSN. More specifically, in some embodiments, the service nodes (e.g., SVMs) of the SN group are assigned ports of a port group that can be specified on the same host or different hosts. In some such embodiments, when the PSN wants to redirect a data message to another service node, it replaces the MAC address of the PSN port in the data message with the MAC address of the port of another service node, and then provides this data message to the SFE so that the SFE can forward it directly or indirectly (through other intermediate forwarding elements) to the port of another service node.
[0122] Similarly, in order to redirect a data message to another service node through IP destination network address translation (DNAT), the PSN replaces the destination IP address in the data message with the destination IP address of another service node, and then provides this data message to the SFE so that the SFE can forward it to another service node directly or indirectly (through other intermediate forwarding elements).
[0123] In order to redirect the data message to another service node through port address translation, the PSN replaces the destination port address in the data message with the destination port address of another service node, and then uses this new port address to guide the data message to another service node. In some embodiments, the network address translation of the PSN may include changes to two or more of the MAC address, IP address, and port address.
[0124] After directing (at 1030) the data message to another service node, the process creates (at 1035) an entry in a connection-state data store identifying the other service node as a service node for processing data messages that are part of the same flow as the received data message. In some embodiments, this entry identifies (1) the other service node, and (2) a received data message header value (e.g., a five-tuple value) that specifies the flow of the message. After performing service on the data message, the SSN returns a reply data message (e.g., the processed data message) to the ISS filter that invoked it, and then ends. In some embodiments, the SSN returns the reply data message directly to the ISS filter, while in other embodiments, the SSN returns such a reply data message to the ISS filter via the PSN.
[0125] The inline service switch of some embodiments statefully distributes service load to multiple service nodes based on one or more L4+ parameters. Examples of L4+ parameters include session keys, session cookies (e.g., SSL session identifiers), file names, database server attributes (e.g., usernames), etc. In order to statefully distribute service load among server nodes, in some embodiments, the inline service switch establishes a layer 4 connection session (e.g., a TCP / IP session) with a data-message SCN and a service node, such that the switch (1) can inspect one or more initial payload packets exchanged for the session, and (2) can extract and store the L4+ session parameters for later use in subsequent load balancing operations for its session.
[0126] Fig.11 An example of a multi-host system 1100 of some embodiments is shown, in which an inline service switch 1105 distributes service load to multiple service nodes in a stateful manner based on one or more L4+ parameters. In addition to the inline service switch 1105 of its host 1110 establishing a layer 4 connection session (e.g., TCP / IP session) with its associated VM and service node, the system 1100 and Figure 1 The system 100 is exactly the same.
[0127] With a layer 4 session with its VM and its selected service node, the ISS 1105 (1) may inspect one or more of the initial payload packets exchanged for the session, and (2) may extract and store L4+ session parameters for later use in its subsequent load balancing operations with respect to its VM. After establishing an L4 session with its VM and service node, the ISS filter (1) receives data packets from the session endpoint (i.e., from a VM or service node), (2) extracts the old packet header, (3) inspects the packet payload (i.e., the datagram after the L3 and L4 packet header values) to identify any L4+ session parameters it needs to extract, (4) extracts any needed L4+ session parameters if such a parameter is found, (5) stores any extracted session parameters (e.g., in a connection storage device 1190 on its host 1110), and (6) re-encapsulates the payload with a new packet header before relaying the packet to another session endpoint (i.e., to a service node or VM). In some embodiments, the new and old packet headers are similar except for specifying different TCP sequence numbers, as further described below.
[0128] Fig.12The ISS 1105 is shown extracting and reusing session parameters by establishing an L4 connection session with its VM and a service node 1205 of a service cluster 1250. In this example, the service cluster 1250 includes multiple servers (service nodes) that perform services (e.g., provide access to secure content) over an SSL (Secure Sockets Layer) session. Also, in this example, the session parameters extracted and reused are SSL session cookies.
[0129] Fig.12 A message transmission diagram is given, which shows how the ISS 1105 relays two different sets of SSL packets 1230 and 1235 from its associated VM to the service node 1205. As shown in the figure, in both message transmission flows, the ISS 1105 first establishes a TCP session with the VM by performing a 3-way TCP handshake. After establishing the first TCP session with its VM (for the first set of SSL packets 1230), the ISS 1105 examines the initial set of one or more packets sent by its VM 115 and determines that the VM is requesting an SSL service session. The ISS 1105 then determines that the requested SSL service session is a new session because this request is not accompanied by an SSL session cookie.
[0130] Therefore, ISS 1105 determines that it must select a service node from service cluster 1250 for the requested SSL session, and it must monitor the packets exchanged between the VM and this service node so that it can record the SSL session cookie for this session. In some embodiments, ISS 1105 selects a service node 1205 in the cluster based on a set of load balancing criteria that it considers for service cluster 1250.
[0131] After selecting service node 1205, ISS 1105 performs a 3-way TCP handshake with service node 1205 to establish an L4 connection session with service node 1205. Once this session is established, ISS 1105 begins relaying packets it receives from VM 115 to service node 1205, and relaying packets it receives from service node 1205 to its VM 115. When relaying data packets between VM 115 and service node 1205, in some embodiments, ISS 1105 may adjust the sequence numbers of the relayed data messages to account for the difference in sequence numbers between the VM and the service node. In some embodiments, ISS 1105 sends packets to and receives packets from service node 1205 through a tunnel.
[0132] When relaying one or more response packets from service node 1205 to VM 115, ISS 1105 identifies the SSL session ID generated by service node 1205 in the initial set of packets. This session ID is often referred to as an SSL session ID or cookie. After creating the SSL session ID, an SSL session key is generated, for example, by the VM based on the SSL certificate of the service node. The generation of the SSL session key is computationally intensive.
[0133] When ISS 1105 has established an L4 connection with service node 1205, it may extract the SSL session cookie from an initial set of one or more packets sent by service node 1205. As shown, ISS 1105 stores the SSL session cookie in connection storage 1190. In some embodiments, the connection storage record storing this SSL session cookie also includes the identity of service node 1205 as the service node that generated this cookie. In some embodiments, this record also includes one or more packet header attributes of the current flow (such as the source IP, destination IP, destination port, and protocol of the current flow).
[0134] exist Fig.12 In the example shown in , the VM stops communicating with the service node for a period of time. This communication is then resumed by sending a second set of data packets. Because the VM wants to continue using the same SSL session as before, the VM sends its previously obtained SSL session cookie. However, in this case, it is not unusual for the VM to use a different source port for these new data packets. Due to the different source port, the ISS 1105 initially assumes that the new data packets are for a new flow.
[0135] Therefore, ISS 1105 establishes another TCP session with the VM by performing another 3-way TCP handshake. After establishing this second TCP session with its VM, ISS 1105 examines the initial set of one or more packets sent by its VM 115 and determines that this set of packets includes the SSL session cookie. As shown, ISS 1105 extracts this cookie, compares it to the cookie in its connected storage device 1190, identifies the record storing this cookie (i.e., determines that it has previously stored this cookie), and identifies service node 1205 as the service node for handling the SSL session associated with this request based on this record.
[0136] ISS 1105 then performs another 3-way TCP handshake with service node 1205 to establish another L4 connection session with service node 1205, since it has determined that this service node is the node that should handle the requested SSL session. Once this session is established, ISS 1105 begins relaying packets back and forth between its VM 115 and service node 1205. By extracting and storing the SSL session cookie when the SSL session was initially established, ISS 1105 can appropriately route subsequent data packets from its VM 115 containing the cookie for this session to the same service node 1205. This is very beneficial because it allows the SSL session to be quickly resumed and saves computing resources that would otherwise have to generate another session key.
[0137] As mentioned above, the inline service switch of some embodiments can extract and store different L4+ session parameters for later use in facilitating efficient distribution of service requests from VMs to service nodes in a service node cluster. Other examples include session keys, file names, database server properties (e.g., usernames), etc. Fig.13 An example of a file name as an extracted L4+ session parameter is shown. The file name is the name of a piece of content (eg, image, video, etc.) requested by VM 115 and provided by a server of service cluster 1350.
[0138] exist Fig.13 In the example of , the ISS 1105 of the VM stores the requested file name as part of a first set of content processing messages 1330. As part of these messages, the ISS (1) performs an initial TCP 3-way handshake, (2) receives the VM's initial request, and (3) extracts the file name from the request. In some embodiments, the VM's initial request is in the form of a URL (Uniform Resource Locator), and the ISS 1105 extracts the file name from this URL. The URL often contains the name or abbreviation of the type of content being requested (e.g., contains .mov, .img, .jpg, or other similar naming that is an annotation identifying the name of the requested content). In some embodiments, the ISS stores the extracted file name in a record in its connected storage device 1190 identifying the service node 1305 it selected to process this request. From the servers of the cluster 1350, the ISS identifies the service node 1305 by performing a load balancing operation based on its set of load balancing criteria for processing content requests that it distributes to the cluster 1350.
[0139] Next, ISS 1105 performs a 3-way TCP handshake with service node 1305 to establish an L4 connection session with service node 1305. Once this session is established, ISS 1105 relays the content request to service node 1305. When relaying this request to service node 1305, in some embodiments, ISS 1105 may adjust the sequence numbers of the relayed data packets to account for the difference in sequence numbers between the VM and service node 1305. In some embodiments, ISS 1105 sends packets to and receives packets from service node 1305 through a tunnel.
[0140] ISS 1105 then receives one or more response packets from service node 1305 and relays these packets to VM 115. This set of packets includes the requested content segment. In some embodiments, ISS 1105 creates a record in connection storage 1190 to identify service node 1305 as a server that retrieves the requested content segment only after receiving a response packet from this server.
[0141] In some embodiments, service node 1305 sends its reply packets directly to VM 115. In some of these embodiments, ISS 1105 provides a TCP sequence number offset to the service node so that this node can use this offset to adjust the TCP sequence number it uses in its reply packet in response to the packet from VM 115. In some embodiments, ISS 1105 provides the TCP sequence number offset in the encapsulation tunnel packet header of the tunnel used to relay packets from the ISS to service node 1305. Moreover, in some embodiments, inline service switch 1105 is configured to establish an L4 connection session for its associated VM, or is part of a filter architecture configured to establish an L4 connection session for its associated VM. In these embodiments, in order to inspect the L4 parameters sent by the VM, ISS 1105 will not need to establish an L4 connection session with its VM.
[0142] Some time after its initial request for the content fragment, VM 115 begins a second set of content processing messages 1335 by requesting the same content fragment. In this case, it is not unusual for the VM to use different source ports for these new data packets. Due to the different source ports, ISS 1105 initially assumes that the new data packets are for new flows. Therefore, ISS 1105 establishes another TCP session with its VM by performing a 3-way TCP handshake. After establishing this second TCP session with its VM, ISS 1105 examines the initial set of one or more packets sent by its VM 115 and determines that this set of packets includes a content request. Then, ISS 1105 extracts the file name from the URL of this request, compares this file name with the file name stored in its connection storage device 1190, and determines that it has previously processed a request for this content fragment by using service node 1305.
[0143] Thus, ISS 1105 performs another 3-way TCP handshake with service node 1305 to establish another L4 connection session with service node 1305. Once this session is established, ISS 1105 relays the content request to this service node and after getting the response data packets, relays them to its VM.
[0144] This approach is very beneficial because it saves the service cluster's resources from having to obtain the same content segment twice. In other words, going to the same service node is efficient because the service node 1305 is likely to still have the requested content in its cache or memory. This approach is also beneficial when multiple ISSs 1105 on the same host share the same attached storage device because it allows one ISS of one VM to go to the same service node as the ISS of another VM when two VMs request the same content segment within a specific time period.
[0145] Fig.14 A process 1400 is shown that the ISS 1105 of VM 159 performs to process a service request from an associated VM in a sticky manner. In performing this process, the ISS 1105 (1) determines whether the request is associated with a service request previously processed by a service node of the service-node cluster, and (2) if so, directs the service request to the previously used service node. The ISS 1105 determines whether the request is associated with a previously processed request by checking the L4+ session parameters it has stored in its connection storage 1901 for the previous request.
[0146] Process 1400 begins when ISS 1105 receives a data message sent by its associated VM. In some embodiments, ISS 1105 is deployed in the egress data path of the VM so that it can intercept data messages sent by its VM. In some embodiments, ISS 1105 is invoked by the VNIC of the VM or an SFE port that is communicatively connected to the VNIC of the VM. In some embodiments, the received data message is addressed to a destination address (e.g., a destination IP or virtual IP address) associated with a service node cluster. Based on this addressing, the ISS determines (at 1405) that the data message is a request for a service performed by a service node of the cluster.
[0147] At 1410, the process determines whether the data message is part of a data message stream for which the process has already processed other data messages. In some embodiments, the process makes this determination by checking its connection storage device 1190, where the connection storage device 1190 stores records of the data message streams it has recently processed, as further described below with reference to 1445. Each record stores one or more service parameters that the process previously extracted from a previous data message it processed. Examples of such session parameters include session cookies, session keys, file names, database server properties (e.g., usernames), and the like. Each record also identifies the service node of the data message that was previously processed as part of the same stream. In some embodiments, this record also stores an identifier of the stream (e.g., a five-tuple identifier). In addition, in some embodiments, the connection storage device is hash-addressable (e.g., a location in the connection storage device is identified based on a hash of the stream identifier).
[0148] When the process determines (at 1410) that it has previously processed a data message from the same stream as the received data message, it transitions to 1415. At 1415, the process retrieves from connection storage 1190 the identity of the service node that was used to process the previous data message of the same stream, and forwards the received data message to the identified service node for processing. In some cases, at 1415, the process also (1) retrieves from connection storage 1190 previously stored session parameter(s) for the stream of the data message (e.g., a session cookie), and (2) forwards the retrieved parameter(s) to the identified service node so that the node can use the parameter(s) to process the forwarded data message. In some embodiments, rather than forwarding the retrieved service parameter(s) to the service node, process 1400 performs an operation on the received data message using the retrieved service parameter(s) before forwarding the data message to the identified service node. Also, in some embodiments, the process provides additional context information (e.g., tenant ID, network ID, etc.) that cannot be encoded in the tunnel key. After 1415, process 1400 ends.
[0149] When the process determines (at 1410) that it has not previously processed a data message from the same data message flow, the process establishes (at 1420) an L4 session with the VM (e.g., by performing a three-way TCP handshake with the VM). After establishing the L4 session with its VM, the process determines (at 1425) whether an initial set of one or more packets sent by its VM contains one or more L4 service parameters that the process can use to determine whether it has previously processed a similar service request. Again, examples of such session parameters include session cookies, session keys, file names, database server properties (e.g., usernames), and the like.
[0150] When the set of packets includes one or more such L4 service parameters, the process determines (at 1420) whether the connection storage device 1190 contains a record for the identified (one or more) L4 service parameters. If so, the process transitions to 1415 to forward the data message to the recorded identified service node. In some embodiments, process 1400 also performs other operations at 1415, as described above. Process 1400 may transition to 1415 from 1410 or 1420 because the process may determine that the same session record is applicable based on outer packet header values (e.g., L2, L3, and L4 values) of one message flow or based on inner packet values (e.g., L4+ parameters) of another message flow. The inner packet values may match the session record when the VM uses a different source port for a service session that follows an earlier related service session, as described above with reference to FIG. Fig.12The same result occurs when the VM requests the same file and the file name is used to identify the same service node, as described above in reference Fig.13 as described.
[0151] When process 1400 determines that the inspected group does not include an L4+ service parameter for which a connection storage device stores a record identifying a service node as a service node for processing a service request for the VM, the process uses (at 1430) a load balancer of the ISS to select a service node in a cluster of service nodes to process the service request from the VM. To select a service node in a load-balanced manner, process 1400 uses a service rule that matches the received message flow attributes. The service rule specifies a set of service nodes, and a set of load balancing criteria (e.g., weight values) for each specified service node of the rule. In some embodiments, different service rules specify different sets of service actions that must be performed, and the load balancing criteria for each service action of the rule specifies criteria for distributing data messages between service nodes for that action.
[0152] After selecting (at 1430) a service node for the data message, the process establishes (at 1435) an L4 session with the service node (e.g., via a three-way TCP handshake with the service node) as it soft-terminates the session with the VM. Next, at 1440, the process forwards the data message it receives from the VM to the selected service node using this connection session.
[0153] Through this connection, the process also receives response data messages from the selected service node and forwards these received data messages to the VM through its connection session with the VM. When relaying data messages back and forth, as described above, in some embodiments, the process adjusts the TCP sequence numbers of the data messages. In some embodiments, the process exchanges messages with the selected service node through a tunnel. Therefore, in these embodiments, the process encapsulates the data messages it relays to the service node with a tunnel header and removes this tunnel header from the data messages it passes from the service node to the VM. When the process 1400 relays data messages to the service node, in some embodiments, it updates the statistics it maintains in the ISS STAT storage device to track the data messages it directs to different service nodes.
[0154] At 1445, the process stores in connection storage 1190 one or more L4+ parameters that it extracted from the data message relayed between the VM and the selected service node. In some embodiments, as mentioned above, the process stores in a record a set of L4+ parameters that identify the selected service node. By storing the identity of the selected service node for the extracted set of L4+ parameters, the process can later reuse the selected service node to process data messages associated with the same set of L4+ parameters. In some embodiments, the record created at 1445 also stores the flow identifier of the data message received at 1405, so that this record can also be identified based on the outer packet header attributes of the flow. After 1445, the process ends.
[0155] References Figure 12-14 The inline service switch of the described embodiments selects a service node in a service node cluster and relays the data message to the selected service node. However, as described above, the inline service switch of some embodiments selects a service node cluster in a group of service node clusters and forwards the data message to the selected cluster. It will be appreciated by those of ordinary skill that the inline service switch of some embodiments implements sticky service request processing by forwarding data messages to service clusters (performing the same service) in a sticky manner. In other words, the inline switch of these embodiments stores L4+ session parameters that allow this switch to forward the same or similar service session requests to the same service node cluster in the group of clusters that perform the same service.
[0156] Fig.15 A more detailed architecture of a host 1500 executing an ISS filter of some embodiments of the present invention is shown. As shown, the host 1500 executes multiple VMs 1505, SFEs 1510, multiple ISS filters 1530, multiple load balancers 1515, proxies 1520, and publishers 1522. Each ISS filter has an associated ISS rule store 1550, a statistics (STAT) data store 1554, and a connection-state store 1590. The host also has an aggregate (global) statistics data store 1586.
[0157] In some embodiments, the VM executes on top of a hypervisor, which is a software layer that enables virtualization of the shared hardware resources of the host. In some of these embodiments, the hypervisor provides an ISS filter to support inline services switching services to their VMs.
[0158] SFE 1510 is executed on the host to communicatively couple the VMs of the host to each other and to other devices external to the host (e.g., other VMs on other hosts) through one or more forwarding elements (e.g., switches and / or routers) operating external to the host. As shown, SFE 1510 includes a port 1532 connected to a physical network interface card (not shown) of the host, and a port 1535 connected to each VNIC 1525 of each VM.
[0159] In some embodiments, a VNIC is a software abstraction of a physical network interface card (PNIC) implemented by virtualization software (e.g., by a hypervisor). Each VNIC is responsible for exchanging data messages between its VM and SFE 1510 through its corresponding SFE port. As shown, the ingress data path for the VM to use for its data messages includes SFE port 1532, SFE 1510, SFE port 1535, and the VM's VNIC 1525. The egress data path for the VM to use for its data messages involves the same components, but in the opposite direction, specifically from VNIC 1525 to port 1535, to SFE 1510, and then to port 1532.
[0160] Through its port 1532 and NIC driver (not shown), SFE 1510 is connected to the host's PNTC to send outgoing packets and receive incoming packets. SFE 1510 performs message processing operations to forward the message it receives on one of its ports to its other port. For example, in some embodiments, the SFE attempts to match the message to a flow-based rule using a header value in a VM data message, and when a match is found, performs the action specified by the matched rule (e.g., to pass the packet to one of its ports 1532 or 1535, which indicates that the packet is provided to the destination VM or PNIC). In some embodiments, the SFE extracts a virtual network identifier (VNI) and a MAC address from the data message. The SFE in these embodiments uses the extracted VNI to identify a logical port group, and then uses the MAC address to identify a port within the port group. In some embodiments, SFE 1510 is a software switch, while in other embodiments, it is a software router or a combined software switch / router.
[0161] In some embodiments, SFE 1510 implements one or more logical forwarding elements (e.g., a logical switch or a logical router), where the SFE is executed on other hosts in a multi-host environment. In some embodiments, the logical forwarding elements can span multiple hosts to connect VMs that are executed on different hosts but belong to one logical network. In other words, different logical forwarding elements can be defined to specify different logical networks for different users, and each logical forwarding element can be defined by multiple SFEs on multiple hosts. Each logical forwarding element isolates the traffic of a VM of one logical network from the VM of another logical network served by another logical forwarding element. Logical forwarding elements can connect VMs that are executed on the same host and / or different hosts.
[0162] In some embodiments, SFE port 1535 includes one or more function calls to one or more modules that implement specific input / output (I / O) operations on incoming and outgoing packets received at the port. One of these function calls to the port is to ISS filter 1530. In some embodiments, the ISS filter performs service switch operations on outgoing data messages from the filter's VM. Fig.15 In the embodiment shown in , each port 1535 has its own ISS filter 1530. In other embodiments, some or all of the ports 1535 share the same ISS filter 1530 (e.g., all ports on the same host share one ISS filter, or all ports on a host that are part of the same logical network share one ISS filter).
[0163] Examples of other I / O operations implemented through function calls on port 1535 include firewall operations, encryption operations, etc. In some embodiments, by implementing a stack of such function calls, the port can implement a chain of I / O operations on incoming and / or outgoing messages. Fig.15 In the example shown in , the ISS filter is called from port 1535 for data messages sent by the VM. Other embodiments call the ISS filter from the VM's VNIC or from port 1532 of the SFE for data messages sent by the VM, or call this filter from the VM's VNIC 1525, port 1535, or port 1532 for data messages received for the VM (i.e., deployment service operation calls along the VM's ingress path).
[0164] For data messages sent by its associated VM, ISS filter 1530 enforces one or more service rules stored in ISS rule storage 1550. These service rules implement one or more service policies. Based on the service rules, ISS filter (1) determines whether the sent data message should be processed by one or more service nodes or clusters, (2) if so, selects a service node or cluster for processing the data message, and forwards the data message to the selected node or cluster (e.g., via a tunnel).
[0165] In some embodiments, each service rule in service rule storage 1550 has (1) a set of associated data message identifiers (e.g., packet header values), (2) a set of one or more actions, (3) for each action, a set of service nodes or service node clusters that perform the action, and (4) for each action, a set of load balancing criteria for selecting a service node or cluster from the set of service nodes or service node clusters in the rule. As further described below, in some embodiments, a rule can identify a service node or cluster by providing an identifier for a tunnel (e.g., from a host, or SFE or ISS filter) connected to the service node or cluster.
[0166] After being called to process a data message, in some embodiments, the ISS filter 1530 determines whether the identifier (e.g., 5-tuple) of the received data message matches the data message identifier of a service rule in its service rule storage device. When the header value of the received data message does not match the rule matching identifier of one or more service rules in the service rule storage device, the ISS filter 1530 notifies the port 1535 that it has completed processing the data message without performing any service on the data message. The ISS filter also stores a record of this decision in its connection storage device 1590. This record identifies the data message flow identifier (e.g., its 5-tuple identifier) and identifies that no service action needs to be performed for this data message flow. This record can be used for fast processing of subsequent data messages of the same flow.
[0167] When the header value of the data message matches the service rule, the ISS filter executes the action set specified by the matched service rule. When the action set includes more than one operation, the ISS filter executes the service actions sequentially. In some embodiments, the service action of the matched service rule is executed by the service node of the SN group or the SN cluster of the SN cluster group. Thus, in order to execute such a service action, the ISS filter selects a service node or cluster for processing the data message and forwards the data message to the selected node or cluster.
[0168] In some embodiments, the ISS filter 1530 forwards data messages to selected nodes or clusters through a tunnel. In other embodiments, the ISS filter 1530 is connected to some service nodes / clusters through a tunnel, but is not connected to other service nodes / clusters using a tunnel. For example, in some embodiments, the ISS filter 1530 may use L3 or L4 destination network address translation (DNAT) or MAC redirection to forward data messages to some service nodes. Moreover, in some embodiments, one or more service nodes may be executed on the same host computer 1500 as the ISS filter 1530, and in these embodiments, the ISS filter 1530 guides data messages to these service nodes through DNAT, MAC redirection, or some other forwarding mechanism that is part of the filter framework of some embodiments. In some embodiments, the service rules have identifiers that specify different redirection mechanisms, because one rule can, or different rules can, identify different service nodes or SN clusters accessible through different redirection mechanisms.
[0169] When the ISS filter 1530 uses a tunnel to send a data message to a service node or cluster, in some embodiments, the ISS filter uses a tunnel packet header to encapsulate the data message. In some embodiments, this packet header includes a tunnel key. In other embodiments, the ISS filter 1530 has another I / O chain filter that encapsulates the data message using a tunnel packet header.
[0170] In some embodiments, the ISS filter 1530 must establish an L4 connection session with the service node. In some embodiments, the ISS filter must also establish an L4 connection session with its VM. To establish the L4 connection session, in some embodiments, the ISS filter performs a three-way TCP / IP handshake with the other end of the connection (e.g., with the service node or VM).
[0171] As mentioned above, in some embodiments, a matching service rule specifies a set of load balancing criteria for each set of service nodes or clusters that perform the service action specified by the rule. In these embodiments, the ISS filter 1530 causes its associated load balancer 1550 to use the specified load balancing criteria of the rule to select a service node from a specified SN group or a service cluster from a specified SN cluster group.
[0172] The load balancer distributes the data message load for performing the service action to the service node or SN cluster specified by the load balancing criterion in a load balancing manner. In some embodiments, the load balancing criterion is a weight value associated with the service node or SN cluster. An example of distributing a new data message flow to the service node in a load balancing manner using a weight value is described above.
[0173] In some embodiments, the weight values are generated and adjusted by the agent 1520 and / or controller set based on load statistics. In some embodiments, each ISS filter 1530 has its own load balancer 1515, while in other embodiments, multiple ISS filters 1530 share the same load balancer 1525 (e.g., ISS filters for VMs that are part of a logical network use one load balancer 1515 on each host).
[0174] ISS filter 1530 stores data records in connection state storage 1590 that maintain connection states for data message flows that ISS filter 1530 has previously processed. This connection state allows ISS filter 1530 to statefully distribute data messages that are part of the same flow to the same content server. In some embodiments, each record in the connection storage corresponds to a data message flow that ISS filter 1530 has previously processed.
[0175] Each record stores a description of a set of service rules that must be applied to the data messages of the flow, or has a reference (e.g., a pointer) to such a description. In some embodiments, when the operation of the service rule set requires that the data message be discarded, the connection-storage device record also specifies this action, or specifies this action in place of the service rule description. Moreover, when no service needs to be performed on the data messages of this flow, in some embodiments, the connection-storage device record indicates that the ISS should allow the received data message to pass along the VM's egress data path. In some embodiments, this record stores an identifier of the flow (e.g., a five-tuple identifier). In addition, in some embodiments, the connection storage device is hash-addressable (e.g., the location in the connection storage device is identified based on a hash of the flow identifier). When the ISS filter 1530 stores L4+ session parameters, in some of these embodiments, the ISS filter 1530 stores this parameter in the connection state storage device 1590.
[0176] In some embodiments, each time the ISS filter directs a message to a service node or SN cluster, the ISS filter updates the statistics it maintains in its STAT data storage 1554 for the amount of data traffic it relays to the service node and / or cluster. Examples of such statistics include the number of data messages (e.g., number of packets), data message flows, and / or data message bytes relayed to each service node or cluster. In some embodiments, the metrics may be normalized to a unit of time, e.g., per second, per minute, etc.
[0177] In some embodiments, the agents 1520 collect (e.g., periodically gather) statistics stored by the ISS filter in the STAT data storage device 1554 and relay these statistics to the controller set. Based on the statistics collected by the controller set from the various agents 1520 of the various hosts, the controller set (1) distributes the aggregated statistics to the agents 1520 of each host so that each agent can define and / or adjust load balancing criteria for the load balancer on its host, and / or (2) analyzes the aggregated statistics to specify and distribute some or all of the load balancing criteria to the hosts. In some embodiments where the controller set generates the load balancing criteria based on the aggregated statistics, the controller set distributes the generated load balancing criteria to the agents 1520 of the hosts.
[0178] In embodiments where the agent 1520 receives new load balancing criteria or new ISS rules from a set of controllers, the agent 1520 stores these criteria or new rules in a host-level rule store 1588 for propagation to the ISS rule store 1550. In embodiments where the agent 1520 receives aggregated statistics from a set of controllers, the agent 1520 stores the aggregated statistics in a global statistics store 1586. In some embodiments, the agent 1520 analyzes the aggregated statistics in this store 1586 to define and / or adjust load balancing criteria (e.g., weight values), which are then stored in the rule store 1588 for propagation to the ISS rule store 1550. The publisher 1522 retrieves each service rule and / or updated load balancing criteria stored by the agent 1520 in the rule store 1588, and stores the retrieved rule or criteria in the ISS rule store 1550 for each ISS filter that needs to enforce the rule or criteria.
[0179] The agent 1520 not only propagates service rule updates based on newly received aggregated statistics, but also propagates service rules or updates service rules based on updates to the SN group or cluster group it receives from the controller set. Again, the agent 1520 stores such updated rules in the rule data storage device 1588, from where the publisher propagates them to the ISS rule storage device 1550 of the ISS filters 1530 that need to enforce these rules. In some embodiments, the controller set provides the ISS agent 1520 with high-level service policies that the ISS agent converts into service rules for the ISS filters to implement. In some embodiments, the agent 1520 communicates with the controller set through an out-of-band control channel.
[0180] Some embodiments provide a controller-driven method for reconfiguring an application or service layer deployment in a data center. In some embodiments, a controller set 120 provides parameters for establishing a plurality of tunnels for a host computer, each tunnel being between a host computer and a service node that may be in the same data center as the host computer or may be in a different location from the data center. In some embodiments, the tunnel establishment parameters provided include tunnel header packet parameters. In some embodiments, these parameters also include tunnel keys, while in other embodiments, these parameters include parameters for generating tunnel keys. In some embodiments, tunnel keys are used to allow multiple different data message streams to use a tunnel from a host to a service node. In some embodiments, establishing a tunnel requires configuring a module at a tunnel endpoint using supplied tunnel parameters (e.g., tunnel header parameters, tunnel keys, etc.).
[0181] In some embodiments, the tunnel connects the host computer to several service nodes of one or more service providers operating in the same data center or outside the data center. In some deployments, only one tunnel is established between each host and service node, and all ISS filters on the host use the same tunnel to relay data messages to the service node. This can reduce the number of tunnels. This approach can be viewed as establishing a tunnel between the SFE of the host and the service node. In other deployments, more than one tunnel is established between the host and the service node. For example, in some deployments, a tunnel is established between each ISS filter and the service node on the host.
[0182] In some embodiments, the controller set 120 defines data message distribution rules for the SCNs in the data center and pushes these rules to the ISS filters of the SCNs. The ISS filters then distribute the data messages to the DCNs identified by the distribution rules as data computing nodes (DCNs) for the data messages. In other embodiments, the controller set 120 defines data message distribution policies for the SCNs in the data center and pushes these policies to the hosts that execute the SCNs. The hosts then generate distribution rules from these policies and then configure their ISS filters based on these policies.
[0183] In some embodiments, a distribution rule includes (1) a rule identifier for identifying a data message flow that matches the rule, and (2) a set of service actions for the data message flow that matches the rule. In some embodiments, the rule identifier can be defined according to a group identifier (such as a virtual IP address (VIP)) assigned by an application-level gateway or a metadata tag.
[0184] In some embodiments, each service action of a rule is defined by reference to an identifier identifying a set of service nodes for performing the service action. Some rules may specify two or more service actions to be performed by two or more sets of service nodes of two or more service providers. In some embodiments, each service-node set is a service node cluster, and the rule is defined by reference to a set of tunnel identifiers identifying (1) a tunnel to the service node cluster or (2) a tunnel to each service node in the service-node cluster.
[0185] For each service action, the distribution rule also includes a set of selection criteria for each set of service actions of the rule. In some embodiments, the set of selection criteria includes one or more criteria that are dynamically evaluated (e.g., based on the identity of the SCN executing on the host, etc.). In some embodiments, the set of selection criteria is a set of load balancing criteria that specifies criteria for distributing new data message flows between service nodes executing service actions.
[0186] This controller-driven approach can seamlessly reconfigure application or service layer deployments in a data center without having to configure the SCN to use new group addresses or labels (e.g., new VIPs). The controller set only needs to provide new distribution rules to the inline switches that specify new traffic distribution patterns based on previously configured group addresses or labels. In some embodiments, seamless reconfiguration can be based on any packet header parameters (e.g., L2, L3, L4, or L7 parameters) used by the SCN. In other words, in some cases, these packet header parameters do not necessarily include group addresses or labels.
[0187] As mentioned above, in some embodiments, the inline switches can be configured to distribute data messages based on metadata tags associated with the packets and injected into the packets (e.g., as L7 parameters) by an application-level gateway (ALG). For example, since the ALG is configured to inspect and tag packets as they enter a network domain (e.g., a logical domain), in some embodiments, the controller set is configured to push new distribution policies and / or rules to the inline switches that configure these switches to implement new application or service layer deployments in the network domain.
[0188] Now refer to Figure 16-19 A controller-driven method of some embodiments is described. Fig.16An example is shown of a controller reconfiguring an application tier deployment to insert a firewall service operation between a set of web servers 1605 and a set of application servers 1610. This diagram shows a data center implementing a three-server tier deployment, where a first tier includes one or more web servers 1605, a second tier includes one or more application servers 1610, and a third tier includes one or more database servers 1615.
[0189] As shown, controller 1620 initially configures inline switch 1630 of web server 1610 with message distribution rules that instruct the switch to forward received packet flows having a particular VIP (VIP1) as its destination IP address to an application server. Fig.16 An example of this rule 1650 is shown. As shown, this rule specifies VIP1 as a flow matching attribute, AS (application server) type as the action type to be performed, and IP address set 1 as the set of IP addresses of application servers 1610.
[0190] Some time after the inline switches 1630 are initially configured, the controller 1620 reconfigures the switches 1630 with new packet distribution rules 1655 that instruct the switches to (1) first forward such packet flows (i.e., packet flows having VIP1 as their destination IP addresses) to the set of firewall servers 1625, and then (2) if the firewall server does not instruct the web server to discard the packet flows, forward packets of this packet flow to the application server 1610. As shown in the figure, each rule 1655 specifies (1) VIP1 as a flow matching attribute, (2) FW (firewall) type as the type of the first action, (3) IP address set 2 as the set of IP addresses of the firewall servers 1625, (4) AS (application server) type as the type of the second action, and (5) IP address set 1 as the set of IP addresses of the application servers 1610.
[0191] In some embodiments, the new packet distribution rule provided by controller 1620 to network server switch 1630 specifies a service policy chain for flows with a destination IP of VIP1 that (1) first identifies a firewall action and then (2) identifies an application-level action. This new rule will replace the previous rule that only specified an application-level action for flows with a destination IP of VIP1.
[0192] In some embodiments, for each operation specified by the rule, the rule includes or references (1) an identifier (e.g., IP address, tunnel identifier, etc.) of a set of servers that perform that operation, and (2) a load balancing criterion for distributing different flows to different servers in the set. When directing data messages to firewalls 1625, the inline switch performs a load balancing operation based on the load balancing criterion to spread the packet flow load among firewalls 1625. In some embodiments, controller 1620 configures inline switch 1630 with multiple different rules for multiple different VIPs associated with multiple different service policy sets.
[0193] exist Fig.16 In the example, the controller reconfigures web server 1605 (1) to direct the packet flow having VIP1 as the destination IP address to the firewall server, and then, after receiving an evaluation from the firewall server as to whether the packet flow should not be dropped, (2) forwards the packets for this flow to the application server. Fig.17 It is shown that in other embodiments, the controller 1720 (1) reconfigures the inline switch 1730 of the web server 1705 to forward all packets having a destination IP address VIP1 to the firewall server 1725, and (2) configures the firewall server 1725 so that if the firewall server 1725 determines that the packets should not be discarded, then this method forwards the packets directly to the application server 1710.
[0194] As shown, controller 1720 initially configures the inline switch using rule 1650 described above. The controller then reconfigures the inline switch using rule 1755, where rule 1755 specifies (1) VIP1 as the flow matching attribute, (2) FW (firewall) type as the action type, and (3) IP address set 2 as the IP address set of firewall server 1725. Fig.17 In the example of , the controller then configures the firewall server 1725 to forward any passing packets directly to the application server 1710. In some of these embodiments, the controller configures the firewall server by configuring an inline switch placed in the egress path of the firewall server to forward the firewall-processed packets to the application server 1710.
[0195] Fig.18A process 1800 is shown that the controller 1620 performs to define a service policy rule for an inline switch of a VM provisioned on a host. As shown, the process 1800 initially identifies (at 1805) a new inline switch to be configured. Next, at 1810, the process selects a virtual identifier (e.g., VIP, virtual address, etc.) that can be used to identify a DCN group or security policy / rule in a packet flow that the inline switch can receive.
[0196] At 1815, the process 1800 identifies a service policy set associated with the selected virtual identifier. The service policy set specifies one or more service actions that need to be performed on the packet flow associated with the selected virtual identifier. The process then defines (at 1820) service rules for the identified service policy set. For each service action in the service policy set, the service rule specifies a set of service nodes or service node clusters that perform the service action.
[0197] At 1825, the process then selects a service action from the identified set of service policies. Next, at 1830, the process generates and stores in the established rules (i.e., the rules defined at 1820) load balancing criteria for the set of service nodes or service-node clusters that execute the selected service action. The process generates the load balancing criteria based on the membership of the set of service nodes or service-node clusters, and statistical information about the packet flow load collected by the controller on the set of service-nodes or service clusters from the inline switches.
[0198] At 1835, the process determines whether it has examined all service actions in the identified service policy set. If not, the process selects (at 1840) another service action in the identified service policy set and then transitions back to 1830 to generate and store load balancing criteria for a set of service nodes or service-node clusters that execute the selected service action. When the process determines that it has examined all service actions in the identified service policy set, the process determines (at 1845) whether it has processed all virtual identifiers that can be used to identify DCN groups or security policies / rules in packet flows that the inline switch can receive.
[0199] If not, the process selects (at 1850) another virtual identifier that can be used to identify a DCN group or security policy / rule in a packet stream that the inline switch can receive. After 1850, the process returns to 1815 to repeat operations 1815-1850 for the selected virtual identifier. When the process determines (at 1845) that it has checked all virtual identifiers for the inline switch, the process ends.
[0200] In process 1800, a service policy set is associated with a virtual identifier that can be used in a packet flow that can be received by an inline switch. In other embodiments, the controller can define a service rule for a service policy set associated with a set of two or more virtual identifiers (e.g., a VIP and an L7 tag) or with a virtual identifier and one or more other packet header values (e.g., a source IP address, a source port address, etc.). More generally, in some embodiments, the controller can define a service rule that defines one or more service actions that implement a service policy set, and can associate this service rule with any arbitrary combination of physical and / or virtual packet header values.
[0201] In this way, in some embodiments, the controller can seamlessly reconfigure the application or service layer deployment in the data center without having to configure the SCN to use a new DCN group address (e.g., a new VIP). The controller only needs to provide new distribution rules to the inline switches that specify new traffic distribution patterns based on the previously configured DCN group address and / or based on any arbitrary packet header parameters used by the SCN (e.g., L2, L3, L4, or L7 parameters).
[0202] Fig.19 A process 1900 for modifying a service rule and reconfiguring an inline service switch that implements the service rule is shown. In some embodiments, the process is performed by each controller in a set of one or more controllers. As shown, the process 1900 begins (at 1905) when it receives a modification to a service policy set for which a set of controllers has previously generated a service rule and distributed the service rule to a set of one or more online switches that implement the service policy set. The received modification may involve the removal of one or more service actions from the service policy set or the addition of one or more service actions to the service policy set. Alternatively or in combination, the received modification may involve the reordering of one or more service actions in the service policy set.
[0203] Next, at 1910, process 1900 changes the service action chain in the service rule to take into account the received modification. This change can insert one or more service actions in the rule's action chain, remove one or more service actions from the rule's action chain, or reorder one or more service actions in the rule's action chain. In some embodiments, the service rule specifies the service action chain by specifying (1) two or more service action types and (2) for each service action type, specifying a set of IP addresses that identify a set of service nodes or service-node clusters that execute the service action type. In some embodiments, each service rule also specifies a set of load balancing criteria for each set of IP addresses for each action type.
[0204] For each new service action in the service action chain, the process 1900 then defines (at 1915) a set of load balancing criteria (e.g., a set of weight values for a weighted round-robin load balancing scheme). In some embodiments, the process generates the set of load balancing criteria based on (1) the membership of a set of service nodes or service-node clusters that execute the service action, and (2) statistical information collected by the controller from the inline switches about the packet flow load of the set of service-nodes or service-clusters.
[0205] Finally, at 1920, the process distributes the modified service rule to hosts executing inline service switches that process the service rule. These are inline service switches that may encounter packets associated with the modified service rule. After 1920, the process ends.
[0206] Many of the above features and applications are implemented as software processes designated as sets of instructions recorded on a computer-readable storage medium (also referred to as a computer-readable medium). When these instructions are executed by one or more processing units (e.g., one or more processors, processor cores, or other processing units), they cause the (one or more) processing units to perform the actions indicated in the instructions. Examples of computer-readable media include, but are not limited to, CD-ROMs, flash drives, RAM chips, hard drives, EPROMs, etc. Computer-readable media do not include carrier waves and electronic signals transmitted wirelessly or via wired connections.
[0207] In this specification, the term "software" is intended to include firmware residing in a read-only memory or an application stored in a magnetic storage device, which can be read into a memory for processing by a processor. Moreover, in some embodiments, multiple software inventions can be implemented as sub-parts of a larger program while retaining different software inventions. In some embodiments, multiple software inventions can also be implemented as separate programs. Finally, any combination of separate programs that implement the software inventions described herein together is within the scope of the present invention. In some embodiments, when installed to operate on one or more electronic systems, the software program defines one or more specific machine implementations that run and execute the operations of the software program.
[0208] Fig. 20The electronic system 2000 that is used to implement some embodiments of the present invention is conceptually shown. The electronic system 2000 can be used to perform any of the above-mentioned control, virtualization or operating system applications. The electronic system 2000 can be a computer (e.g., a desktop computer, a personal computer, a tablet computer, a server computer, a host, a blade computer, etc.), a phone, a PDA, or any other type of electronic device. Such an electronic system includes various types of computer-readable media and interfaces for various other types of computer-readable media. The electronic system 2000 includes a bus 2005, (one or more) processing units 2010, a system memory 2025, a read-only memory 2030, a permanent storage device 2035, an input device 2040, and an output device 2045.
[0209] Bus 2005 collectively represents all system, peripheral, and chipset buses that communicatively connect the various internal devices of electronic system 2800. For example, bus 2005 communicatively connects processing unit(s) 2010 with read-only memory 2030, system memory 2025, and permanent storage 2035.
[0210] From these various memory units, the processing unit(s) 2010 retrieve instructions to execute and data to process in order to perform the processes of the present invention. In different embodiments, the processing unit(s) may be a single processor or a multi-core processor.
[0211] Read-only memory (ROM) 2030 stores static data and instructions required by (one or more) processing units 2010 and other modules of the electronic system. On the other hand, permanent storage 2035 is a read-write memory device. Such a device is a non-volatile memory unit that stores instructions and data even when the electronic system 2000 is turned off. Some embodiments of the present invention use a mass storage device (such as a magnetic or optical disk and its corresponding disk drive) as permanent storage 2035.
[0212] Other embodiments use removable storage devices (such as floppy disks, flash drives, etc.) as permanent storage devices. Like permanent storage device 2035, system memory 2025 is a read-write storage device. However, unlike storage device 2035, system memory is a volatile read-write memory, such as random access memory. System memory stores some instructions and data that the processor needs at run time. In some embodiments, the processes of the present invention are stored in system memory 2025, permanent storage device 2035, and / or read-only memory 2030. From these various memory units, (one or more) processing units 2010 retrieve instructions to be executed and data to be processed in order to perform the processes of some embodiments.
[0213] The bus 2005 is also connected to input and output devices 2040 and 2045. Input devices enable a user to transmit information and select commands to the electronic system. Input devices 2040 include an alphanumeric keyboard and a pointing device (also referred to as a "cursor control device"). Output devices 2045 display images generated by the electronic system. Output devices include printers and display devices, such as cathode ray tubes (CRTs) or liquid crystal displays (LCDs). Some embodiments include devices such as touch screens that act as both input devices and output devices.
[0214] Finally, if Fig. 20 As shown in FIG. 2 , bus 2005 also couples electronic system 2000 to a network 2065 via a network adapter (not shown). In this manner, the computer may be part of a network of computers, such as a local area network ("LAN"), a wide area network ("WAN"), or an intranet, or part of a network of networks, such as the Internet. Any or all of the components of electronic system 2000 may be used in conjunction with the present invention.
[0215] Some embodiments include electronic components such as microprocessors, storage devices, and memories that store computer program instructions in machine-readable or computer-readable media (alternatively referred to as computer-readable storage media, machine-readable media, or machine-readable storage media). Some examples of such computer-readable media include RAM, ROM, compact disk-read only (CD-ROM), compact disk-recordable (CD-R), compact disk-rewritable (CD-RW), digital versatile disk-read only (e.g., DVD-ROM, dual-layer DVD-ROM), various recordable / rewritable DVDs (e.g., DVD-RAM, DVD-RW, DVD+RW, etc.), flash memory (e.g., SD card, mini SD card, micro SD card, etc.), magnetic and / or solid-state hard drives, read-only and recordable A computer readable medium may store a computer program executable by at least one processing unit and include sets of instructions for performing various operations. Examples of computer programs or computer code include machine code such as produced by a compiler, and files including higher level code executed by a computer, electronic component, or microprocessor using an interpreter.
[0216] Although the above discussion mainly refers to a microprocessor or multi-core processor executing software, some embodiments are performed by one or more integrated circuits, such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA). In some embodiments, such an integrated circuit executes instructions stored on the circuit itself.
[0217] As used in this specification, the terms "computer," "server," "processor," and "memory" all refer to electronic or other technical devices. These terms do not include people or groups of people. For the purposes of this specification, the term "display" refers to displaying on an electronic device. As used in this specification, the terms "computer-readable medium" and "machine-readable medium" are completely limited to tangible physical objects that store information in a computer-readable form. These terms exclude any wireless signals, wired download signals, and any other transient signals.
[0218] Although the present invention has been described with reference to numerous specific details, one of ordinary skill in the art will recognize that the present invention may be embodied in other specific forms without departing from the spirit of the present invention. For example, in several of the above embodiments, the inline switch intercepts data messages along the egress data path of the SCN. However, in other embodiments, the inline switch intercepts data messages along the ingress data path of the SCN.
[0219] In addition, a plurality of drawings conceptually illustrate processes. The specific operations of these processes may not be performed in the exact order shown and described. The specific operations may not be performed in a continuous sequence of operations, and different specific operations may be performed in different embodiments. In addition, the process may be implemented using several sub-processes, or as part of a larger macro process. Therefore, it will be understood by those skilled in the art that the present invention is not limited by the foregoing illustrative details, but is defined by the appended claims.
Claims
1. A method for implementing a service model in a data center including a plurality of host computers executing a plurality of source computing nodes, the method comprising: providing, to a specific host computer, parameters for establishing a first tunnel and a second tunnel between the specific host computer and a first service node and a second service node of a first service provider and a second service provider outside the data center; as well as providing a set of service actions to the specific host computer, the set of service actions comprising a first service action and a second service action to be performed by the first service node and the second service node, respectively, on at least one data message flow of a source computing node implemented on the specific host computer, Each service action in the set of service actions is defined by referencing an identifier, the identifier identifying a set of service nodes of a service provider for executing the service action, each tunnel is used to relay each data message of the at least one data message flow to a service node of a service provider to perform a service action on the data message, After performing the first service action on each data message of the at least one data message flow, the first service node of the first service provider sends a response data message back to the specific host computer along the first tunnel, and the data message is sent along the second tunnel to the second service node of the second service provider for the second service node to perform the second service action on the data message.
2. The method of claim 1, wherein the provided set of service actions is provided with a flow identifier, the flow identifier identifying the at least one data message flow to which the first service action and the second service action of the provided set of service actions have to be applied. 3 . The method of claim 2 , wherein providing the service action set comprises providing a service action rule including the service action set and the flow identifier.
4. The method of claim 2, wherein providing the set of service actions comprises providing a service action policy from which the particular host computer generates a service action rule, the service action rule comprising the set of service actions and the flow identifier.
5. A method as claimed in claim 2, wherein the flow identifier provided by the service action set is used by a service-processing module, which is executed on the specific host computer and compares the header value of the data message flow associated with the source computing node with the flow identifier to identify the data message flow on which the service action set must be executed.
6. The method of claim 5, wherein the service-processing module is a filter deployed on an egress data path of the source computing node to intercept and inspect data messages sent by the source computing node.
7. The method of claim 5, wherein the service-processing module is a filter deployed on the ingress data path of the source computing node to intercept and inspect data messages received for the source computing node before the messages are provided to the source computing node.
8. The method of claim 1, wherein the provided tunnel-establishment parameters include tunnel header packet parameters.
9. The method of claim 8, wherein the provided tunnel-establishment parameters further include a tunnel key, the tunnel key being used to allow multiple different data message flows to use one tunnel from the specific host computer to the specific service provider.
10. The method of claim 8, wherein the provided tunnel-establishment parameters further include parameters for generating a tunnel key for allowing a plurality of different data message flows to use one tunnel from the particular host computer to a particular service provider.
11. The method of claim 1 , wherein the identifier identifies the set of service nodes of the service provider by identifying a tunnel to a service node of the service provider.
12. The method of claim 1, wherein Providing tunnel-establishment parameters includes providing parameters for establishing a plurality of tunnels to a plurality of service nodes of the first service provider, and Providing the set of service actions includes providing a service action identifier that identifies a set of service nodes of the first service provider for a service action by identifying a plurality of tunnel identifiers of the plurality of tunnels to the plurality of service nodes of the first service provider.
13. The method of claim 1, wherein Providing tunnel-establishment parameters includes providing parameters for establishing multiple tunnels to multiple service nodes of the first service provider, The method also includes providing a set of load balancing criteria for selecting a tunnel among the plurality of tunnels for a data message flow distributed to the first service provider, the selection of the tunnel distributing the data message flow among the plurality of service nodes of the first service provider in a load balanced manner based on the set of load balancing criteria.
14. The method of claim 1, wherein Providing tunnel-establishment parameters comprises providing parameters for establishing at least two tunnels to two service nodes of two service providers performing the same service action, The method also includes providing a set of selection criteria for selecting one of two provided tunnels to the first service provider and the second service provider for a data message flow.
15. The method of claim 14, wherein the set of selection criteria includes dynamically evaluated criteria.
16. The method of claim 1, wherein the different service providers are different service providers operating in different data centers of the data center connected to the particular host computer through a public network.
17. A computing device comprising: a set of processing units; and A machine-readable medium storing a program which, when executed by at least one of the processing units, implements the method of any one of claims 1-16.
18. A system comprising means for implementing the method according to any one of claims 1 to 16.
