Implementing a service mesh in the hypervisor
AssigneeRed Hat, Inc.
InventorsMichael Tsirkin, Francisco Javier Martinez Canillas, Alberto Carlos Ruiz Ruiz
Life of this patent
Estimating the term…
Abstract
A packet is received by a hypervisor from a first container, the packet to be provided to a second container, the packet including a header including a first network address associated with the second container. A network policy is identified for the packet in view of the first network address. A second network address corresponding to the second container is determined in view of the network policy. A network address translation is performed by the hypervisor to modify the header of the packet to include the second network address corresponding to the second container.
Claims15
A method comprising:
- receiving, by a processing device executing a hypervisor, a packet from a first container, wherein the packet comprises a header including a first network address associated with a second container having a current location at a second network address, and wherein the first container and the second container reside within a same virtual machine;
- identifying, by the hypervisor, a network policy comprising a mapping between the first network address and the second network address;
- performing, by the hypervisor and based on the network policy, a network address translation to modify the header of the packet to include the second network address corresponding to the second container;
- and
- in response to the second container moving to a new location at a third network address, modifying the network policy to map the first network address to the third network address,
- wherein identifying the network policy comprises identifying the network policy from a plurality of network policies, each of the plurality of network policies having a corresponding network address, and
- wherein the network policy indicates a threshold number of times the packet is to be subsequently provided to the second container.
A system comprising:
- a memory;
- and
- a processing device, operatively coupled to the memory, to:
- receive, by a hypervisor, a packet from a first container, wherein the packet comprises a header including a first network address associated with a second container having a current location at a second network address, and wherein the first container and the second container reside within a same virtual machine;
- identify, by the hypervisor, a network policy comprising a mapping between the first network address and the second network address;
- perform, by the hypervisor and based on the network policy, a network address translation to modify the header of the packet to include the second network address corresponding to the second container;
- and
- in response to the second container moving to a new location at a third network address, modify the network policy to map the first network address to the third network address,
- wherein, to identify the network policy, the processing device is to identify a plurality of network policies, each of the plurality of network policies having a corresponding network address, and
- wherein the network policy indicates a threshold number of times the packet is to be subsequently provided to the second container.
A non-transitory computer-readable storage medium including instructions that, when executed by a processing device, cause the processing device to:
- receive, by a hypervisor, a packet from a first container, wherein the packet comprises a header including a first network address associated with a second container having a current location at a second network address, and wherein the first container and the second container reside within a same virtual machine;
- identify, by the hypervisor, a network policy comprising a mapping between the first network address and the second network address;
- perform, by the processing device running the hypervisor and based on the network policy, a network address translation to modify the header for the packet to include the second network address;
- and
- in response to the second container moving to a new location at a third network address, modify the network policy to map the first network address to the third network address,
- wherein, to identify the network policy, the instructions cause the processing device to identify a plurality of network policies, each of the plurality of network policies having a corresponding network address, and
- wherein the network policy indicates a threshold number of times the packet is to be subsequently provided to the second container.
Dependencies are inferred from the claim text.