Application layer connection redistribution between service instances
By terminating and re-establishing a subset of connections and using direction-dependent criteria to redistribute application layer connections, the problem of long-term survival connection load balancing is solved, achieving even distribution of connections and improving system efficiency.
Patent Information
- Application Number
- CN202410424617.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-04-10
- Filing Date
- 2024-04-10
- Publication Date
- 2024-10-15
AI Technical Summary
Existing technologies are difficult to effectively perform load balancing of long-lived application layer connections, resulting in uneven distribution of connections between service instances, leading to problems such as high latency and traffic discarding.
Redistribution and load balancing of connections is achieved by determining a subset of connections and terminating that subset, re-establishing connections, utilizing direction-dependent criteria on each peer.
It achieves even distribution of connections, reduces delays and traffic drops between service instances, and improves system reliability and efficiency.
Smart Images

Figure CN118784701A_ABST
Abstract
Description
Background Art
[0001] A long-lived application layer connection is one that remains open longer than the time required to execute a single transaction or a set of sequential / parallel transactions on the connection. Some common application layer connection protocols include Hypertext Transfer Protocol (HTTP), HTTP2, and Diameter. Given that long-lived connections are expected to remain active until the client or server terminates the connection (e.g., due to protocol or local / operator policies), it may be difficult to properly load balance multiple established long-lived connections. For example, a service provider may provision multiple service instances (e.g., servers, virtual machines, containers, pods, etc. - including combinations thereof) in an active-active configuration. In an active-active configuration, a long-lived connection may be established between any of these service instances and a peer (e.g., a client system).
[0002] Over time, additional connections may be established and disconnected, more service instances may be added and removed (e.g., for capacity and removed due to failures), or other events may occur that change the distribution of connections across service instances. Some service instances may end up with many connections, while other service instances have few or no connections. Without redistribution logic that can move connections from one instance to another, the service provider is left with only its ability to distribute newly initiated connections while waiting for peers / instances to self-terminate already established connections. At the same time, connections established to service instances with higher connection loads may experience adverse service impacts (such as higher latency and traffic drops), while other service instances are underutilized. Summary of the invention
[0003] The technology disclosed herein implements redistribution of connections between service instances by determining a subset of connections and terminating the subset. In a specific example, a method includes determining connection information about a connection established with a service instance operating in an active-active configuration. The connection information identifies a connection initiation direction of the connection and identifies a peer of the connection. Based on the connection information, the method includes determining a subset of connections for reestablishment on a per-peer basis using direction-dependent criteria and terminating the subset of connections.
[0004] In other examples, an apparatus performs the above method, and program instructions stored on a computer-readable storage medium direct a processing system to perform the above method. BRIEF DESCRIPTION OF THE DRAWINGS
[0005] Figure 1 An implementation for redistributing application layer connections with peers among service instances is illustrated.
[0006] Figure 2 Illustrated is the operation of redistributing application layer connections with peers among service instances.
[0007] Figure 3 An operational scenario for redistributing application layer connections with peers among service instances is illustrated.
[0008] Figure 4 An example of connection information used in redistributing application layer connections with peers between service instances is illustrated.
[0009] Figure 5 Illustrated are operations for redistributing application layer connections with peers among service instances.
[0010] Figure 6 Illustrated are operations for redistributing application layer connections with peers among service instances.
[0011] Figure 7 A computing system for redistributing application layer connections with peers among service instances is illustrated. DETAILED DESCRIPTION
[0012] If communications need to continue between the peer and one of the active-active service instances, terminating the application layer connection between the peer and a service instance operating in an active-active configuration with a similar service instance will force a new connection to be established. When the peer initiates the new connection, the load balancer associated with the active-active service instance can select one of the service instances to satisfy the load balancing scheme implemented by the load balancer (e.g., to select a service instance with fewer connections than other service instances in the instance). Similarly, if one of the service instances were to initiate the new connection, the controller of the service instance could select a service instance that satisfies the load balancing scheme to initiate the new connection. In both scenarios above, establishing a new connection provides the peer with an opportunity to connect to a different service instance.
[0013] While randomly terminating connections may eventually result in reestablished connections being better distributed across service instances, selectively terminating connections is more beneficial. Connections to service instances that have few or no other connections may not benefit from being terminated to trigger the establishment of new connections. In a general sense, connections to service instances that have a greater number of connections than other service instances should have their connections terminated so that new connections can be more evenly distributed during establishment.
[0014] Figure 1 An implementation 100 for redistributing application layer connections with peers between service instances is illustrated. Implementation 100 includes a connection balancer 101, a service instance 102, and a peer 103. Connection balancer 101 and service instance 102 communicate via respective communication links 112. Communication link 112 may be a wired and / or wireless link and may be a direct link or may include intermediate systems, networks, and / or devices. In some examples, communication link 112 may be a logical link between connection balancer 101 and service instance 102 implemented on physical networking and computing hardware. Connection 111 is an application layer connection between peer 103 and service instance 102 via a communication link, which may be similar to communication link 112. Connection 111 may be established using HTTP2, diameter, or some other application layer connection protocol.
[0015] In operation, service instances 102 include two or more service instances in an active-active configuration, which is referred to in this example as an active-active environment 131. Service instances 102 can be physical computing systems, virtual machines, containers, pods, or some other type of physical or virtualized computing components with which an application layer connection can be established - including combinations thereof. Service instances 102 are each configured to provide the same service(s) to connected peers. The active-active configuration of service instances 102 enables peers 103 to connect to any of service instances 102 to access the service(s) provided by them. In some examples, a load balancer can be used in active-active environment 131 to distribute or "balance" incoming connections from peers 103 between service instances 102. Similarly, a controller for active-active environment 131 can select a particular service instance in service instances 102 to initiate a new connection to peer 103.
[0016] Peers 103 include one or more endpoints to connections 111. Each connection in connections 111 includes one of peers 103 as one endpoint and one of service instances 102 as another endpoint. Individual peers in peers 103, like service instances 102, can be endpoints of multiple connections in connections 111. Peers 103 can include physical computing systems, virtual machines, containers, pods, or some other type of physical or virtualized computing components with which application layer connections can be established - including combinations thereof. In an example, peers 103 can include computing devices that communicate wirelessly over a fifth generation (5G) cellular communication network. Service instances 102 can be network functions implemented by an operator of a 5G network to provide application layer communication services to peers 103 via connections 111. Given the scale of many 5G networks, the number of peers 103 and connections 111 to service instances 102 can be very large, which increases the likelihood that problems (e.g., greater latency, dropped communication traffic, etc.) may occur when connections 111 are unevenly distributed across service instances 102.
[0017] The connection balancer 101 is a computing component, such as a physical computing system, a virtual machine, a container, a pod, or some other type of physical or virtualized computing component capable of communicating with the service instance 102, including combinations thereof. Although shown as a single element, the connection balancer 101 can be distributed across multiple computing components. Similarly, although the connection balancer 101 is shown outside the active-active environment 131, the connection balancer 101 can be considered to be part of the active-active environment 131. The connection balancer 101 performs operation 200 to redistribute the connection 111 with the peer 103 between the service instances 102. Instead of moving an existing connection in the connection 111 from one of the service instances 102 to another, the connection balancer 101 terminates the existing connection, which allows a new connection to be established between the affected peer in the peer 103 (i.e., the peer that is the endpoint of the terminated connection) and another service instance. Even if the original connection is not maintained, the operation 200 still results in the redistribution of the connection between the peer and the service instance 102.
[0018] Figure 2An operation 200 is illustrated of redistributing application layer connections with peers among service instances. Operation 200 may be performed periodically (e.g., when a predefined period of time has passed since the last execution, on a predetermined schedule, etc.), may be performed when a trigger condition is met (e.g., when a difference threshold is met between the number of connections served by the most loaded service instance and the least loaded service instance), may be performed in response to a user instruction, or there may be some other motivation for performing operation 200. Each time operation 200 is performed, connection balancer 101 may consider the current situation surrounding connections 111, service instances 102, and peers 103. For example, a new service instance may be instantiated between two executions of operation 200. Even if connections 111 are redistributed across multiple service instances 102 that exist during one execution of operation 200, the presence of the new service instance may support additional redistribution during subsequent executions of operation 200 (e.g., the new service instance may be serving fewer connections 111 than other service instances when operation 200 is subsequently performed).
[0019] During operation 200, connection balancer 101 determines connection information 121 about connection 111 (201). In implementation 100, connection information 121 is shown as being received from service instance 102 via communication link 112. Connection balancer 101 may poll each of service instances 102 to obtain a portion of connection information 121 related to those of connections 111 that are established with the respective service instance, service instances 102 may be configured to update connection balancer 101 with their respective portions of connection information 121, or some other mechanism is used to retrieve connection information 121 from service instance 102. In other examples, connection information 121 may be received from a different component of active-active environment 131 that maintains connection information 121, such as a controller / orchestrator for active-active environment 131. In some examples, connection balancer 101 may communicate with the controller / orchestrator of active-active environment 131 to identify service instance 102 prior to receiving connection information 121. The controller / orchestrator identifies the service instances 102 in a manner that enables the connection balancer 101 to contact the service instances 102 via the communication link 112 (e.g., by providing a network address for each of the service instances 102). In a specific example, Kubernetes can be a container orchestration platform that facilitates the operation of the active-active environment 131, where each of the service instances 102 is a pod of one or more containers. The connection balancer 101 can contact the Kubernetes control plane of the active-active environment 131 to identify the pods operating in the active-active environment 131.
[0020] Connection information 121 identifies the connection initiation direction of connection 111 and identifies peer 103 of connection 111. In other words, based on connection information 121, connection balancer 101 knows which corresponding peer of peers 103 is the endpoint of a corresponding one of connections 111. Likewise, based on the connection initiation direction, connection balancer 101 knows whether it is the peer or the service instance to which the peer is connected that initiated the connection. A peer may be identified by a fully qualified domain name (FQDN) of the peer, an Internet Protocol (IP) address of the peer, a universally unique identifier (UUID) of the peer, or some other identifier that distinguishes the peer from other peers of peers 103. In some examples, connection information 121 may also indicate which service instance of service instances 102 is the endpoint of connection 111. However, if portions of connection information 121 are received from corresponding service instances of service instances 102, connection balancer 101 may record the specific service instance of service instances 102 from which a portion was received as the endpoint of the connection identified in the portion.
[0021] Based on the connection information, connection balancer 101 determines a subset of connections 111 for reestablishment on a per-peer basis using a direction-dependent criterion (202). The criterion is direction-dependent in the sense that the criterion used to determine whether a connection initiated by one of peers 103 should be included in the subset is different from the criterion used to determine whether a connection initiated by one of service instances 102 is included in the subset, as described in more detail below. Connections initiated by peer 103 are referred to herein as inward connections because they are initiated by peer 103 toward service instance 102. Connections initiated by service instance 102 are referred to as outward connections because they are initiated by service instance 102 toward peer 103. In some examples, connections 111 may include only inward connections or only outward connections, and this fact may not change as new connections are established. In these examples, connection balancer 101 may not be configured with portions of the direction-dependent criteria that do not apply to the type of connection being established (eg, if only inbound connections are processed, connection balancer 101 may lack portions of the direction-dependent criteria that apply to outbound connections).
[0022] Direction-dependent criteria are applied on a per-peer basis to mitigate service disruptions for individual peers. For example, if a subset of connections is randomly selected without regard to the peers in which the connections are established, there is a greater risk that all of the connections with a given peer may be marked as terminated. Although a terminated connection can be replaced with a newly established connection, service will be interrupted during the time it takes for the peer to establish a new connection. In contrast, the direction-dependent criteria used by the connection balancer 101 ensure that connections with a particular peer are not all included in the subset marked as terminated. Similarly, to avoid disruption of newly established connections, the direction-dependent criteria may indicate that connections established after the most recent execution of operation 200 should automatically not be included in the subset.
[0023] The connection balancer 101 terminates a subset of the determined connections 111 (203). In order to terminate the subset, the connection balancer 101 may direct those service instances in the service instances 102 through the communication link 112 to terminate the connections within the subset. Each service instance in the service instance 102 that is an endpoint of at least one connection in the subset will receive a termination instruction from the connection balancer 101. The termination instruction identifies the (one or more) connections to be terminated by the corresponding service instance. The connection can be identified based on a tuple of the connection (i.e., source IP address, source port, destination IP address, destination port) or using some other identification information that explicitly identifies the connection to be terminated. When the service instance receives the termination instruction, the service instance terminates the (one or more) connections identified by the termination instruction. Preferably, the service instance terminates the connection gracefully by allowing the exchange of any ongoing transactions on the connection to be completed before disconnecting the connection. If the connection is terminated in the middle of a transaction on the connection, terminating the connection gracefully minimizes the interruption that may occur to the corresponding peer. In other examples, the service instance may terminate the identified connection without caring about the ongoing transaction. In yet other examples, connection balancer 101 may indicate in its termination instructions whether a connection should be terminated gracefully.
[0024] Once a connection is terminated, a new connection can be established to handle subsequent transactions that the terminated connection would have carried. The establishment of a new connection can occur immediately when the previous connection is terminated, or can wait until a later time, such as when a new transaction requires a new connection (if such a transaction occurs). In some examples, the connection balancer 101 can guide the new connection to be established before the previous connection is terminated. The traffic can then be switched to the new connection immediately. Although the service instance that will handle the new connection in the service instance 102 is likely to be randomly or arbitrarily selected, the active-active environment 131 preferably uses a load balancing mechanism to ensure that a new connection is established with a service instance that improves the balance of the connection 111 between the service instances 102 (for example, a service instance that selects a service instance that serves fewer connections 111 than other service instances in the service instance 102). For example, if a peer that was once the endpoint of the terminated connection initiates a new connection, the load balancer of the active-active environment 131 can intercept a request for a new connection from the peer and direct the request to one of the selected service instances 102. The load balancing policy can instruct the load balancer on how to distribute new connection requests. Similarly, if one of service instances 102 were to initiate a new connection with the peer, the controller / orchestrator of active-active environment 131 can select which of service instances 102 should initiate the connection (i.e., send the connection request to the peer). The load balancing policy used by the controller / orchestrator can provide guidance on how to distribute new connections, and can also indicate when new service instances should be added to service instances 102 to help handle the load of connections 111.
[0025] Advantageously, the connection balancer 101 that terminates a subset of the connections 111 enables new connections that replace those terminated connections to be load balanced when established. Mechanisms already in place for the active-active environment 131 (e.g., a load balancer for incoming connection requests) can handle the load balancing. This effectively redistributes the connections 111 between the service instances 102 without requiring specialized logic to move existing connections from one service instance to another.
[0026] Figure 3An operational scenario 300 for redistributing application layer connections with peers among service instances is illustrated. The operational scenario 300 is an example of what may occur during step 202 of operation 200. In the operational scenario 300, at step 1, connections 111 are grouped into an inbound group 301 and an outbound group 302 based on the connection initiation direction of respective ones of the connections 111. The inbound group 301 includes those of the connections 111 that were initiated by peer 103 (e.g., the service instance involved acts as an HTTP or diameter server), while the outbound group 302 includes those of the connections 111 that were initiated by service instance 102 (e.g., the service instance involved acts as an HTTP or diameter client). In other examples, the grouping of the connections 111 may be implicit, in that the connection balancer 101 simply identifies in which direction the connection was initiated when applying direction-dependent criteria. For example, when applying a portion of the direction-dependent criteria for inbound connections, the connection balancer 101 may simply ignore outbound connections.
[0027] At step 2a, connection balancer 101 uses a portion of the direction-dependent criteria for inbound connections (referred to as inbound connection criteria) to determine inbound termination 303. Inbound termination 303 includes connections that the inbound connection criteria in inbound group 301 indicate should be terminated. Similarly, at step 2b, connection balancer 101 uses a portion of the direction-dependent criteria for outbound connections (referred to as outbound connection criteria) to determine outbound termination 304. Outbound termination 304 includes connections that the outbound connection criteria in outbound group 302 indicate should be terminated. Steps 2a and 2b are performed substantially simultaneously in operation scenario 300. In other examples, steps 2a and 2b may be performed in a different order, such as one after the other.
[0028] At step 3, both the inward terminator 303 and the outward terminator 304 are included in the connection subset 305. The connection subset 305 is a subset of the connections 111 that the connection balancer 101 has determined should be terminated based on direction-dependent criteria. According to the operation scenario 300, the connection subset 305 is the subset that the connection balancer 101 terminated in step 203 of the above-mentioned operation 200. It should be understood that the inward terminator 303 and the outward terminator 304 are explained separately to show the different criteria for identifying the connections for termination. In this way, when portions of the inward group 301 and the outward group 302 are identified in steps 2a and 2b, these portions can be directly added to the connection subset 305 without the intermediate step of creating the inward terminator 303 and the outward terminator 304.
[0029] Figure 4Exemplary connection information 400 used when redistributing application layer connections with peers between service instances is illustrated. Connection information 400 is an example of connection information included in connection information 121. Specifically, connection information 400 is connection information for connection 421. Connection information 121 may include similar information about other connections in connection 111. Connection 421 includes instance identifier 422, peer identifier 423, direction identifier 424, connection tuple 425, and connection establishment timestamp 426. In the following example, success rate 427, transaction latency 428, and round-trip time 429 are information items related to outbound connections that identify outbound termination 304. In the following example, even if connection 421 is not an outbound connection, connection information 400 may still include items 427-429, but the information is not related to the application of the inbound connection criteria. Other examples may include different information for connection 421.
[0030] Instance identifier 422 identifies a service instance in service instances 102 that is an endpoint of connection 421. Instance identifier 422 may be an identifier assigned by active-active environment 131 to distinguish the service instance from other instances in service instances 102, may be a network address of the service instance, or may be some other type of identifier that distinguishes the service instance of connection 421 from other service instances in service instances 102. In some examples, connection information 400 may not explicitly include instance identifier 422, but connection balancer 101 may infer instance identifier 422 as the service instance from which connection information 400 was received.
[0031] Peer identifier 423 similarly distinguishes a peer in peers 103 that is the other endpoint of connection 421. Peer identifier 423 may be the FQDN of the peer, the network address of the peer, the UUID of the peer, or some other identifier that distinguishes the peer from the other peers in peers 103. In some examples, it may be meaningful to determine which peer is actually the endpoint of a particular connection. This is particularly true for inbound connections, as the identity of the client initiating the connection is not always known. For example, a form of network address translation may be enabled between the connected service instance and the peer. For 5G service-based interfaces, HTTP2 endpoints may use consumer information available as part of the OAuth token (i.e., available in a sub-attribute in the token defined in Technical Specification 29.510 of the Third Generation Partnership Project (3GPP), or available in other custom headers (such as those recommended in Technical Specification 29.500 of 3GPP)). For diameter connections, peer details can be derived from the diameter identity exchanged as part of the Capability Exchange Request (CER) message.
[0032] Direction identifier 424 indicates the direction in which connection 421 is initiated. That is, direction identifier 424 indicates whether connection 421 is initiated by a peer (i.e., an inbound connection) or by a service instance (i.e., an outbound connection). Connection tuple 425 indicates the source IP address, source port, destination IP address, and destination port of the connection. In some examples, instance identifier 422 and peer identifier 423 may not need to be included separately in connection information 400, because the source IP address and destination IP address in connection tuple 425 are sufficient to identify the service instance and peer, respectively. Connection establishment timestamp 426 indicates the time when connection 421 was established.
[0033] Success rate 427 is a measure of the number of requests transmitted on connection 421 relative to the number of successful responses to those requests on connection 421 (e.g., if 15 successful responses were transmitted relative to 20 requests, then success rate 427 would be 75%). Transaction latency 428 is the average processing time for a response to be transmitted on connection 421 for a corresponding request. Round trip time 429 indicates the transmission delay of a message exchanged with the peer identified by peer identifier 423 on connection 421. The round trip time is the amount of time between sending a message and receiving an acknowledgment that the message has been received. Round trip time 429 is the average of the round trip times measured for connection 421. The average of the above values can be determined by a predefined amount of time (e.g., a time period defined by a user, a time period since the last time operation 200 was performed, etc.) or a predefined number of messages (e.g., requests, replies, etc.). In some examples, connection balancer 101 may receive one or more of success rate 427, transaction latency 428, and round-trip time 429 from a source other than connection information 121 (e.g., connection balancer 101 may use observability tools or data analysis tools available in active-active environment 131).
[0034] Figure 5 Operation 500 is illustrated for redistributing application layer connections with peers between service instances. Operation 500 is an example of how inbound connection criteria may be used in step 2a of operational scenario 300 to identify inbound connections for inclusion in inbound termination 303. Operation 500 is performed on a per-peer basis. Thus, the steps of operation 500 involve only a single peer in peers 103. Operation 500 is performed separately for other peers in peers 103 (e.g., may be performed in parallel for respective peers in peers 103).
[0035] In operation 500, connection balancer 101 determines the maximum number of connections per instance for the peers 103 that are subject to this execution of operation 500 (501). In this example, the maximum number of connections per instance is part of the inbound connection criteria. The maximum number of connections per instance is the ceiling of the quotient of the total number of inbound connections from the peer across service instances 102 divided by the number of service instances 102. Ceiling is a mathematical function that rounds an input number up to the nearest integer. In this case, the input number is the aforementioned quotient. For example, if the total number of connections from the peer to the service instance 102 is 15 and there are 10 service instances 102, the quotient will be 1.5. Applying the ceiling function to the quotient results in a maximum number of connections per instance of 2, because 2 is the nearest integer greater than 1.5. Thus, in this example, the 15 connections from this peer may be distributed across the 10 service instances 102 in any manner (including all connections being established with a single service instance), but there should only be a maximum of 2 connections per service instance.
[0036] Connection balancer 101 identifies which of service instances 102 has greater than the maximum number of connections per instance with the peer (502). Continuing with the example above, connection balancer 101 will identify service instances that have more than two of the 15 connections with the peer. It is possible that no service instance is servicing more than the maximum number of connections per instance with the peer. In such a case, operation 500 ends for the peer. However, if one or more of service instances 102 are identified, connection balancer 101 selects one of these service instances 102 to continue operation 500 (503).
[0037] For the selected service instance, the connection balancer 101 adds the oldest connection with the peer to the inbound terminator 303. The connection age is determined from the connection establishment timestamp (e.g., connection establishment timestamp 426) for the connection in the connection information 121. The oldest connection is added first in this example to avoid interrupting newly established connections, which is best avoided. However, other examples may add connections regardless of age. After adding the connection, the connection balancer 101 determines whether the maximum number of connections per instance is now met for the selected instance (e.g., according to the above example, determine whether the number of connections between the peer and the selected service instance is two) (505). If the maximum number of connections per instance is not met, operation 500 returns to step 504. During subsequent executions of step 504, the oldest connection added to the inbound terminator 303 is the oldest remaining connection with the peer, because older connections with the peer may have been added to the inbound terminator 303. Steps 504 and 505 are repeated until the maximum number of connections per instance is met.
[0038] Once the maximum number of connections per instance is met, the connection balancer 101 determines whether all service instances identified in step 502 have been processed (506). If the identified service instances have all been processed, operation 500 ends with respect to the peer. If one or more service instances remain to be processed, the connection balancer 101 selects one of the unprocessed service instances (507). Operation 500 returns to step 504 to begin adding connections between the peer and the newly selected service instance to the inbound termination unit 303. Once operation 500 ends for the corresponding peer and the connection in the inbound termination unit 303 is subsequently terminated, no service instance in the service instance 102 will have a greater number of inbound connections with the peer than the maximum number of connections per instance (e.g., according to the example above, no service instance will have more than 2 connections with the peer). If the peer requests a new connection to replace the terminated connection, the new connection can be load balanced between the service instances 102. For example, based on the above example of a maximum number of connections per instance of two, the load balancer of active-active environment 131 may operate using a strategy that causes new connection requests to be routed to those service instances of service instances 102 that have not yet handled two connections with a peer. Thus, connection balancer 101 is able to more evenly redistribute the connections of the peers across service instances 102 without having to move existing connections.
[0039] Figure 6 Operation 600 is illustrated for redistributing application layer connections with peers between service instances. Operation 600 is an example of how outbound connection criteria may be used in step 2b of operational scenario 300 to identify outbound connections for inclusion in outbound termination 304. Operation 600 is performed on a per-peer basis. Thus, the steps of operation 600 involve only a single peer in peers 103. Operation 600 is performed separately for other peers in peers 103 (e.g., may be performed in parallel for opposing peers in peers 103).
[0040] In operation 600, the connection balancer 101 determines the success rate, transaction latency, and round-trip time of the outbound connection of the peers in the peer 103 that are subjected to this execution of operation 600 (601). Although these three factors are determined for operation 600, other examples may use different factors indicating the quality of service (QoS) on the connection, including fewer factors (e.g., only the round-trip time). For example, when the outbound connection is being multiplexed, the success rate and transaction latency cannot be used because the congestion may occur upstream rather than the next hop to which the service instance is connected. Therefore, the success rate or transaction latency of a given connection may not be representative of the performance of the service instance. For example, the fourth generation (4G) wireless network uses a diameter routing agent (DRA) and the 5G wireless network uses a service communication agent (SCP) as an intermediate hop between the service instance and the final endpoint (e.g., a wireless client) to which the request on the outbound connection is directed. The service instance will be able to determine the round-trip time between the instance and the next hop (e.g., DRA or SCP), but the success rate and response latency depend on the final endpoint beyond the next hop.
[0041] In this example, the outbound connection criteria include one or more QoS thresholds to which success rate, transaction latency, and round trip time are applied. The connection balancer 101 identifies connections that meet the QoS thresholds from the outbound connections of the peer that are eligible for termination (602). In some examples, the connection balancer 101 may aggregate these factors into a single value (e.g., by generating a score based on these values) and apply a single QoS threshold to the determined value. In other examples, there may be different QoS thresholds for each factor, and each threshold may need to be met for a connection to qualify for termination. In some examples, only a portion of multiple QoS thresholds (e.g., 2 out of 3) may need to be met for a connection to qualify for termination. A threshold for round trip time may be met if the round trip time is greater than a threshold amount of time; a threshold for transaction latency may be met if the transaction latency is greater than another amount of time; and a threshold for success rate may be met if the success rate is below a threshold percentage of successes. The QoS thresholds may be user-configurable and enable a user (such as an administrator of the connection balancer 101) to fine-tune which outbound connections meet the QoS thresholds. Even if the connection meets the QoS threshold for being eligible for termination, the connection balancer 101 ignores (i.e., excludes from being eligible for termination) connections (603) that have timestamps indicating that they are newer than the most recent previous execution of operation 200. While it may be preferable to exclude newer connections so as not to disrupt services that were just recently started, other examples may not exclude these newer connections.
[0042] The connection balancer 101 then determines whether adding another connection that meets the termination criteria to the outbound termination section 304 results in the number of connections added to the outbound termination section 304 exceeding the smaller of two values (604). The two values and the requirement to use the smaller of the two values in the determination are also part of the outbound connection criteria in operation 600. One of the two values is a predefined portion of the total number of connections with the peer, and the other of the two values is the number of connections that meet the termination criteria. The predefined portion is a user-configurable parameter (e.g., configured by an administrator of the connection balancer 101) that limits the portion of connections that meet the termination criteria that can be terminated during one iteration of operation 200. The predefined portion can be expressed as a percentage or ratio of outbound connections. For example, the predefined portion can limit termination to only 80% of the outbound connections of the peer. Since this is the first time step 604 is passed during operation 600, the number of connections added to the outbound termination section 304 is zero, and adding a connection that meets the termination criteria to the outbound termination section 304 will result in 1 connection being added. Thus, unless the number of termination-eligible connections is zero or a predefined fraction of the total number of connections with the peer is less than one, which would end operation 600, connection balancer 101 continues to add the oldest termination-eligible connections to outbound termination section 304 (605). Other examples may not consider age when selecting termination-eligible connections to add or may use a different age-based order (e.g., youngest first).
[0043] After adding the oldest terminating connection to the outbound termination 304, the connection balancer 101 returns to step 604. In this iteration of step 604, the number of connections added is now 1, so the connection balancer 101 determines whether adding another connection (i.e., which will result in 2 added connections) will exceed the smaller of the two values. If the smaller of the two values will be exceeded, the operation 600 ends for the peer. However, if adding another connection will still not exceed the smaller of the two values, the connection balancer 101 again continues to step 605 to add the oldest terminating connection to the outbound termination 304. For this and other subsequent iterations of step 605, the oldest terminating connection is the oldest terminating connection that has not yet been added to the outbound termination 304. The connection balancer 101 then returns to step 604 to again determine whether adding another terminating connection will exceed the smaller of the two values. Steps 604 and 605 repeat until adding another connection would exceed the smaller of the two values (ie, operation 600 stops before adding a terminating eligible connection that would cause the number of added terminating eligible connections to exceed the smaller of the two values).
[0044] In a specific example of operation 600, connection balancer 101 may identify 12 termination-eligible connections for a peer in peers 103. The peer may have a total of 15 connections with service instance 102, and the predefined portion of the total number of connections may be set to 70%. 70% of 15 is 10.5. 10.5 is the lesser of the values 10.5 and 12. Therefore, steps 604 and 605 will repeat until the number of added termination-eligible connections reaches 10 because connection balancer 101 determines at step 604 that the addition of another termination-eligible connection (i.e., a total of 11 added connections) will exceed 10.5.
[0045] Figure 7 A computing system 700 is illustrated, which represents any system or collection of systems in which the various processes, systems, programs, services, and scenarios disclosed herein may be implemented. Examples of computing system 700 include, but are not limited to, desktop computers, laptop computers, server computers, routers, network servers, cloud computing platforms and data center equipment, distributed computing systems, and any other type of physical or virtual server machines, physical or virtual routers, containers, and any variations or combinations thereof.
[0046] The computing system 700 may be implemented as a single device, system or apparatus, or may be implemented as multiple devices, systems or apparatuses in a distributed manner. The computing system 700 may include, but is not limited to, a processing system 715, a storage system 705, software 725, a communication interface system 710, and a user interface system 720. The processing system 715 may be operably coupled to the storage system 705, the communication interface system 710, and the user interface system 720.
[0047] The processing system 715 may load and execute software 725 from the storage system 705. The software 725 may include and implement a connection termination process 730, which may represent any operation for selectively terminating an application layer connection using a direction-dependent criterion (e.g., operation 200), including selection of an inbound connection (e.g., operation 500) and selection of an outbound connection (e.g., operation 600), etc. Thus, the computing system 700 may be a connection balancer 101 or may be a host system for a virtualized instance of the connection balancer 101. The computing system 700 may also represent a service instance 102 and a peer 103, or may host a virtualized instance of a service instance 102 and a peer 103, including combinations of these. When executed by the processing system 715, the software 725 may direct the processing system 715 to operate as described herein, at least for the various processes, operational scenarios, and sequences discussed in the foregoing implementations. The computing system 700 may optionally include additional devices, features, or functions that are not discussed for the sake of brevity.
[0048] In some embodiments, processing system 715 may include a microprocessor and other circuitry that retrieves and executes software 725 from storage system 705. Processing system 715 may be implemented within a single processing device, but may also be distributed across multiple processing devices or subsystems that collaborate in executing program instructions. Examples of processing system 715 may include general-purpose central processing units, graphics processing units, special-purpose processors and logic devices, and any other type of processing device, combination, or variation thereof.
[0049] The storage system 705 may include any memory device or computer-readable storage medium that is readable by the processing system 715 and capable of storing the software 725. The storage system 705 may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. Examples of storage media include random access memory, read-only memory, magnetic disks, optical disks, optical media, flash memory, virtual and non-virtual memory, magnetic cassettes, magnetic tape, disk storage or other magnetic storage devices, or any other suitable storage medium. In any case, a computer-readable storage medium is not a transient form of signal transmission (commonly referred to as a "signal itself"), such as a propagated electrical or electromagnetic signal or carrier wave.
[0050] In addition to computer-readable storage media, in some implementations, the storage system 705 may also include computer-readable communication media through which at least some of the software 725 may be transmitted internally or externally. The storage system 705 may be implemented as a single storage device, but may also be implemented across multiple storage devices or subsystems that are co-located or distributed relative to each other. The storage system 705 may include additional elements, such as a controller, that can communicate with the processing system 715 or possibly other systems.
[0051] The software 725 (including the connection termination process 730 and other functions) may be implemented in program instructions that, when executed by the processing system 715, may direct the processing system 715 to operate as described with respect to the various operational scenarios, sequences, and processes presented herein. For example, the software 725 may include program instructions for determining connection information about connections established with an active-active service instance (e.g., information identifying a connection initiation direction of the connection and a peer of the connection), using the connection information as a basis for determining a subset of connections for reestablishment on a per-peer basis using direction-dependent criteria, and terminating the subset of connections.
[0052] In particular, program instructions may include various components or modules that cooperate or otherwise interact to perform various processes and operation scenarios described herein. Various components or modules may be embodied in compiled or interpreted instructions, or in some other variants or combinations of instructions. Various components or modules may be executed in a synchronous or asynchronous manner, serially or in parallel, in a single-threaded environment or multithreaded, or according to any other suitable execution paradigm, variant or combination thereof. Software 725 may include additional processes, programs or components, such as operating system software, virtualization software or other application software. Software 725 may also include firmware or some other form of machine-readable processing instructions that may be executed by processing system 715.
[0053] In general, the software 725, when loaded into the processing system 715 and executed, can transform an appropriate device, system or apparatus (of which the computing system 700 is representative) as a whole from a general-purpose computing system to a special-purpose computing system that is customized to, for example, act as a connection balancer as described herein, etc. In practice, the encoded software 725 on the storage system 705 can transform the physical structure of the storage system 705. The specific transformation of the physical structure can depend on various factors in different implementations of the present description. Examples of such factors can include, but are not limited to, the technology of the storage medium used to implement the storage system 705 and whether the computer storage medium is characterized as primary storage or auxiliary storage, as well as other factors.
[0054] For example, if the computer-readable storage medium is implemented as a semiconductor-based memory, then when program instructions are encoded therein, the software 725 can transform the physical state of the semiconductor memory, such as by transforming the state of transistors, capacitors, or other discrete circuit elements that make up the semiconductor memory. Similar transformations may occur with respect to magnetic or optical media. Other transformations of the physical media are possible without departing from the scope of this description, and the foregoing examples are provided only for the convenience of this discussion.
[0055] The communication interface system 710 may include communication connections and devices that allow communication with other computing systems (not shown) over a communication network (not shown). Examples of communication connections and devices that together allow inter-system communication may include network interface cards, antennas, power amplifiers, radio frequency (RF) circuits, transceivers, and other communication circuits. The communication connections and devices may communicate over a communication medium (such as metal, glass, air, or any other suitable communication medium) to exchange communications with other computing systems or systems networks.
[0056] Communications between computing system 700 and other computing systems (not shown) may occur over one or more communications networks and according to various communications protocols, combinations of protocols, or variations thereof. Examples include an intranet, the Internet, a local area network, a wide area network, a wireless network, a wired network, a virtual network, a software-defined network, a data center bus and backplane, or any other type of network, combination of networks, or variations thereof.
[0057] As will be appreciated by those skilled in the art, aspects of the present invention may be embodied as systems, methods, computer program products, and other configurable systems. Thus, aspects of the present invention may take the form of a complete hardware embodiment, a complete software embodiment (including firmware, resident software, microcode, etc.), or a combination of software and hardware aspects generally referred to herein as a "circuit," "module," or "system." In addition, aspects of the present invention may take the form of a computer program product embodied in one or more storage devices or in (one or more) computer-readable media having a computer-readable program code embodied thereon.
[0058] Unless the context clearly requires otherwise, throughout the specification and claims, the words "including", "comprising", etc. should be interpreted in an inclusive sense, rather than in an exclusive or exhaustive sense; that is, in the sense of "including but not limited to". As used herein, the terms "connected", "coupled" or any variation thereof mean any direct or indirect connection or coupling between two or more elements; the coupling or connection between elements may be physical, logical, or a combination thereof. In addition, the words "herein", "above", "below", and words of similar meaning, when used in this application, refer to the application as a whole, rather than to any particular part of the application. Where the context permits, the words used in the singular or plural in the above specific embodiments may also include the plural or singular, respectively. When referring to a list of two or more items, the word "or" covers all the following interpretations of the word: any item in the list, all items in the list, and any combination of items in the list.
[0059] The phrases "in some embodiments," "according to some embodiments," "in the illustrated embodiments," "in other embodiments," etc. generally mean that the particular feature, structure, or characteristic following the phrase is included in at least one implementation of the present technology, and may be included in more than one implementation. Additionally, such phrases do not necessarily refer to the same embodiment or different embodiments.
[0060] The detailed description of the above technical examples is not intended to be exhaustive or to limit the technology to the precise form disclosed above. Although the specific examples of the technology for illustrative purposes are described above, as those skilled in the relevant art will recognize, various equivalent modifications are possible within the scope of the technology. For example, although the process or block are presented in a given order, alternative implementations can perform routines with steps in different orders, or adopt a system with blocks, and some processes or blocks can be deleted, moved, added, subdivided, combined, and / or modified to provide replacement or sub-combinations. Each of these processes or blocks can be implemented in a variety of different ways. In addition, although a process or block is sometimes shown as being executed in series, these processes or blocks can be changed to be executed or implemented in parallel, or can be executed at different times. In addition, any specific numbers mentioned herein are only examples: alternative implementations can adopt different values or scopes.
[0061] The teaching of the technology provided herein can be applied to other systems, rather than necessarily being applied to the above-mentioned system. The elements and actions of the various examples above can be combined to provide further implementations of the technology. Some alternative implementations of the technology can include not only the additional elements of those implementations mentioned above, but also fewer elements.
[0062] According to the above specific embodiments, these and other changes can be made to the present technology. Although the above description describes certain examples of the present technology and describes the best mode contemplated, no matter how detailed the above appears in the text, the technology can be practiced in many ways. The details of the system can vary significantly in its specific implementation, but are still covered by the technology disclosed herein. As mentioned above, the specific terms used when describing certain features or aspects of the present technology should not be considered to imply that the term is redefined herein to be limited to any specific characteristics, features or aspects of the technology associated with the term. In general, the terms used in the attached claims should not be interpreted as limiting the technology to the specific examples disclosed in the specification, unless such terms are clearly defined in the above specific embodiments section. Therefore, the actual scope of the present technology covers not only the disclosed examples, but also all equivalent ways of practicing or implementing the technology according to the claims.
[0063] In order to reduce the number of claims, certain aspects of the technology are presented below in certain claim forms, but applicants contemplate various aspects of the technology in any number of claim forms. For example, although only one aspect of the technology is described as a computer-readable medium claim, other aspects may also be embodied as a computer-readable medium claim, or in other forms, such as functional limitation claims. Any claim intended to be processed under 35 U.S.C. §112(f) will begin with the words "means for", but the use of the term "for" in any other context is not intended to invoke processing under 35 U.S.C. §112(f). Therefore, applicants reserve the right to seek such additional claim forms in this application or a subsequent application after filing this application.
Claims
1. A method for redistributing application layer connections between active-active service instances, the method comprising: determining connection information about a connection established with a service instance operating in an active-active configuration, wherein the connection information identifies a connection initiation direction of the connection and identifies a peer of the connection; determining, based on the connection information, a subset of the connections for reestablishment on a per peer basis using direction-dependent criteria; as well as The subset of the connections is terminated.
2. The method of claim 1, wherein: Determining the subset of the connections comprises: Based on the connection initiation direction, grouping a portion of the connections into an inbound group, wherein the inbound group includes inbound connections initiated from the peer; identifying a portion of the inbound group for termination based on an inbound connection criterion in the direction-dependent criterion; and Include the portion of the inward group in the subset of the connections.
3. The method of claim 2, wherein: Identifying the portion of the inward group includes: For the corresponding peer of the inbound connection: Determining a maximum number of connections per instance for a corresponding peer, wherein the maximum number of connections per instance comprises rounding up a quotient of a total number of connections across the service instances from the corresponding peer divided by the number of the service instances; identifying one or more instances of the service instance, the one or more instances comprising greater than the maximum number of connections per instance with the corresponding peer; and One or more termination-eligible connections between the one or more instances and the corresponding peers are added to the portion of the inbound group until the one or more instances satisfy the maximum number of connections per instance.
4. The method of claim 3, wherein: Adding the one or more connections that meet the termination condition includes: For a corresponding instance of the one or more instances: The one or more connections eligible for termination are added in oldest first order until the maximum number of connections per instance is reached, wherein the connection information indicates an age of the connection.
5. The method of claim 1, wherein: Determining the subset of the connections comprises: Based on the connection initiation direction, dividing a portion of the connections into an outbound group, wherein the outbound group includes outbound connections initiated from the service instance; identifying a portion of the outbound group for termination based on an outbound connection criterion in the direction-dependent criteria; and The portion of the outward group is included in the subset of the connections.
6. The method of claim 5, wherein: Identifying the portion of the outward group includes: For the corresponding peer of the outgoing connection: Identifying termination-eligible connections in the outbound group between the corresponding peer and the service instance that satisfy one or more quality of service (QoS) thresholds in the outbound connection criteria; and One or more of the termination-eligible connections are added to the portion of the outbound group until the addition of another termination-eligible connection will cause the number of the one or more of the termination-eligible connections to exceed the lesser of two values, wherein the two values include a predefined portion of the total connections with the corresponding peer and the number of the termination-eligible connections.
7. The method of claim 6, wherein: The one or more QoS thresholds include at least one of a success rate threshold, an average delay threshold, and a round trip time (RTT) threshold, and wherein the connection information indicates a success rate, an average delay, and an RTT of the connection.
8. The method of claim 6, wherein: The one or more connections among the connections eligible for termination are added in order of oldest first.
9. The method of claim 6, wherein: The connections eligible for termination do not include connections among the outgoing connections that have been established since the termination of the previously determined connection subset.
10. The method of claim 1, comprising: querying the instance orchestrator to identify the service instance, Wherein, determining the connection information includes polling the service instance to obtain the connection information.
11. An apparatus for redistributing application layer connections between active-active service instances, the apparatus comprising: one or more computer-readable storage media; a processing system operatively coupled to the one or more computer-readable storage media; as well as program instructions, stored on the one or more computer-readable storage media, which, when read and executed by the processing system, direct the apparatus to: determining connection information about a connection established with a service instance operating in an active-active configuration, wherein the connection information identifies a connection initiation direction of the connection and identifies a peer of the connection; determining, based on the connection information, a subset of the connections for reestablishment on a per peer basis using direction-dependent criteria; as well as The subset of the connections is terminated.
12. The device of claim 11, wherein: To determine the subset of the connections, the program instructions direct the processing system to: Based on the connection initiation direction, grouping a portion of the connections into an inbound group, wherein the inbound group includes inbound connections initiated from the peer; identifying a portion of the inbound group for termination based on an inbound connection criterion in the direction-dependent criterion; and Include the portion of the inward group in the subset of the connections.
13. The device of claim 12, wherein: To identify the portion of the inward group, the program instructions direct the apparatus to: For the corresponding peer of the inbound connection: Determining a maximum number of connections per instance for a corresponding peer, wherein the maximum number of connections per instance comprises rounding up a quotient of a total number of connections across the service instances from the corresponding peer divided by the number of the service instances; identifying one or more instances of the service instance, the one or more instances comprising greater than the maximum number of connections per instance with the corresponding peer; as well as One or more termination-eligible connections between the one or more instances and the corresponding peers are added to the portion of the inbound group until the one or more instances satisfy the maximum number of connections per instance.
14. The device of claim 13, wherein: To add the one or more connections that meet the termination condition, the program instructions direct the apparatus to: For a corresponding instance of the one or more instances: The one or more connections eligible for termination are added in oldest first order until the maximum number of connections per instance is reached, wherein the connection information indicates an age of the connection.
15. The device of claim 11, wherein: To determine the subset of the connections, the program instructions direct the apparatus to: Based on the connection initiation direction, dividing a portion of the connections into an outbound group, wherein the outbound group includes outbound connections initiated from the service instance; identifying a portion of the outbound group for termination based on an outbound connection criterion in the direction-dependent criteria; and The portion of the outward group is included in the subset of the connections.
16. The device of claim 15, wherein: To identify the portion of the outward group, the program instructions direct the device to: For the corresponding peer of the outgoing connection: Identifying termination-eligible connections in the outbound group between the corresponding peer and the service instance that meet one or more quality of service (QoS) thresholds in the outbound connection criteria; as well as One or more of the termination-eligible connections are added to the portion of the outbound group until the addition of another termination-eligible connection will cause the number of the one or more of the termination-eligible connections to exceed the lesser of two values, wherein the two values include a predefined portion of the total connections with the corresponding peer and the number of the termination-eligible connections.
17. The device of claim 16, wherein: The one or more QoS thresholds include at least one of a success rate threshold, an average delay threshold, and a round trip time (RTT) threshold, and wherein the connection information indicates a success rate, an average delay, and an RTT of the connection.
18. The device of claim 16, wherein: The one or more connections among the connections eligible for termination are added in order of oldest first.
19. The device of claim 16, wherein: The connections eligible for termination do not include connections among the outgoing connections that have been established since the termination of the previously determined connection subset.
20. One or more computer-readable storage media having program instructions stored thereon for redistributing application layer connections between active-active service instances, the program instructions, when read and executed by a processing system, direct the processing system to: determining connection information about a connection established with a service instance operating in an active-active configuration, wherein the connection information identifies a connection initiation direction of the connection and identifies a peer of the connection; determining, based on the connection information, a subset of the connections for reestablishment on a per peer basis using direction-dependent criteria; as well as The subset of the connections is terminated.
