# US 2020/0403931 A1 · Load balancing stateful sessions using dns-based affinity

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0403931 A1
- Document ID: US20200403931A1
- Status: Published application
- Kind: A1
- Application number: 16/708,259
- Filed: 2019-12-09
- Published: 2020-12-24
- Earliest claimed: 2019-06-18
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Abhishek AGARWAL; Mohit GARG; Sandeep BANSAL; Ashish JAIN
- Web page: https://patentgrep.com/patent/US20200403931A1

## CPC

- H04L 47/125: by balancing the load, e.g. traffic engineering
- H04L 47/726: Reserving resources in multiple paths to be used simultaneously (by balancing the load H04L47/125)
- H04L 9/0643: {Hash functions, e.g. MD5, SHA, HMAC or f9 MAC}
- H04L 45/34: {Source routing}
- H04L 47/781: {Centralised allocation of resources}
- H04L 47/808: {User-type aware}
- H04L 61/4511: using domain name system [DNS]
- H04L 67/1001: for accessing one among a plurality of replicated servers
- H04L 67/1012: based on compliance of requirements or conditions with available server resources
- H04L 67/1027: Persistence of sessions during load balancing
- H04L 67/1097: for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The present disclosure relates to systems, methods, and computer-readable media for managing routing of traffic between clients and resource instances when providing stateful services. For example, systems disclosed herein involve a load balancer that routes probe request(s) from clients to corresponding resource instances having access to stateful session data for a stateful session between the resource instance(s) and corresponding client(s). The resource instances may provide instance identifiers to the clients for use in generating subsequent session calls. In this way, systems described herein ensure that subsequent session calls are passed to the correct resource instances having access to relevant session information.

## Claims

### Claim 1

A method, comprising:
associating an instance-specific domain name system (DNS) entry to a resource instance on a cloud computing system;
receiving, at the resource instance, a probe request originating from a client of the cloud computing system and provided via a load balancer, the probe request including a request to initiate a stateful session with the resource instance;
storing stateful session information associated with the stateful session on a local storage accessible to the resource instance;
providing, to the client, a probe response including the instance-specific DNS entry associated with the resource instance; and
receiving one or more session calls from the client, wherein each of the one or more session calls are addressed to the instance-specific DNS entry without being routed via the load balancer.

### Claim 2 (depends on 1)

The method of claim 1, wherein the resource instance includes a virtual machine or a container deployed on the cloud computing system.

### Claim 3 (depends on 1)

The method of claim 1, wherein the load balancer is associated with a plurality of resource instances, and wherein the resource instance is selected from the plurality of resource instances based on a routing algorithm employed by the load balancer.

### Claim 4 (depends on 3)

The method of claim 3, wherein the load balancer includes an L3/L4 load balancer configured to route calls received from a plurality of client devices to a given resource instance from the plurality of resource instances in accordance with the routing algorithm.

### Claim 5 (depends on 4)

The method of claim 4, wherein the load balancer routes calls based on 5-tuple hashing protocol including identifiers for a source address, a source port, a destination address, a destination port, and a protocol.

### Claim 6 (depends on 1)

The method of claim 1, wherein the resource instance is associated with a service DNS entry assigned to the load balancer.

### Claim 7 (depends on 6)

The method of claim 6, wherein the resource instance is selected from a plurality of resource instances associated with the load balancer, and wherein each resource instance from the plurality of resource instances is associated with a unique instance-specific DNS entry.

### Claim 8 (depends on 1)

The method of claim 1, wherein the probe response additionally includes metadata associated with the stateful session to enable the client to locally pin the stateful session to the resource instance.

### Claim 9

A method, comprising:
transmitting, from a client device, a probe request to a load balancer to be routed to a resource instance from a plurality of resource instances associated with the load balancer;
receiving, from the resource instance, a probe response, wherein the probe response includes an instance-specific domain name system (DNS) entry assigned to the resource instance;
associating the instance-specific DNS entry assigned to the resource instance with a stateful session between the client device and the resource instance; and
transmitting one or more session calls to the resource instance associated with the instance-specific DNS entry without providing the one or more session calls to the load balancer.

### Claim 10 (depends on 9)

The method of claim 9, wherein the resource instance includes a virtual machine or a contained deployed on a computing node on a cloud computing system.

### Claim 11 (depends on 9)

The method of claim 9, wherein the load balancer includes an L3/L4 load balancer configured to route calls received from a plurality of client devices to a given resource instance from the plurality of resource instances in accordance with a routing algorithm, and wherein the resource instance is selected by the L3/L4 load balancer based on an availability of computing resources of the resource instance.

### Claim 12 (depends on 9)

The method of claim 9, wherein the resource instance is associated with a service DNS entry assigned to the load balancer.

### Claim 13 (depends on 12)

The method of claim 12, wherein each resource instance from the plurality of resource instances is associated with a unique instance-specific DNS entry.

### Claim 14 (depends on 12)

The method of claim 12,
wherein transmitting the probe request comprises addressing the probe request to an internet protocol (IP) address associated with the load balancer; and
wherein transmitting the one or more session calls to the resource instance comprises addressing the one or more session calls to the instance-specific DNS entry associated with the resource instance.

### Claim 15 (depends on 9)

The method of claim 9, wherein associating the instance-specific DNS entry with the stateful session comprises pinning the instance-specific DNS entry to the stateful session on a local storage of the client device.

### Claim 16 (depends on 9)

The method of claim 9, further comprising:
determining that the resource instance has failed;
in response to determining that the resource instance has failed, transmitting an additional probe request to the load balancer to be routed to an additional resource instance from the plurality of resource instances; and
receiving, from the additional resource instance, an additional probe response, wherein the additional probe response includes an additional instance-specific DNS entry corresponding to the additional resource instance for initiating a new stateful session.

### Claim 17

A system, comprising:
one or more processors;
a memory in electronic communication with the one or more processors; and instructions stored in the memory, the instructions being executable by the one or more processors to:
associate an instance-specific domain name system (DNS) entry to a resource instance on a cloud computing system;
receive, at the resource instance, a probe request originating from a client of the cloud computing system and provided via a load balancer, the probe request including a request to initiate a stateful session with the resource instance;
store stateful session information associated with the stateful session on a local storage accessible to the resource instance;
provide, to the client, a probe response including the instance-specific DNS entry associated with the resource instance; and
receive one or more session calls from the client, wherein each of the one or more session calls are addressed to the instance-specific DNS entry without being routed via the load balancer.

### Claim 18 (depends on 17)

The system of claim 17, wherein the load balancer is associated with a plurality of resource instances, and wherein the load balancer includes an L3/L4 load balancer that selects the resource instance from the plurality of resources instances in accordance with a routing algorithm.

### Claim 19 (depends on 18)

The system of claim 18, wherein the load balancer routes calls based on 5-tuple hashing protocol including identifiers for a source address, a source port, a destination address, a destination port, and a protocol.

### Claim 20 (depends on 17)

The system of claim 17, wherein each resource instance of the plurality of resource instances is associated with a unique instance-specific DNS entry, and wherein the one or more session calls from the client are addressed to the resource instance via the instance-specific DNS entry corresponding to the resource instance.
