CN110704158A - Method, apparatus and storage medium for forwarding access requests within a container cluster - Google Patents

Method, apparatus and storage medium for forwarding access requests within a container cluster Download PDF

Info

Publication number
CN110704158A
CN110704158A CN201910900476.3A CN201910900476A CN110704158A CN 110704158 A CN110704158 A CN 110704158A CN 201910900476 A CN201910900476 A CN 201910900476A CN 110704158 A CN110704158 A CN 110704158A
Authority
CN
China
Prior art keywords
container
access request
service
program component
access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910900476.3A
Other languages
Chinese (zh)
Inventor
李佶澳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fanpu Digital Technology Co Ltd
Original Assignee
Fanpu Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fanpu Digital Technology Co Ltd filed Critical Fanpu Digital Technology Co Ltd
Priority to CN201910900476.3A priority Critical patent/CN110704158A/en
Publication of CN110704158A publication Critical patent/CN110704158A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/329Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Abstract

A method, apparatus, and storage medium for forwarding an access request within a container cluster are disclosed. Wherein, the method comprises the following steps: receiving an access request for accessing a service in a second container from a first container through a program component based on seven-layer load balancing preset in a container cluster, wherein the first container and the second container are both containers arranged in the container cluster, and the access request comprises access information based on an application layer protocol and associated with the service; determining, by the program component, address information of the second container within the container cluster based on the access information; and sending, by the program component, the access request to the second container according to the address information. Therefore, through the seven-layer load balancing program component (such as an Ingress component), the request access in the container cluster is more systematic and convenient to consult, and the seven-layer application layer protocol can be identified and forwarded through the protocol content.

Description

Method, apparatus and storage medium for forwarding access requests within a container cluster
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method, an apparatus, and a storage medium for forwarding an access request in a container cluster.
Background
At present, container clusters are increasingly in common use. For example, Kubernetes is a container-centric cluster management system that combines multiple containers into one Service, where the containers are accessible to each other.
Referring to fig. 2, in the existing container cluster, an access request is forwarded, and when a container accesses Service, the IP address of Service is used and iptables forwarding rules are set on each server. However, the container uses the IP address of the Service when accessing the Service, because the requesting party and the requested party are both multiple containers, which are in a many-to-many relationship, and the containers are randomly distributed on different host servers, the requests in the cluster are interlaced into a mesh, and the request logs are dispersed in the multiple containers, so that the containers are difficult to refer to. And the destination address of the request message is modified by an iptables rule, the 7-layer application protocol cannot be identified, the request message cannot be forwarded according to the protocol content, and no forwarding log exists.
In order to solve the technical problems that when an access request is forwarded in a container cluster in the prior art, request logs are dispersed in a plurality of containers, so that the containers are difficult to look up, 7-layer application protocols cannot be identified, forwarding cannot be performed according to protocol contents, and no forwarding log exists, an effective solution is not provided at present.
Disclosure of Invention
Embodiments of the present disclosure provide a method, an apparatus, and a storage medium for forwarding an access request in a container cluster, so as to at least solve technical problems that when an access request is forwarded in a container cluster in the prior art, request logs are dispersed in a plurality of containers, so that the containers are difficult to refer to, a 7-layer application protocol cannot be identified, forwarding cannot be performed according to protocol content, and no forwarding log exists.
According to an aspect of the embodiments of the present disclosure, there is provided a method for forwarding an access request in a container cluster, including: and receiving an access request for accessing the service in the second container from the first container through a program component based on seven-layer load balancing preset in the container cluster. The first container and the second container are both containers disposed within the container cluster, and the access request includes application layer protocol-based access information associated with the service; determining, by the program component, address information of the second container within the container cluster based on the access information; and sending, by a program component, an access request to the second container according to the address information.
According to another aspect of the embodiments of the present disclosure, there is also provided a storage medium including a stored program, wherein the method of any one of the above is performed by a processor when the program is executed.
There is further provided, in accordance with another aspect of the disclosed embodiments, an apparatus for forwarding an access request within a container cluster, including: a receiving module, configured to receive, from a first container, an access request for accessing a service in a second container through a program component based on seven-layer load balancing preset in a container cluster, where the first container and the second container are both containers set in the container cluster, and the access request includes access information based on an application layer protocol associated with the service; the determining module is used for determining the address information of the second container in the container cluster according to the access information through the program component; and the first sending module is used for sending the access request to the second container according to the address information through the program component.
There is further provided, in accordance with another aspect of the disclosed embodiments, an apparatus for forwarding an access request within a container cluster, including: a processor; and a memory coupled to the processor for providing instructions to the processor for processing the following processing steps: receiving an access request for accessing a service in a second container from a first container through a program component based on seven-layer load balancing preset in a container cluster, wherein the first container and the second container are both containers arranged in the container cluster, and the access request comprises access information based on an application layer protocol and associated with the service; determining, by the program component, address information of the second container within the container cluster based on the access information; and sending, by the program component, the access request to the second container according to the address information.
In the embodiment of the present disclosure, an access request of a requesting container to a requested container is received through a seven-layer load balancing program component (e.g., Ingress component), and the program component determines address information of the requested container in a container cluster according to the access request information and sends the access request to the requested container according to the address information. Therefore, through the seven-layer load balancing program assembly, the request access in the container cluster is more systematic and convenient to look up, and the seven-layer application layer protocol can be identified and forwarded through the protocol content. And the technical problems that when the access request is forwarded in the container cluster in the prior art, the request logs are dispersed in a plurality of containers, so that the containers are difficult to look up, 7-layer application protocols cannot be identified, forwarding cannot be performed according to the protocol content, and no forwarding logs exist are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the disclosure and together with the description serve to explain the disclosure and not to limit the disclosure. In the drawings:
fig. 1 is a block diagram of a hardware structure of a computer terminal for implementing the method according to embodiment 1 of the present disclosure;
FIG. 2 is a diagram of forwarding an access request within a prior art container cluster, according to the background art;
fig. 3 is a schematic diagram of a method for forwarding an access request in a container cluster according to a first aspect of embodiment 1 of the present disclosure;
fig. 4 is a schematic flow chart of a method for forwarding an access request in a container cluster according to a first aspect of embodiment 1 of the present disclosure;
fig. 5 is a schematic diagram of an apparatus for forwarding an access request in a container cluster according to embodiment 2 of the present disclosure; and
fig. 6 is a schematic diagram of an apparatus for forwarding an access request in a container cluster according to embodiment 3 of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure. It is to be understood that the described embodiments are merely exemplary of some, and not all, of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
There is also provided, in accordance with the present embodiment, an embodiment of a method for forwarding an access request within a container cluster, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
The method embodiments provided by the present embodiment may be executed in a server or similar computing device. FIG. 1 illustrates a block diagram of a hardware architecture of a computing device for implementing a method of forwarding access requests within a cluster of containers. As shown in fig. 1, the computing device may include one or more processors (which may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory for storing data, and a transmission device for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic device. For example, the computing device may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuitry may be a single, stand-alone processing module, or incorporated in whole or in part into any of the other elements in the computing device. As referred to in the disclosed embodiments, the data processing circuit acts as a processor control (e.g., selection of a variable resistance termination path connected to the interface).
The memory may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to forwarding access requests in the container cluster in the embodiments of the present disclosure, and the processor executes various functional applications and data processing by executing the software programs and modules stored in the memory, that is, implementing the method for forwarding access requests in the container cluster of the application program described above. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory located remotely from the processor, which may be connected to the computing device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used for receiving or transmitting data via a network. Specific examples of such networks may include wireless networks provided by communication providers of the computing devices. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the computing device.
It should be noted here that in some alternative embodiments, the computing device shown in fig. 1 described above may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that FIG. 1 is only one example of a particular specific example and is intended to illustrate the types of components that may be present in a computing device as described above.
Fig. 3 is a schematic diagram of forwarding an access request in a container cluster according to the present embodiment. Referring to fig. 3, the system includes: a program component based on seven-layer load balancing (e.g., Ingress component), a log collection system, container 1, container 2, container 3, container a, container B, and container C. Wherein container 2 and container 3 are combined into one service and container B and container C are combined into one service. In the above operating environment, according to a first aspect of the present embodiment, a method for forwarding an access request within a container cluster is provided. Fig. 4 shows a flow diagram of the method, which, with reference to fig. 4, comprises:
s402: receiving an access request for accessing a service in a second container from a first container through a program component based on seven-layer load balancing preset in a container cluster, wherein the first container and the second container are both containers arranged in the container cluster, and the access request comprises access information based on an application layer protocol and associated with the service;
s404: determining, by the program component, address information of the second container within the container cluster based on the access information; and
s406: sending, by the program component, the access request to the second container according to the address information.
As described in the background section above with reference to fig. 2, an access request is forwarded in an existing container cluster, and the container accesses the Service using the IP address of the Service and setting iptables forwarding rules on each server. However, the container uses the IP address of the Service when accessing the Service, because the requesting party and the requested party are both multiple containers, which are in a many-to-many relationship, and the containers are randomly distributed on different host servers, the requests in the cluster are interlaced into a mesh, and the request logs are dispersed in the multiple containers, so that the containers are difficult to refer to. And the destination address of the request message is modified by an iptables rule, the 7-layer application protocol cannot be identified, the request message cannot be forwarded according to the protocol content, and no forwarding log exists.
In view of the above problems in the background art, the present embodiment provides a method for forwarding an access request in a container cluster, as shown in fig. 3. In the container cluster, the container 2 and the container 3 are combined into one service, and the container B and the container C are combined into one service, and a program component based on seven-layer load balancing (for example, the program component may be an Ingress component) is preset in the container cluster. Wherein the seven-layer load balancing is a type of load balancing divided by network level OSI.
First, when a first container (e.g., container 1 or container a) needs to access a service within a second container (e.g., the service may be a service provided in container 2), an access request may be sent to the program component. Wherein the access request includes access information corresponding to the service. Wherein the access information is access information of a layer 7 protocol, such as a domain name, a URL link address, or other path.
The program component then receives the access request (S402) and determines address information for the second container in the container cluster from the access information in the access request (S404). For example, the program component may resolve the domain name in the access request to obtain the address information of container 2 in the container cluster.
Finally, the program component may send an access request to a second container (e.g., container 2) based on the determined address information.
In this way, the technical solution of this example receives an access request from a requesting container to a requested container through a seven-layer load-balanced program component (e.g., Ingress component), and the program component determines address information of the requested container in the container cluster according to the access request information and sends the access request to the requested container according to the address information. Therefore, through the seven-layer load balancing program assembly, the request access in the container cluster is more systematic and convenient to look up, and the seven-layer application layer protocol can be identified and forwarded through the protocol content. And the technical problems that when the access request is forwarded in the container cluster in the prior art, the request logs are dispersed in a plurality of containers, so that the containers are difficult to look up, 7-layer application protocols cannot be identified, forwarding cannot be performed according to protocol contents, and no forwarding logs exist are solved.
Optionally, the access information comprises at least one of: a domain name of the service, a link address of the service, and an access path of the service.
Specifically, the request for access information includes at least one of: the domain name of the request service, the link address of the request service, the access PATH of the request service, and the like. The program component thus finds the address information of the requested party's container from this information in order to send the request to the requested party's container.
Optionally, the method further comprises: a log associated with the access request is recorded by the program component.
Specifically, the program component finds the address information of the container of the requested party by accessing the information while recording a log for the request. So that the corresponding request can be subsequently queried through this log.
Optionally, the method further comprises: and sending the recorded log to a preset log collection system through a program component.
Specifically, after a program component records a log for a request, the log is sent to a log collection system. So that request records inside the cluster can be viewed in the log collection system.
Further, referring to fig. 1, according to a second aspect of the present embodiment, a storage medium 104 is provided. The storage medium 104 comprises a stored program, wherein the method of any of the above is performed by a processor when the program is run.
Thus, according to the present embodiment, an access request from a requesting container to a requested container is received by a seven-layer load-balancing program component (e.g., Ingress component), and the program component determines address information of the requested container in the container cluster according to the access request information and sends the access request to the requested container according to the address information. Therefore, through the seven-layer load balancing program assembly, the request access in the container cluster is more systematic and convenient to look up, and the seven-layer application layer protocol can be identified and forwarded through the protocol content. Furthermore, the problem that when an access request is forwarded in a container cluster in the prior art, the request in the cluster is interlaced into a mesh by using the IP address of the Service when the container accesses the Service, and request logs are dispersed in a plurality of containers, so that the containers are difficult to refer is solved. And the destination address of the request message is modified by an iptables rule, the 7-layer application protocol cannot be identified, the request message cannot be forwarded according to the protocol content, and the technical problem of no forwarding log exists.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
Fig. 5 shows an arrangement 500 for forwarding an access request within a container cluster according to the present embodiment, which arrangement 500 corresponds to the method according to the first aspect of embodiment 1. Referring to fig. 5, the apparatus 500 includes: a receiving module 510, configured to receive, from a first container, an access request for accessing a service in a second container through a program component based on seven-layer load balancing preset in a container cluster, where the first container and the second container are both containers set in the container cluster, and the access request includes access information based on an application layer protocol associated with the service; a determining module 520, configured to determine, by the program component, address information of the second container in the container cluster according to the access information; and a first sending module 530 for sending the access request to the second container according to the address information by the program component.
Optionally, the access information comprises at least one of: a domain name of the service, a link address of the service, and an access path of the service.
Optionally, the apparatus 500 further comprises: and the recording module is used for recording a log related to the access request through the program component.
Optionally, the apparatus 500 further comprises: and the second sending module is used for sending the recorded log to a preset log collection system through the program component.
Thus, according to the present embodiment, a program component (e.g., Ingress component) with seven-layer load balancing receives an access request from a requesting container to a requested container, and the program component determines address information of the requested container in the container cluster according to the access request information and sends the access request to the requested container according to the address information, through the apparatus 500. Therefore, through the seven-layer load balancing program assembly, the request access in the container cluster is more systematic and convenient to look up, and the seven-layer application layer protocol can be identified and forwarded through the protocol content. Furthermore, the problem that when an access request is forwarded in a container cluster in the prior art, the request in the cluster is interlaced into a mesh by using the IP address of the Service when the container accesses the Service, and request logs are dispersed in a plurality of containers, so that the containers are difficult to refer is solved. And the destination address of the request message is modified by an iptables rule, the 7-layer application protocol cannot be identified, the request message cannot be forwarded according to the protocol content, and the technical problem of no forwarding log exists.
Example 3
Fig. 6 shows an apparatus 600 for forwarding an access request within a container cluster according to the present embodiment, the apparatus 600 corresponding to the method according to the first aspect of embodiment 1. Referring to fig. 6, the apparatus 600 includes: a processor 610; and a memory 620 coupled to the processor 610 for providing instructions to the processor 610 to process the following processing steps: receiving an access request for accessing a service in a second container from a first container through a program component based on seven-layer load balancing preset in a container cluster, wherein the first container and the second container are both containers arranged in the container cluster, and the access request comprises access information based on an application layer protocol and associated with the service; determining, by the program component, address information of the second container within the container cluster based on the access information; and sending, by the program component, the access request to the second container according to the address information.
Optionally, the access information comprises at least one of: a domain name of the service, a link address of the service, and an access path of the service.
Optionally, the apparatus 600 further comprises: a log associated with the access request is recorded by the program component.
Optionally, the apparatus 600 further comprises: and sending the recorded log to a preset log collection system through a program component.
Thus, according to the present embodiment, with the apparatus 600, an access request from a requesting container to a requested container is received by using a seven-layer load balancing program component (e.g., Ingress component), the program component determines address information of the requested container in the container cluster according to the access request information, and sends the access request to the requested container according to the address information. Therefore, through the seven-layer load balancing program assembly, the request access in the container cluster is more systematic and convenient to look up, and the seven-layer application layer protocol can be identified and forwarded through the protocol content. Furthermore, the problem that when an access request is forwarded in a container cluster in the prior art, the request in the cluster is interlaced into a mesh by using the IP address of the Service when the container accesses the Service, and request logs are dispersed in a plurality of containers, so that the containers are difficult to refer is solved. And the destination address of the request message is modified by an iptables rule, the 7-layer application protocol cannot be identified, the request message cannot be forwarded according to the protocol content, and the technical problem of no forwarding log exists.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for forwarding an access request within a container cluster, comprising:
receiving, by a program component based on seven-layer load balancing preset in a container cluster, an access request for accessing a service in a second container from a first container, wherein the first container and the second container are both containers set in the container cluster, and the access request includes access information based on an application layer protocol associated with the service;
determining, by the program component, address information of the second container within the container cluster from the access information; and
and sending the access request to the second container according to the address information through the program component.
2. The method of claim 1, wherein the access information comprises at least one of: a domain name of the service, a link address of the service, and an access path of the service.
3. The method of claim 1, further comprising: logging, by the program component, the log associated with the access request.
4. The method of claim 3, further comprising: and sending the recorded log to a preset log collection system through the program component.
5. A storage medium comprising a stored program, wherein the method of any one of claims 1 to 4 is performed by a processor when the program is run.
6. An apparatus for forwarding an access request within a container cluster, comprising:
a receiving module, configured to receive, from a first container, an access request for accessing a service in a second container through a program component based on seven-layer load balancing preset in a container cluster, where the first container and the second container are both containers set in the container cluster, and the access request includes access information based on an application layer protocol associated with the service;
a determining module, configured to determine, by the program component, address information of the second container in the container cluster according to the access information; and
and the first sending module is used for sending the access request to the second container according to the address information through the program component.
7. The apparatus of claim 6, wherein the access information comprises at least one of: a domain name of the service, a link address of the service, and an access path of the service.
8. The apparatus of claim 6, further comprising: a logging module to log, by the program component, the log associated with the access request.
9. The apparatus of claim 8, further comprising: and the second sending module is used for sending the recorded log to a preset log collection system through the program component.
10. An apparatus for forwarding an access request within a container cluster, comprising:
a processor; and
a memory coupled to the processor for providing instructions to the processor for processing the following processing steps:
receiving, by a program component based on seven-layer load balancing preset in a container cluster, an access request for accessing a service in a second container from a first container, wherein the first container and the second container are both containers set in the container cluster, and the access request includes access information based on an application layer protocol associated with the service;
determining, by the program component, address information of the second container within the container cluster from the access information; and
and sending the access request to the second container according to the address information through the program component.
CN201910900476.3A 2019-09-23 2019-09-23 Method, apparatus and storage medium for forwarding access requests within a container cluster Pending CN110704158A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910900476.3A CN110704158A (en) 2019-09-23 2019-09-23 Method, apparatus and storage medium for forwarding access requests within a container cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910900476.3A CN110704158A (en) 2019-09-23 2019-09-23 Method, apparatus and storage medium for forwarding access requests within a container cluster

Publications (1)

Publication Number Publication Date
CN110704158A true CN110704158A (en) 2020-01-17

Family

ID=69196278

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910900476.3A Pending CN110704158A (en) 2019-09-23 2019-09-23 Method, apparatus and storage medium for forwarding access requests within a container cluster

Country Status (1)

Country Link
CN (1) CN110704158A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112882792A (en) * 2021-02-03 2021-06-01 天津五八到家货运服务有限公司 Information loading method, computer device and storage medium
CN112995273A (en) * 2021-01-28 2021-06-18 腾讯科技(深圳)有限公司 Network call-through scheme generation method and device, computer equipment and storage medium
CN114244891A (en) * 2021-12-22 2022-03-25 北京天融信网络安全技术有限公司 Inter-container communication method and device, electronic equipment and storage medium
WO2023125755A1 (en) * 2021-12-30 2023-07-06 天翼物联科技有限公司 Service request processing method and apparatus based on large-scale cluster, and device and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108039975A (en) * 2017-12-21 2018-05-15 北京搜狐新媒体信息技术有限公司 Container cluster management system and its application process
CN108551488A (en) * 2018-05-03 2018-09-18 山东汇贸电子口岸有限公司 Distributed container cluster load balancing method based on domestic CPU and OS
CN108810013A (en) * 2018-07-02 2018-11-13 山东汇贸电子口岸有限公司 A kind of service access method based on container
CN109150616A (en) * 2018-09-03 2019-01-04 成都嗨翻屋科技有限公司 A kind of Intelligent gateway and its working method that can increase https entrance automatically
US10250677B1 (en) * 2018-05-02 2019-04-02 Cyberark Software Ltd. Decentralized network address control
CN110266789A (en) * 2019-06-13 2019-09-20 四川长虹电器股份有限公司 A method of improving the WEB ability of Kubernetes

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108039975A (en) * 2017-12-21 2018-05-15 北京搜狐新媒体信息技术有限公司 Container cluster management system and its application process
US10250677B1 (en) * 2018-05-02 2019-04-02 Cyberark Software Ltd. Decentralized network address control
CN108551488A (en) * 2018-05-03 2018-09-18 山东汇贸电子口岸有限公司 Distributed container cluster load balancing method based on domestic CPU and OS
CN108810013A (en) * 2018-07-02 2018-11-13 山东汇贸电子口岸有限公司 A kind of service access method based on container
CN109150616A (en) * 2018-09-03 2019-01-04 成都嗨翻屋科技有限公司 A kind of Intelligent gateway and its working method that can increase https entrance automatically
CN110266789A (en) * 2019-06-13 2019-09-20 四川长虹电器股份有限公司 A method of improving the WEB ability of Kubernetes

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
OOPS: "Ingress 访问日志分析与监控", 《HTTPS://WWW.CNBLOGS.COM/WEIFENG1463/P/11423081.HTML》 *
云端密码: "一篇文章为你图解kubernetes网络通信原理", 《HTTPS://ZHUANLAN.ZHIHU.COM/P/81667781》 *
李探花: "Kubernetes 1.2 新功能介绍:Ingress 原理及实例", 《WWW.DOCKERINFO.NET/1132.HTML》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112995273A (en) * 2021-01-28 2021-06-18 腾讯科技(深圳)有限公司 Network call-through scheme generation method and device, computer equipment and storage medium
CN112995273B (en) * 2021-01-28 2022-03-04 腾讯科技(深圳)有限公司 Network call-through scheme generation method and device, computer equipment and storage medium
CN112882792A (en) * 2021-02-03 2021-06-01 天津五八到家货运服务有限公司 Information loading method, computer device and storage medium
CN114244891A (en) * 2021-12-22 2022-03-25 北京天融信网络安全技术有限公司 Inter-container communication method and device, electronic equipment and storage medium
CN114244891B (en) * 2021-12-22 2024-01-23 北京天融信网络安全技术有限公司 Communication method and device between containers, electronic equipment and storage medium
WO2023125755A1 (en) * 2021-12-30 2023-07-06 天翼物联科技有限公司 Service request processing method and apparatus based on large-scale cluster, and device and medium

Similar Documents

Publication Publication Date Title
CN110704158A (en) Method, apparatus and storage medium for forwarding access requests within a container cluster
CN105376107B (en) Terminal testing method and proxy server
EP2933986B1 (en) Computer-implemented method and computer program product for processing named entity queries using a cached functionality in a domain name system
CN105227602A (en) A kind of method of load balancing, client, registrar and system
CN106412680B (en) Multi-screen control method and device
CN111786998A (en) Authority management method and device based on micro-service calling and storage medium
CN110688146A (en) Method, device and storage medium for dynamically configuring monitoring system
US11025738B2 (en) Systems and methods for determining a destination location for transmission of packetized data in a network system based on an application server attribute
US20130318173A1 (en) Automatically replacing localhost as hostname in url with fully qualified domain name or ip address
US10785058B2 (en) Managing network packet flows based on device information
CN101809950A (en) Method and apparatus for performing load balancing for a control plane of a mobile communication network
CA2770391C (en) System and method for sharing a payload among multiple homed networks
CN112995247A (en) Method, device and system for transmitting or processing data
CN114025009B (en) Method, system, proxy server and device for forwarding request
US11405293B2 (en) System and method for managing IT asset inventories using low power, short range network technologies
CN104702634A (en) Method, device and system for processing data operation request
CN111130820A (en) Cluster management method and device and computer system
CN114301989A (en) Information transmission method, device and system
CN114048028A (en) Service calling method and device, storage medium and electronic equipment
CN113312159A (en) Processing method and device for load balancing of Kubernetes cluster and storage medium
CN112637040B (en) Method, apparatus and storage medium for distributing information based on priority
CN110289979B (en) Bridge and network management method
CN111866100A (en) Method, device and system for controlling data transmission rate
CN112486583A (en) System, method, apparatus and storage medium for configuring parameters
CN112311904A (en) Method, device, storage medium and domain name management system for updating domain name record

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200117

RJ01 Rejection of invention patent application after publication