CN118075182A - Flow recording method, device, equipment and medium in multi-tenant mode - Google Patents

Flow recording method, device, equipment and medium in multi-tenant mode Download PDF

Info

Publication number
CN118075182A
CN118075182A CN202410355624.9A CN202410355624A CN118075182A CN 118075182 A CN118075182 A CN 118075182A CN 202410355624 A CN202410355624 A CN 202410355624A CN 118075182 A CN118075182 A CN 118075182A
Authority
CN
China
Prior art keywords
tenant
recording
list
flow
configuration information
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
CN202410355624.9A
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.)
Zhoupu Data Technology Nanjing Co ltd
Original Assignee
Zhoupu Data Technology Nanjing 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 Zhoupu Data Technology Nanjing Co ltd filed Critical Zhoupu Data Technology Nanjing Co ltd
Priority to CN202410355624.9A priority Critical patent/CN118075182A/en
Publication of CN118075182A publication Critical patent/CN118075182A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a flow recording method, device, equipment and medium in a multi-tenant mode. The method comprises the following steps: after being awakened by the daemon of the minimum scheduling unit, configuration information is acquired from a configuration center, wherein the configuration information comprises a recording switch, recording time and a tenant ID list of a flow recording program; controlling the flow recording program according to the configuration information; and after waiting for the preset time to be awakened again by the daemon, returning to execute the acquisition of the configuration information from the configuration center. The embodiment of the invention can effectively control the recording time and the recording tenant of the flow recording program.

Description

Flow recording method, device, equipment and medium in multi-tenant mode
Technical Field
The present invention relates to the field of traffic recording technologies, and in particular, to a method, an apparatus, a device, and a medium for recording traffic in a multi-tenant mode.
Background
When the system performs great reconstruction or issues new functions, various flow data on the line are needed to be simulated in the online environment to test the new system so as to evaluate the bearing capacity of the new system in advance. The difficulty in simulating the on-line flow is high, and particularly, the abnormal flow of each color mixed in the normal flow is simulated. Therefore, the real application flow recorded on line can be directly stored, and then the simulation test can be carried out on the new system by using the real application flow. In a system running in an open source container orchestration platform (Kubernetes) cluster, conventional solutions cannot record application traffic of a minimized deployment unit (pod) inside a service application resource deployment, and thus require installation of specialized network packet-grabbing tools, such as Weave Scope, cilium, etc. These tools may help monitor network traffic throughout the cluster and provide a visual interface to view traffic data. Or may enter the Pod through kubectl exec and capture traffic inside the Pod using Tcpdump, etc. However, in a multi-tenant mode of a software operation service (Saas) system, it is not necessary to record application traffic of all tenants in the Saas system, which results in that these recording schemes are limited and cannot be used.
The open source technical scheme go-replay can record the pod flow running in the Kubernetes, but cannot realize dynamic crawling of the flow of specified tenants based on the Kubernetes cluster. One solution is to run Gor command traffic collection in Sidecar mode in the container orchestration of the development resources, and to record the traffic of the designated tenant that we want by configuring the application parameters required by the Gor command to run by the development resources.
However, once the traffic of different saas tenants is to be changed and recorded, the change can only be realized by changing the resource parameters above the depoyment. Changing the resource parameters will cause the service container to restart. The on-line traffic cannot be recorded in a specified time in a switching mode, and because the on-line traffic is recorded in a peak period of service, certain influence is sometimes caused on disk I/O and network consumption.
Disclosure of Invention
The invention provides a flow recording method, device, equipment and medium in a multi-tenant mode, which are used for effectively controlling the recording time of a flow recording program and recording tenants.
According to an aspect of the present invention, there is provided a traffic recording method in a multi-tenant mode, including:
After being awakened by the daemon of the minimum scheduling unit, configuration information is acquired from a configuration center, wherein the configuration information comprises a recording switch, recording time and a tenant ID list of a flow recording program;
controlling the flow recording program according to the configuration information;
and after waiting for the preset time to be awakened again by the daemon, returning to execute the acquisition of the configuration information from the configuration center.
According to another aspect of the present invention, there is provided a traffic recording apparatus in a multi-tenant mode, including:
The configuration acquisition module is used for acquiring configuration information from the configuration center after being awakened by the daemon of the minimum scheduling unit, wherein the configuration information comprises a recording switch, recording time and a tenant ID list of the flow recording program;
The program control module is used for controlling the flow recording program according to the configuration information;
and the wake-up waiting module is used for returning to execute the acquisition of the configuration information from the configuration center after waiting for the preset time to be woken up again by the daemon.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the method for recording traffic in a multi-tenant mode according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the method for recording traffic in a multi-tenant mode according to any one of the embodiments of the present invention when executed.
According to the embodiment of the invention, the recording switch, the recording time and the recording object of the flow recording program are dynamically controlled through the configuration information of the configuration center, so that the flow recording program can be effectively controlled to run in a specified time, and the application flow of a specified tenant can be recorded in different Pods.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for recording traffic in a multi-tenant mode according to an embodiment of the present invention;
Fig. 2A is a flowchart of a method for recording traffic in a multi-tenant mode according to still another embodiment of the present invention;
FIG. 2B is a schematic diagram of a agent workflow provided in accordance with yet another embodiment of the invention;
Fig. 3 is a schematic structural diagram of a flow recording method in a multi-tenant mode according to still another embodiment of the present invention;
Fig. 4 is a schematic structural diagram of an electronic device implementing an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented 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.
Before introducing the embodiments of the present invention, the application scenario and the inventive concept of the present invention will be briefly described:
the Saas system is that multiple tenants share the same pod to process data, each tenant has its own tenant ID, and multiple tenants process data on the same pod.
Because of the multi-tenant mode, the same pod traffic is recorded by the GO traffic recording program carried by the GO command, which results in an increase in system load and disk I/O, and thus, the business system is affected. Therefore, the number of the recorded saas tenants and the recording time need to be limited from the agent program
Fig. 1 is a flowchart of a flow recording method in a multi-tenant mode according to an embodiment of the present invention, where the method may be executed by a flow recording device in the multi-tenant mode, and the device may be implemented in hardware and/or software, and the device may be configured in an electronic device having corresponding data processing capability, such as an auxiliary container in a minimum scheduling unit, after a user provides configuration information to a configuration center. As shown in fig. 1, the method includes:
S110, after being awakened by the daemon of the minimum scheduling unit, the configuration information is acquired from the configuration center.
And S120, controlling the flow recording program according to the configuration information.
S130, after waiting for the preset time to be awakened again by the daemon, returning to execute the acquisition of the configuration information from the configuration center.
The configuration information comprises a recording switch, recording time and a tenant ID list of the flow recording program. The auxiliary container is Sidecar containers and is deployed in the minimum scheduling unit together with the service container. Pod is the smallest deployment unit in Kubernetes that encapsulates one or more tightly related containers that share the same storage, network, and lifecycle. The Sidecar containers are auxiliary containers matched with the main container (service container) in the same Pod. The main container is dedicated to business applications, while the Sidecar container provides auxiliary functions such as log collection, monitoring index collection, proxy, etc., and the Sidecar container mainly provides the auxiliary function of flow recording. The configuration information is manually initialized by the user to the configuration center, which may be subsequently manually modified by the user.
Specifically, the daemon runs all the time in Pod and is set to wake up the agent program of Sidecar containers once at regular preset time intervals (e.g., 1 minute). after the agent program is awakened by the daemon, the configuration information is loaded into the program memory from the configuration center.
According to the read configuration information, the agent program determines and executes the control mode of the flow recording program in the current control period, wherein the control mode comprises closing the flow recording program, opening the flow recording program, not modifying the flow recording program and the like. Because the control mode is determined according to the configuration information, and the configuration information is manually added to the configuration center by the user, the user only needs to simply modify the configuration information in the configuration center, and the agent program can correspondingly control the recording object/time of the flow recording program to generate corresponding change, so that the service container and sidecar container do not need to be restarted in the whole process.
After the control of the flow recording program is executed, the current control period is ended, the agent program enters a dormant state, and the daemon process wakes up the agent program again after a preset time. after the agent program wakes up again, a new control cycle starts. In the new control period, the agent program does not retrieve the configuration parameters from the configuration center along the configuration parameters of the previous control period, and repeats the above procedure.
According to the embodiment of the invention, the recording switch, the recording time and the recording object of the flow recording program are dynamically controlled through the configuration information of the configuration center, so that the flow recording program can be effectively controlled to run in a specified time, and the application flow of a specified tenant can be recorded in different Pods.
Fig. 2A is a flowchart of a flow recording method in a multi-tenant mode according to another embodiment of the present invention, where the embodiment is optimized and improved based on the foregoing embodiment. As shown in fig. 2A, the method includes:
S210, after being awakened by a daemon of a minimum scheduling unit, acquiring connection information of a configuration center from a local initialization configuration file; and acquiring configuration information from the configuration center according to the connection information.
The connection information comprises ip address information of configuration center information, authentication information and the like.
Specifically, connection information necessary for the agent program to connect to the configuration center is configured in advance in the local initialization configuration file (configmap), and the agent program is set to read the connection information from configmap. and the agent program establishes communication connection with the configuration center according to the connection information obtained by reading configmap, and obtains the configuration information from the communication connection.
S220, if the global recording switch and the application recording switch are in the on state, determining whether the current time is within the recording time; if the current time is not within the recording time, closing the flow recording program;
s230, if the global recording switch or the application recording switch is in a closed state, determining whether the flow recording program is running; and if the flow recording program is running, closing the flow recording program.
Specifically, as shown in fig. 2B, the agent program determines whether the global recording switch and the application recording switch are turned on, if one of them is not turned on, it determines whether the flow recording program is running, and if the flow recording program is in the running state, the agent program turns off the flow recording program, and the current control period ends, and the agent program enters the sleep state and waits to be awakened next time. If both are started, comparing the current time with the recording time specified in the configuration information, wherein the current time is not within the recording time, the current control period is ended, and the agent program enters a dormant state and waits to be awakened next time.
S240, if the current time is within the recording time, determining a target tenant ID list from an application tenant ID list and a global tenant ID list; performing ID legal check and list length check on the target tenant ID list;
S250, if the ID legal check and the list length check pass, waking up a flow recording program according to the target tenant ID list, and recording the flow through the flow recording program.
Specifically, with continued reference to fig. 2B, when the current time is the recording time, the switch and the recording object of the flow recording program need to be further determined according to the tenant ID list. One tenant ID list is selected from the tenant ID list and the global tenant ID list to serve as a target tenant ID list. And then, carrying out necessary ID legal check and list length check on the ID list of the target tenant, if one check fails, ending the current control period, and enabling the agent program to enter a dormant state to wait for being awakened next time. If both checks pass, the tenant corresponding to the tenant ID in the target tenant ID list is used as a recording object to wake up the flow recording program, and the application flow of the tenant is recorded by the flow recording program, and the recorded application flow can be stored for testing before the new system is on line.
Optionally, the determining the target tenant ID list from the application tenant ID list and the global tenant ID list includes:
determining whether the application tenant ID list is configured to be empty;
if the configuration of the application tenant ID list is not null, determining the application tenant ID list as a target tenant ID list;
And if the application tenant ID list is configured to be empty, determining the global tenant ID list as a target tenant ID list.
Specifically, when the distributed system is used for working in the multi-tenant mode and the application flow of a designated tenant in the distributed system is required to be recorded, a unified entry is needed to configure the tenant ID, and the global tenant ID list is designed to designate the global tenant ID. Of course, the user can also self-assign and record the flow of a plurality of tenant IDs under a certain application in the distributed system in the configuration center, namely, the user self-configures the application tenant ID list. The application tenant ID list is not mandatory with respect to the global tenant ID list. When the target tenant ID list is determined, the application tenant ID list corresponding to the current service system is preferentially used as the target tenant ID list, and the global tenant ID list with the spam property is used as the target tenant ID list only when the application tenant ID list is configured to be empty, namely, the user does not configure the application tenant ID list by himself.
Optionally, the checking the list length of the target tenant ID list includes:
Determining the number of tenant IDs in the target tenant ID list;
if the number of the tenant IDs does not exceed the recording number threshold, determining that the list length check is passed;
and if the number of the tenant IDs exceeds the recording number threshold, determining that the list length check is not passed.
Specifically, the flow recording occupies a lot of resource consumption of the system, and in order to avoid that unrestricted flow recording affects the normal operation of the system, the recording number threshold (for example, 100) is set in the invention. If the legal tenant ID number exceeds the recording number threshold, the agent program does not wake up the flow recording program to record the flow, the current control period is ended, and the agent program enters a dormant state and waits to be awakened next time; only if the legal tenant ID number does not exceed the recording number threshold, the agent program wakes up the flow recording program to record the flow.
S260, after waiting for the preset time to be awakened again by the daemon, returning to execute the acquisition of the configuration information from the configuration center.
According to the embodiment of the invention, the quantity of the flow recording tenants is limited, so that the influence of unrestricted flow recording on the normal operation of a service system is avoided.
Fig. 3 is a schematic structural diagram of a flow recording device in a multi-tenant mode according to another embodiment of the present invention. As shown in fig. 3, the apparatus includes:
A configuration obtaining module 310, configured to obtain configuration information from a configuration center after being awakened by a daemon of a minimum scheduling unit, where the configuration information includes a recording switch, recording time and a tenant ID list of a flow recording program;
a program control module 320, configured to control the flow recording program according to the configuration information;
And the wake-up waiting module 330 is configured to return to executing the acquisition of the configuration information from the configuration center after waiting for the preset time to be woken up again by the daemon. The flow recording device in the multi-tenant mode provided by the embodiment of the invention can execute the flow recording method in the multi-tenant mode provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Optionally, the program control module 320 module includes:
The time comparison unit is used for determining whether the current time is within the recording time if the global recording switch and the application recording switch are both in an on state;
The first closing unit is used for closing the flow recording program if the current time is not within the recording time;
The operation detection unit is used for determining whether the flow recording program is in operation or not if the global recording switch or the application recording switch is in a closed state;
a second closing unit for closing the flow recording program if the flow recording program is running
Optionally, the program control module 320 module further includes:
A list determining unit, configured to determine a target tenant ID list from an application tenant ID list and a global tenant ID list if the current time is within the recording time;
A list checking unit, configured to perform ID legal check and list length check on the target tenant ID list;
And the program awakening unit is used for awakening a flow recording program according to the ID list of the target tenant and recording the flow through the flow recording program if the ID legal check and the list length check are passed.
Optionally, the list determining unit is specifically configured to:
determining whether the application tenant ID list is configured to be empty;
if the configuration of the application tenant ID list is not null, determining the application tenant ID list as a target tenant ID list;
if the application tenant ID list is configured to be empty, determining the global tenant ID list as a target tenant ID list
Optionally, the list checking unit is specifically configured to:
Determining the number of tenant IDs in the target tenant ID list;
if the number of the tenant IDs does not exceed the recording number threshold, determining that the list length check is passed;
and if the number of the tenant IDs exceeds the recording number threshold, determining that the list length check is not passed.
Optionally, the configuration obtaining module 310 is specifically configured to: obtaining connection information of a configuration center from a local initialization configuration file; and acquiring configuration information from the configuration center according to the connection information.
Optionally, the auxiliary container is Sidecar containers, and is deployed in the minimum scheduling unit together with the service container.
The further explained flow recording device in the multi-tenant mode can also execute the flow recording method in the multi-tenant mode provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 4 shows a schematic diagram of an electronic device 40 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 40 includes at least one processor 41, and a memory communicatively connected to the at least one processor 41, such as a Read Only Memory (ROM) 42, a Random Access Memory (RAM) 43, etc., in which the memory stores a computer program executable by the at least one processor, and the processor 41 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 42 or the computer program loaded from the storage unit 48 into the Random Access Memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 may also be stored. The processor 41, the ROM 42 and the RAM 43 are connected to each other via a bus 44. An input/output (I/O) interface 45 is also connected to bus 44.
Various components in electronic device 40 are connected to I/O interface 45, including: an input unit 46 such as a keyboard, a mouse, etc.; an output unit 47 such as various types of displays, speakers, and the like; a storage unit 48 such as a magnetic disk, an optical disk, or the like; and a communication unit 49 such as a network card, modem, wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 41 may be various general and/or special purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as the traffic recording method in the multi-tenant mode.
In some embodiments, the traffic recording method in the multi-tenant mode may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 40 via the ROM 42 and/or the communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the traffic recording method in the multi-tenant mode described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to perform the traffic recording method in the multi-tenant mode in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A traffic recording method in a multi-tenant mode, which is applied to an auxiliary container in a minimum scheduling unit, the method comprising:
After being awakened by the daemon of the minimum scheduling unit, configuration information is acquired from a configuration center, wherein the configuration information comprises a recording switch, recording time and a tenant ID list of a flow recording program;
controlling the flow recording program according to the configuration information;
and after waiting for the preset time to be awakened again by the daemon, returning to execute the acquisition of the configuration information from the configuration center.
2. The method of claim 1, wherein the recording switch comprises a global recording switch and an application recording switch, and wherein controlling the flow recording program according to the configuration information comprises:
If the global recording switch and the application recording switch are in the on state, determining whether the current time is within the recording time or not;
if the current time is not within the recording time, closing the flow recording program;
If the global recording switch or the application recording switch is in a closed state, determining whether the flow recording program is running or not;
And if the flow recording program is running, closing the flow recording program.
3. The method of claim 2, wherein the tenant ID list comprises an application tenant ID list and a global tenant ID list, and wherein the determining whether the current time is within the recording time further comprises:
If the current time is within the recording time, determining a target tenant ID list from an application tenant ID list and a global tenant ID list;
Performing ID legal check and list length check on the target tenant ID list;
and if the ID legal check and the list length check pass, waking up a flow recording program according to the target tenant ID list, and recording the flow through the flow recording program.
4. The method of claim 3, wherein the determining a target tenant ID list from the application tenant ID list and the global tenant ID list comprises:
determining whether the application tenant ID list is configured to be empty;
if the configuration of the application tenant ID list is not null, determining the application tenant ID list as a target tenant ID list;
And if the application tenant ID list is configured to be empty, determining the global tenant ID list as a target tenant ID list.
5. The method of claim 3, wherein the checking the list length of the target tenant ID list comprises:
Determining the number of tenant IDs in the target tenant ID list;
if the number of the tenant IDs does not exceed the recording number threshold, determining that the list length check is passed;
and if the number of the tenant IDs exceeds the recording number threshold, determining that the list length check is not passed.
6. The method of claim 1, wherein the obtaining configuration information from a configuration center comprises:
Obtaining connection information of a configuration center from a local initialization configuration file;
And acquiring configuration information from the configuration center according to the connection information.
7. The method of any of claims 1-6, wherein the auxiliary container is Sidecar containers deployed in the minimum dispatch unit with a service container.
8. A traffic recording apparatus in a multi-tenant mode, characterized by an auxiliary container deployed in a minimum dispatch unit, the apparatus comprising:
The configuration acquisition module is used for acquiring configuration information from the configuration center after being awakened by the daemon of the minimum scheduling unit, wherein the configuration information comprises a recording switch, recording time and a tenant ID list of the flow recording program;
The program control module is used for controlling the flow recording program according to the configuration information;
and the wake-up waiting module is used for returning to execute the acquisition of the configuration information from the configuration center after waiting for the preset time to be woken up again by the daemon.
9. An electronic device, the electronic device comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of traffic recording in the multi-tenant mode of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the method of traffic recording in multi-tenant mode of any one of claims 1-7 when executed.
CN202410355624.9A 2024-03-27 2024-03-27 Flow recording method, device, equipment and medium in multi-tenant mode Pending CN118075182A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410355624.9A CN118075182A (en) 2024-03-27 2024-03-27 Flow recording method, device, equipment and medium in multi-tenant mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410355624.9A CN118075182A (en) 2024-03-27 2024-03-27 Flow recording method, device, equipment and medium in multi-tenant mode

Publications (1)

Publication Number Publication Date
CN118075182A true CN118075182A (en) 2024-05-24

Family

ID=91103828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410355624.9A Pending CN118075182A (en) 2024-03-27 2024-03-27 Flow recording method, device, equipment and medium in multi-tenant mode

Country Status (1)

Country Link
CN (1) CN118075182A (en)

Similar Documents

Publication Publication Date Title
Zhang et al. A comparison of energy bugs for smartphone platforms
CN109257249A (en) A kind of network interface card stability test method, apparatus, terminal and storage medium
CN114978883A (en) Network wake-up management method and device, electronic equipment and storage medium
CN106886477B (en) Method and device for setting monitoring threshold in cloud system
CN117724803A (en) Cloud service deployment method, device and platform
CN116684302A (en) Method and device for testing vehicle-mounted Ethernet
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN116089739A (en) Message pushing method, device, electronic equipment and storage medium
CN118075182A (en) Flow recording method, device, equipment and medium in multi-tenant mode
CN115437865A (en) Method, device, equipment and medium for testing abnormal power failure of hard disk
CN115756322A (en) Data storage method and device, electronic equipment and storage medium
CN115599438A (en) Method, device, equipment and medium for constructing application program publishing package
CN116579914B (en) Execution method and device of graphic processor engine, electronic equipment and storage medium
CN116627682B (en) Remote industrial information detection method and device based on shared memory
CN118018405A (en) Upgrading method and device of Internet of things equipment, server and storage medium
CN118093211A (en) Distributed lock processing method, device, equipment and medium
CN118377677A (en) Multi-server process monitoring method and device, electronic equipment and storage medium
CN118012534A (en) Application program loading method and device, electronic equipment and storage medium
CN116466891A (en) Automatic control method, device, equipment, medium and product of multiple storage equipment
CN117785403A (en) Heartbeat task execution device for equipment, electronic equipment and storage medium
CN116302796A (en) Process monitoring method and device, electronic equipment and storage medium
CN116527761A (en) Database proxy service adding method, device, equipment and storage medium
CN117009000A (en) Component, method, device, apparatus and medium for operating open source buddha system
CN117742730A (en) Project deployment method and device, electronic equipment and storage medium
CN117806797A (en) Unified scheduling method and device for tasks, electronic equipment and storage medium

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