WO2023103727A1 - Routing method for service debugging, electronic device, medium and program product - Google Patents

Routing method for service debugging, electronic device, medium and program product Download PDF

Info

Publication number
WO2023103727A1
WO2023103727A1 PCT/CN2022/132321 CN2022132321W WO2023103727A1 WO 2023103727 A1 WO2023103727 A1 WO 2023103727A1 CN 2022132321 W CN2022132321 W CN 2022132321W WO 2023103727 A1 WO2023103727 A1 WO 2023103727A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
debugging
access request
debugged
identifier
Prior art date
Application number
PCT/CN2022/132321
Other languages
French (fr)
Chinese (zh)
Inventor
吴曈辰
倪健
邢志辉
莫元武
Original Assignee
易保网络技术(上海)有限公司
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 易保网络技术(上海)有限公司 filed Critical 易保网络技术(上海)有限公司
Publication of WO2023103727A1 publication Critical patent/WO2023103727A1/en

Links

Images

Classifications

    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1073Registration or de-registration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Definitions

  • the present application relates to the technical field of cloud computing, in particular to a routing method for service debugging, electronic equipment, media and program products.
  • Embodiments of the present application provide a routing method for service debugging, electronic equipment, media, and program products, which are used to solve the problem in the prior art that it is difficult for remote services managed by containers to call services to be debugged on local devices.
  • the embodiment of the present application provides a routing method for service debugging, which is used in a system including a server and a client, and the method includes:
  • the client sends the identification information of the first service to be debugged to the server, and the server saves it in the debugging registration information database.
  • the identification information includes at least the service ID of the first service to be debugged and the device ID of the client.
  • the first service of is deployed on the client, and the second service having the same service identifier as the first service to be debugged is deployed on the server;
  • the service agent corresponding to the second service on the server side receives access requests from other external services or internal services to the second service, and matches the preset information in the access request with the identification information in the debugging registration information database;
  • the service proxy After determining that there is a matching result, the service proxy forwards the access request to the first service to be debugged deployed on the matched client.
  • a Kubernetes system is deployed on the server side, and the second service is deployed in a software application container of the Kubernetes system.
  • the access request to the second service is an HTTP request.
  • matching the preset information in the access request with the identification information in the debugging registration information base includes:
  • the service identifier and device identifier in the access request are matched with the identification information in the debugging registration information base, and the service identifier and device identifier are located in the header information of the access request.
  • the service identifier includes at least one of the following: service name, uniform resource identifier of the service, and the device identifier includes at least one of the following: uniform resource identifier of the device, network address of the device , The hardware identification code of the device.
  • the device identifier is recorded in the X-Forwarded-For parameter of the header information of the access request.
  • the service proxy forwards the access request to the first service to be debugged deployed on the matching client, including:
  • the service agent determines the corresponding network address of the matching client according to the device identifier in the access request;
  • the service proxy forwards the access request to the first service to be debugged deployed on the client corresponding to the network address according to the determined network address.
  • determining that there is a matching result further includes:
  • the service proxy forwards the access request to the service instance of the second service deployed on the server side.
  • the embodiment of the present application provides a routing system for service debugging, including a client and a server,
  • the client includes a debugging registration module.
  • the debugging registration module sends the identification information of the first service to be debugged to the server.
  • the identification information includes at least the service identifier of the first service to be debugged and the device identifier of the client.
  • the first service to be debugged Deployed on the client;
  • the server end includes an information storage module, a service inspection module and a service forwarding module, and a second service having the same service identifier as the first service to be debugged is deployed on the server end;
  • the information storage module receives the first service to be debugged sent by the client The identification information of the service, and save the identification information in the debugging registration information database;
  • the service inspection module is used for the service agent corresponding to the second service to receive the access request of other external services or internal services to the second service, and store the information in the access request Match the preset information of the preset information with the identification information in the debugging registration information base;
  • the service forwarding module is used to determine that there is a matching result, and the service proxy forwards the access request to the first service to be debugged deployed on the matched client.
  • a Kubernetes system is deployed on the server side, and the second service is deployed in a software application container of the Kubernetes system.
  • the access request for the second service in the service inspection module is an HTTP request.
  • the service checking module is configured to:
  • the service identifier and device identifier in the access request are matched with the identification information in the debugging registration information base, and the service identifier and device identifier are located in the header information of the access request.
  • the service identifier includes at least one of the following: service name, uniform resource identifier of the service, and the device identifier includes at least one of the following: uniform resource identifier of the device, network address of the device , The hardware identification code of the device.
  • the device identifier is recorded in the X-Forwarded-For parameter of the header information of the access request.
  • the service forwarding module is used for the service agent to determine the network address corresponding to the matching client according to the device identifier in the access request; the service agent forwards the access request to The first service to be debugged deployed on the client corresponding to the network address.
  • the service forwarding module is further configured to forward the access request to the service instance of the second service deployed on the server side by the service agent if there is no matching result.
  • an electronic device which includes:
  • memory for storing instructions to be executed by one or more processors of the electronic device
  • the processor is one of the processors of the electronic device, configured to execute the first aspect and any one of the routing methods for service debugging in various possible implementations of the first aspect.
  • the embodiment of the present application provides a readable storage medium, on which instructions are stored, and when the instructions are executed on the electronic equipment, the electronic equipment executes the above-mentioned first aspect and various possibilities of the first aspect. Implement any routing method for service debugging.
  • the embodiment of the present application provides a computer program product, including computer programs/instructions, which is characterized in that, when the computer program/instructions are executed by a processor, the above-mentioned first aspect and various possible implementations of the first aspect can be realized Any one of the routing methods for service debugging in .
  • the embodiment of the present application provides a routing method for service debugging of a system including a server and a client.
  • the method adds a debugging registration service on the server and registers the service to be debugged in the debugging registration service, so that the server
  • the service proxy can check whether the service is registered in the debugging registration service according to the header information in the service access request, and forward the service access request to the corresponding client to be debugged if the service has been registered.
  • the method realizes the access routing of the service in the server to the local service to be debugged, and improves the efficiency of debugging the service.
  • Fig. 1 shows a schematic diagram of a routing process for service debugging according to some embodiments of the present application.
  • Fig. 2 shows a hardware structure diagram of an electronic device according to some embodiments of the present application.
  • Fig. 3 shows a flowchart of a routing method for service debugging according to some embodiments of the present application.
  • Fig. 4 shows a schematic diagram of a scenario where a service in a service cluster invokes a service to be debugged on a local device according to some embodiments of the present application.
  • Fig. 5 shows a schematic diagram of a situation when multiple people perform service debugging according to some embodiments of the present application.
  • Fig. 6 is a schematic diagram showing another situation when multiple people perform service debugging according to some embodiments of the present application.
  • Fig. 7 shows a schematic diagram of a scenario where a service to be debugged on a local device invokes a service in a service cluster according to some embodiments of the present application.
  • Fig. 8 shows a schematic structural diagram of a routing system for service debugging according to some embodiments of the present application.
  • Illustrative embodiments of the present application include, but are not limited to, routing methods for service debugging, electronic devices, media, and program products.
  • routing method for service debugging in the present application is applicable to the scenario of routing when debugging a service invocation chain composed of a remote service and a local service to be debugged.
  • Fig. 1 provides a scenario of routing when debugging a service invocation chain composed of services in a service cluster and services in a local device according to some embodiments of the present application.
  • software developers need to debug service B locally, where service B is a service in a service invocation chain composed of service A, service B, and service C, and the invocation sequence of the service invocation chain is service A Service B is called, and Service B calls Service C.
  • Service A and service C are deployed on the service cluster 100, and are managed by the service cluster 100 through containerization.
  • Service A and service C are respectively located in container 1 and container 2, and service B is deployed on the local device 200, so that software development Personnel can debug the software code in service B line by line to determine the problems in service B.
  • service B is still called by actually running the service call chain, so that service B can be debugged according to the actual data provided by service A without creating debugging data.
  • the access request for service A is first sent to service A, and then service A sends the access request to service B, and service B sends the access request to service C.
  • the service cluster 100 is a computer cluster that provides various services. It can be understood that the service cluster 100 may be a cluster composed of physical servers or a cluster composed of virtual servers, which is not specifically limited in this embodiment of the present application.
  • the services in the service cluster 100 are deployed in a containerized manner, that is, the services are deployed in containers, which are controlled and managed by the containers, for example, the containers implement functions such as load balancing of services, service startup, and fault recovery.
  • a software application container is a lightweight, portable, and packaging technology for software applications, so that software applications can run in the same way in almost any environment.
  • Container technology solves the problem of complex software environment deployment and avoids various problems caused by incompatible operating environments for software applications.
  • Containers provide a consistent operating environment for software applications, thus simplifying the configuration process of the software operating environment.
  • Common container implementations such as Docker. Based on technologies such as Linux containers, Docker implements a lightweight operating system virtualization solution, directly uses the operating system of the local host, basically does not consume additional system resources, and makes the performance of the application very high. , Start the container to create a service.
  • the service cluster 100 uses a cluster management system based on container technology to provide containerized applications with a series of complete functions such as deployment and operation, resource scheduling, service discovery, and dynamic scaling.
  • the service cluster 100 can use the Kubernetes system to manage the service cluster.
  • Kubernetes is an orchestration management tool for portable containers and has complete cluster management capabilities. It also provides cluster management tools, covering development, deployment testing, and operation and maintenance monitoring. multiple links within.
  • the local device 200 is an electronic device used by the software developer to debug the service.
  • the software developer deploys the service B to be debugged on the local device 200 to track and monitor the running process of the service B, and can detect the service in real time.
  • the internal state of B and then locate the problematic code in service B according to the state data analysis.
  • the method provided by the technical solution of this application registers the service to be debugged in the service cluster 100, and checks the header information of the service access request when the service agent of the corresponding service receives the service access request. If the header information indicates that the requested After the service has been debugged and registered, the service access request is forwarded to the local device 200 specified in the header information, and the service to be debugged on the local device 200 is processed, thereby realizing the service pair deployed on the local device in the service cluster 100
  • the access to the service to be debugged on 200 does not need to add routing code to the local service for the service deployed on the service cluster 100, avoiding intrusive modification of the service code, reducing the complexity of service maintenance, and realizing it in a simple way
  • the access route of the service in the service cluster 100 to the local service to be debugged is improved, and the efficiency of debugging the service is improved.
  • Fig. 2 shows a block diagram of a hardware structure of an electronic device 30 for implementing a routing method for service debugging according to some embodiments of the present application.
  • the electronic device 30 may include one or more processors 301, a system control logic 302 connected to at least one of the processors 301, a system memory 303 connected to the system control logic 302, and A non-volatile memory (Non-Volatile Memory, NVM) 304 connected to the system control logic 302 and a network interface 306 connected to the system control logic 302 .
  • NVM Non-Volatile Memory
  • the processor 301 may include one or more single-core or multi-core processors. In some embodiments, the processor 301 may include any combination of general-purpose processors and special-purpose processors (eg, graphics processors, application processors, baseband processors, etc.). In an embodiment where the electronic device 30 adopts an enhanced base station (Evolved Node B, eNB) or a radio access network (Radio Access Network, RAN) controller, the processor 301 may be configured to execute various consistent embodiments. For example, the processor 301 may be used to execute a routing method for service debugging.
  • Evolved Node B evolved Node B
  • RAN Radio Access Network
  • system control logic 302 may include any suitable interface controller to provide any suitable interface to at least one of processors 301 and/or any suitable device or component in communication with system control logic 302 .
  • system control logic 302 may include one or more memory controllers to provide an interface to system memory 303 .
  • System memory 303 can be used to load and store data and/or instructions.
  • the system memory 303 can be loaded with instructions for parsing service access requests in this embodiment of the application, and can also save input data and configuration data.
  • the system memory 303 of the electronic device 30 may include any suitable volatile memory, such as a suitable dynamic random access memory (Dynamic Random Access Memory, DRAM).
  • DRAM Dynamic Random Access Memory
  • NVM memory 304 may include one or more tangible, non-transitory computer-readable media for storing data and/or instructions.
  • the NVM memory 304 may include any suitable non-volatile memory such as flash memory and/or any suitable non-volatile storage device, such as a hard disk drive (Hard Disk Drive, HDD), an optical disc (Compact Disc, CD) drive, at least one of Digital Versatile Disc (DVD) drive.
  • the NVM storage 304 may be used to store image files of containerized services in the service cluster, temporary data used by the services, and the like.
  • NVM memory 304 may comprise a portion of storage resources on the device on which electronic device 30 is installed, or it may be accessed by, but not necessarily part of, the device. For example, NVM memory 304 may be accessed over a network via network interface 306 .
  • system memory 303 and NVM memory 304 may include, respectively, temporary and permanent copies of instructions 305 .
  • the instruction 305 may include: an instruction that causes the electronic device 30 to implement the method shown in FIG. 3 when executed by at least one of the processors 301 .
  • instructions 305 , hardware, firmware and/or software components thereof may additionally/alternatively reside in system control logic 302 , network interface 306 and/or processor 301 .
  • the network interface 306 may include a transceiver for providing a radio interface for the electronic device 30 to communicate with any other suitable devices (such as front-end modules, antennas, etc.) through one or more networks.
  • the network interface 306 may be integrated with other components of the electronic device 30 .
  • the network interface 306 can be integrated into at least one of the processor 301, the system memory 303, the NVM memory 304, and a firmware device (not shown) with instructions, when at least one of the processors 301 executes the instructions , the electronic device 30 implements the methods shown in the method embodiments.
  • the network interface 306 can be used to receive service access request data and service call result data sent by the service.
  • Network interface 306 may further include any suitable hardware and/or firmware to provide a multiple-input multiple-output radio interface.
  • network interface 306 may be a network adapter, a wireless network adapter, a telephone modem and/or a wireless modem.
  • At least one of the processors 301 may be packaged together with the logic of one or more controllers for the system control logic 302 to form a System In a Package (SiP). In some embodiments, at least one of the processors 301 may be integrated on the same die with the logic of one or more controllers for the system control logic 302 to form a System on Chip (SoC).
  • SiP System In a Package
  • SoC System on Chip
  • the electronic device 30 may further include: an input/output (I/O) device 307 .
  • the I/O device 307 may include a user interface, enabling the user to interact with the electronic device 30 ; the design of the peripheral component interface enables the peripheral component to also interact with the electronic device 30 .
  • the structure shown in FIG. 2 does not constitute a specific limitation on the electronic device 30 .
  • the electronic device 30 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components may be realized by hardware or software, or a combination of software and hardware.
  • the technical solution of the present application will be described in detail below in combination with the structure shown in FIG. 2 and according to FIG. 3 and the specific scene in FIG. 4 .
  • the following describes a scenario in which the Kubernetes cluster is the service cluster 100 and the service A in the service cluster 100 calls the service B to be debugged in the local device 200 as an example.
  • the technical solution of the routing method for service debugging in some embodiments of the present application includes:
  • the local device 200 registers the service to be debugged with the debugging registration service in the Kubernetes cluster 100.
  • the debugging registration service is deployed in the Kubernetes cluster 100, and is used to register the service to be debugged locally, and the debugging registration service stores the received identification information of the service to be debugged in the debugging registration information base of the Kubernetes cluster 100,
  • the service to be debugged is deployed on the local device 200, which is a device used by software developers for software development and debugging.
  • the software developer is going to perform local debugging on service B
  • the service B to be debugged is registered in the debugging registration service before debugging.
  • the identification information provided by the service to be debugged on the local device 200 to the debugging registration service may include, but not limited to, an identifier of the service, a device identifier of the local device 200, and the like.
  • the service identifier is a character string that can be used to uniquely identify the service in the same namespace, such as the name of the service, the uniform resource identifier (Uniform Resource Identifier, URI) of the service, and the like.
  • the device identifier of the local device 200 is a character string that can be used to uniquely identify the local device in the same command space, such as the uniform resource identifier of the device, the network address of the device, the hardware identification code of the device, and the like.
  • the service B to be debugged provides the name of service B and the network address of the local device 200 as identification information to the debugging registration service, and the debugging registration service stores the received identification information in the debugging registration information database for subsequent use.
  • the service check is used.
  • the Kubernetes cluster 100 receives an access request for service A, and sends the access request to service A.
  • the service A calling the service B in the actual environment initiates the access to the service B to be debugged.
  • the software developer first calls the service A, and the service A calls the service B to be debugged during the running process, so that the software developer can debug the running process of the service B to be debugged.
  • the software developer can realize the invocation of service A by sending an access request to service A to the Kubernetes cluster 100, and the Kubernetes cluster 100 receives the service access request from outside the cluster through the gateway.
  • the gateway in the Kubernetes cluster 100 is used to receive external service access requests and send service access result data, and is a network gateway through which data must pass in and out of the Kubernetes cluster 100 .
  • the gateway After receiving the service access request, the gateway forwards the service access request to the corresponding service. As shown in FIG. 4 , the gateway forwards the access request to service A after receiving the access request to service A.
  • Service A in Kubernetes cluster 100 corresponds to multiple service instances, and each service instance independently provides the function of service A, and multiple service instances of service A, such as podA-1 and podA-2, can simultaneously handle multiple accesses to service A Request, the service agent a corresponding to service A is used to distribute the access requests of service A to different service instances, which can realize the load balancing of the access to service A.
  • service proxy a corresponding to service A after receiving the access request to service A forwarded by the gateway, service proxy a corresponding to service A checks that service A is not registered in the debugging registration service, so service proxy a will access service A The request is forwarded to a service instance PodA-1 of service A for processing.
  • S303 Service A sends an access request to service B.
  • service B needs to be called during the processing of service A, so service A sends an access request to service B to obtain the return data of service B.
  • a service instance PodA-1 of service A sends an access request to service B.
  • the header information used to check whether the service is registered for debugging remains unchanged.
  • S304 The service agent corresponding to service B checks whether service B is registered in the debugging registration service.
  • service B in the Kubernetes cluster 100 can also have multiple corresponding service instances, each service instance independently provides the function of service B, and the service agent b corresponding to service B is used to distribute the access request of service B to different Service instance to achieve load balancing of service B.
  • service B and the service B to be debugged in the local device 200 are the same service, but the service B deployed in the Kubernetes cluster 100 is difficult to debug, so the same service B is deployed on the local device 200, and by debugging the local device Service B on 200 to determine possible code defects in the same service B in Kubernetes cluster 100 .
  • the service agent in the Kubernetes cluster 100 before the service agent in the Kubernetes cluster 100 forwards the service access request, it first checks whether the corresponding service is registered in the debugging registration service, that is, checks whether the relevant information of the corresponding service in the access request can be Match against identifying information in the registry.
  • the service agent in the Kubernetes cluster 100 is enhanced to check the corresponding service.
  • the userspace mode of the service agent in the Kubernetes cluster 100 can be used to check whether the service is registered in the debugging registration service.
  • software developers can provide extended software codes for the service agent, so that the service agent can realize the functions expected by the software developers.
  • the service proxy determines whether the corresponding service is registered according to the preset header information in the service access request.
  • the header information of the service access request may include the service identifier and the identifier of the local device, and the service agent determines whether the service has been registered in the debugging registration service according to the identifier of the service identifier and the identifier of the local device, that is, checks the identifier of the service identifier and the identifier of the local device. Whether the identifier can be matched with the identifying information in the registration information base.
  • the service agent can check whether the service is registered in the debugging registration service according to the service ID, can also check whether the corresponding service is registered in the debugging registration service according to the ID of the local device, and can also check the service according to the ID of the service and the ID of the local device Whether to register in the debugging registration service, this embodiment of the application does not specifically limit the checking method of the service agent.
  • the service access request is a network request implemented by the HTTP protocol
  • the service access request includes HTTP header information and HTTP text information
  • the HTTP header information includes a service request line and a service request parameter.
  • the service request line is used to indicate the access method of the service and the Uniform Resource Locator (Uniform Resource Locator, URL) of the service, etc.
  • the access method is, for example, GET, POST, etc.
  • Service request parameters are used to specify the parameters used in service access and the corresponding parameter values.
  • the service agent checks whether the service is registered in the debug registration service, it can check according to the uniform resource locator of the service in the service access request, or according to the relevant parameters of the header information in the service access request, and can also be combined with the unified resource Locators and related parameters to check. After the service agent checks that the uniform resource locator and/or related parameters of the service can match the identification information in the debugging registration information base, it determines that the service has been registered in the debugging registration service.
  • the relevant parameters of the header information in the service access request used by the registration check may be preset header parameters or user-defined header parameters.
  • the preset header parameters are related parameters defined in the specification of HTTP header information, which can be checked directly according to the parameter values of related parameters in the header information.
  • the preset header parameters that can be used are, for example, X-Forwarded-For .
  • X-Forwarded-For is an extended parameter of HTTP header information. It is recorded in the RFC7239 specification. It is used to record the network address of the sending device of the HTTP request and the device passing through the forwarding process. Up to three network addresses can be recorded.
  • the custom header parameters are personalized parameters defined by software developers according to their own needs, and are used to transmit personalized data. After receiving the HTTP request containing the custom header parameters, the receiver needs to modify the Personalize the header parameters.
  • the custom header parameter can be used to pass the device identifier of the local device sending the service access request.
  • step S305 is executed. If it is checked that service B is not registered, Then step S306 is executed.
  • S305 The service proxy forwards the access request for service B to service B to be debugged on the local device 200.
  • service agent b checks that service B has registered in the debugging registration service, so service agent b needs to forward the access request to service B to local device 200, and the network address of local device 200 can be from the service B
  • the header parameter in the access request such as the X-Forwarded-For parameter, may also be the network address of the local device 200 corresponding to the service B recorded in the debugging registration service.
  • the access request to service B is a normal service access request, so the service agent according to multiple service B
  • the load condition of the instance determines an instance of service B with a lighter load, and the access request for service B is forwarded to this instance for processing.
  • Fig. 5 shows a scenario in which multiple software developers debug service A at the same time in some embodiments of the present application.
  • the service A to be debugged is deployed on the local device X 200 and the local device Y 300, and the service A to be debugged is registered in the debugging registration service in the Kubernetes cluster 100 respectively, and the service A to be debugged is registered on the local device X 200.
  • the registration information provided by the debugged service A includes the network address 172.0.0.101 of the local device X
  • the registration information provided by the service A to be debugged on the local device Y 300 includes the network address 172.0.0.102 of the local device Y.
  • the Kubernetes cluster 100 receives an HTTP request for invoking service A, and the HTTP request may be initiated by the local device X 200 or by other devices that invoke service A.
  • the value of the preset header parameter X-Forwarded-For in the header information of the HTTP request is 172.0.0.101, which is the corresponding network address of the local device X200.
  • the gateway After the gateway receives the HTTP request, it forwards it to service agent a of service A. Service agent a checks the registration status of service A through the interaction with the debugging registration service.
  • service agent a After confirming that service A has been registered, service agent a according to X- The value of Forwarded-For is 172.0.0.101 and the HTTP request is forwarded to the service A to be debugged on the corresponding local device X 200 for processing. Therefore, by setting the identifiers of different local devices in the header information of the service access request, the service agent can distinguish the local devices that are debugging the same service at the same time, so that the service access request is forwarded to the correct destination device.
  • Fig. 6 shows another scenario in which multiple software developers debug service A at the same time in some embodiments of the present application.
  • the service A to be debugged is deployed on the local device X 200 and the local device Y 300, and the service A to be debugged is registered in the debugging registration service in the Kubernetes cluster 100 respectively, and the service A to be debugged is registered on the local device X 200.
  • the registration information provided by the debugged service A includes the network address 172.0.0.101 of the local device X
  • the registration information provided by the service A to be debugged on the local device Y 300 includes the network address 172.0.0.102 of the local device Y.
  • the Kubernetes cluster 100 receives an HTTP request for invoking service A, and the value of the header parameter X-Forwarded-For in the header information of the HTTP request is 172.0.0.103.
  • the gateway receives the HTTP request, it forwards it to the service agent a of service A.
  • Service agent a checks the registration status of service A through the interaction with the debugging registration service, and determines that although service A has been registered, the network in the registration information The address does not match the parameter value 172.0.0.103 in the HTTP request, so service agent a forwards the HTTP request to an instance of service A, PodA-1, for processing.
  • the service agent can distinguish the access request of the service to be debugged from the normal For access requests, normal access requests are forwarded to service instances in the cluster for processing.
  • FIG. 7 shows a scenario where a service to be debugged on a local device accesses a service in a Kubernetes cluster in some embodiments of the present application.
  • the service B to be debugged on the local device 200 needs to call the service C in the Kubernetes cluster 100.
  • the service B to be debugged The call to service C is realized through the shadow service in the Kubernetes cluster 100, where the shadow service is created on the Kubernetes cluster 100 by the software developer on the local device 200 by using a local command line tool provided by the Kubernetes system
  • the command line control tool can control and manage the Kubernetes cluster 100 through the local command line tool.
  • the service B to be debugged can request to access the service C.
  • the proxy channel can have various forms, such as VPN, SOCKS5, etc.
  • the created shadow service can be shared by multiple local devices, that is, services to be debugged on multiple local devices can access services in the Kubernetes cluster 100 through a shadow service, thereby reducing resource consumption of the Kubernetes cluster 100 .
  • FIG. 8 shows a schematic structural diagram of a routing system for service debugging. It can be understood that the specific technical details of the routing method for service debugging above are also applicable to this routing system. In order to avoid repetition, details are not repeated here. .
  • the routing system 800 debugged by this service includes a client 810 and a server 820,
  • the client 810 includes a debugging registration module 811.
  • the debugging registration module 811 sends the identification information of the first service to be debugged to the server 820.
  • the identification information includes at least the service identifier of the first service to be debugged and the device identifier of the client.
  • the first service of is deployed on the client 810;
  • the server end 820 includes an information storage module 821, a service checking module 822 and a service forwarding module 823, and a second service having the same service identifier as the first service to be debugged is deployed on the server end 820;
  • the information storage module 821 receives the identification information of the first service to be debugged sent by the client, and stores the identification information in the debugging registration information database;
  • the service checking module 822 is used for the service agent corresponding to the second service to receive access requests from other external services or internal services to the second service, and match the preset information in the access request with the identification information in the debugging registration information base;
  • the service forwarding module 823 is configured to determine that there is a matching result, and the service agent forwards the access request to the matched first service deployed on the client 810 to be debugged.
  • Various embodiments of the mechanisms disclosed in this application may be implemented in hardware, software, firmware, or a combination of these implementation methods.
  • Embodiments of the present application may be implemented as a computer program or program code executed on a programmable system comprising at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements) , at least one input device, and at least one output device.
  • Program code can be applied to input instructions to perform the functions described herein and to generate output information.
  • the output information may be applied to one or more output devices in known manner.
  • a processing system includes any computer having a processor such as, for example, a Digital Signal Processor (DSP), a microcontroller, an Application Specific Integrated Circuit (ASIC), or a microprocessor. system.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • the program code can be implemented in a high-level procedural language or an object-oriented programming language to communicate with the processing system.
  • Program code can also be implemented in assembly or machine language, if desired.
  • the mechanisms described in this application are not limited in scope to any particular programming language. In either case, the language may be a compiled or interpreted language.
  • the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof.
  • the disclosed embodiments can also be implemented as instructions carried by or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which can be executed by one or more processors read and execute.
  • instructions may be distributed over a network or via other computer-readable media.
  • a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magnetic CD-ROM, Read Only Memory (ROM), Random Access Memory (Random Access Memory, RAM), Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Only Memory Read memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic card or optical card, flash memory, or use the Internet to transmit information by means of electricity, light, sound or other forms of propagation signals (for example, carrier waves, infrared signals, digital signals etc.) tangible machine-readable storage.
  • a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, a computer).
  • each unit/module mentioned in each device embodiment of this application is a logical unit/module.
  • a logical unit/module can be a physical unit/module, or a physical unit/module.
  • a part of the module can also be realized with a combination of multiple physical units/modules, the physical implementation of these logical units/modules is not the most important, the combination of functions realized by these logical units/modules is the solution The key to the technical issues raised.
  • the above-mentioned device embodiments of this application do not introduce units/modules that are not closely related to solving the technical problems proposed by this application, which does not mean that the above-mentioned device embodiments do not exist other units/modules.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present application relates to the technical field of cloud computing. Disclosed are a routing method for service debugging, an electronic device, a medium and a program product. In the routing method for service debugging, a debugging registration service is added to a server side and services to be debugged are registered into the debugging registration service, such that after the server side receives an access request for a service, a service agent may check, according to header information in the access request for the service, whether the service is registered in the debugging registration service, and forwards, under the condition that the service is registered, the access request to a service to be debugged on a corresponding client side. Thus, the service can be locally debugged on the client side, and codes routing to the local service are not needed for the service deployed at the server side, thereby avoiding intrusive modification on service codes, reducing the complexity of service maintenance, realizing simple and convenient access routing of a service in a server side to a local service to be debugged, and improving the efficiency of service debugging.

Description

服务调试的路由方法、电子设备、介质及程序产品Routing method, electronic device, medium and program product for service commissioning
本申请要求于2021年12月10日提交中国专利局、申请号为202111509818.2、申请名称为“服务调试的路由方法、电子设备、介质及程序产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111509818.2 and the application title "routing method for service debugging, electronic equipment, media and program products" submitted to the China Patent Office on December 10, 2021, the entire content of which is passed References are incorporated in this application.
技术领域technical field
本申请涉及云计算技术领域,特别涉及一种服务调试的路由方法、电子设备、介质及程序产品。The present application relates to the technical field of cloud computing, in particular to a routing method for service debugging, electronic equipment, media and program products.
背景技术Background technique
当前,软件应用服务通常部署在软件应用容器组成的集群中,软件应用服务的容器化部署使得软件开发人员能够以简单快速方式的方式发布和更新服务,无需停止服务器的运行。虽然服务的容器化部署方便了服务的运行和维护,但是对服务的开发和调试制造了较大的麻烦。服务的容器作为独立的服务运行环境,是一个相对封闭的空间,容器通过内部的命名空间和域名解析实现内部服务的调用,容器外部的服务既难以访问容器内部的服务,也难以被容器内部的服务所调用。而为了实现服务在本地设备上的调试,需要实现本地服务对集群中容器化服务的调用和集群中容器化服务对本地服务的调用。虽然有一些工具能够支持本地服务对集群中容器化服务的调用,但是集群中容器化服务对本地服务的调用仍然较难解决,导致难以对本地服务进行调试。Currently, software application services are usually deployed in a cluster composed of software application containers. The containerized deployment of software application services enables software developers to publish and update services in a simple and fast manner without stopping the operation of the server. Although the containerized deployment of services facilitates the operation and maintenance of services, it creates a lot of trouble for the development and debugging of services. As an independent service operating environment, the container of the service is a relatively closed space. The container realizes the invocation of internal services through the internal namespace and domain name resolution. It is difficult for services outside the container to access the services inside the container, and it is also difficult The service is invoked. In order to realize the debugging of the service on the local device, it is necessary to realize the invocation of the local service to the containerized service in the cluster and the invocation of the containerized service in the cluster to the local service. Although there are some tools that can support local services to call containerized services in the cluster, it is still difficult to solve the call of containerized services in the cluster to local services, making it difficult to debug local services.
发明内容Contents of the invention
本申请实施例提供了一种服务调试的路由方法、电子设备、介质及程序产品,用于解决现有技术下由容器管理的远程服务难以对本地设备上待调试的服务进行调用的问题。Embodiments of the present application provide a routing method for service debugging, electronic equipment, media, and program products, which are used to solve the problem in the prior art that it is difficult for remote services managed by containers to call services to be debugged on local devices.
第一方面,本申请实施例提供了一种服务调试的路由方法,用于包括服务器端和客户端的***,该方法包括:In the first aspect, the embodiment of the present application provides a routing method for service debugging, which is used in a system including a server and a client, and the method includes:
客户端将待调试的第一服务的识别信息发送至服务器端,并由服务器端保存在调试注册信息库中,识别信息至少包括待调试的第一服务的服务标识和客户端的设备标识,待调试的第一服务部署在客户端上,服务器端上部署有与待调试的第一服务具有相同服务标识的第二服务;The client sends the identification information of the first service to be debugged to the server, and the server saves it in the debugging registration information database. The identification information includes at least the service ID of the first service to be debugged and the device ID of the client. The first service of is deployed on the client, and the second service having the same service identifier as the first service to be debugged is deployed on the server;
服务器端上第二服务对应的服务代理接收其它外部服务或内部服务对第二服务的访问请求,并将访问请求中的预设信息与调试注册信息库中的识别信息进行匹配;The service agent corresponding to the second service on the server side receives access requests from other external services or internal services to the second service, and matches the preset information in the access request with the identification information in the debugging registration information database;
确定存在匹配结果,服务代理将访问请求转发至匹配的客户端上部署的待调试的第一服务。After determining that there is a matching result, the service proxy forwards the access request to the first service to be debugged deployed on the matched client.
在上述第一方面的一种可能的实现中,服务器端部署有Kubernetes***,第二服务部署在Kubernetes***的软件应用容器中。In a possible implementation of the first aspect above, a Kubernetes system is deployed on the server side, and the second service is deployed in a software application container of the Kubernetes system.
在上述第一方面的一种可能的实现中,对第二服务的访问请求为HTTP请求。In a possible implementation of the first aspect above, the access request to the second service is an HTTP request.
在上述第一方面的一种可能的实现中,将访问请求中的预设信息与调试注册信息库中的识别信息进行匹配,包括:In a possible implementation of the first aspect above, matching the preset information in the access request with the identification information in the debugging registration information base includes:
将访问请求中的服务标识和设备标识与调试注册信息库中的识别信息进行匹配,服务标识和设备标识位于访问请求的头部信息中。The service identifier and device identifier in the access request are matched with the identification information in the debugging registration information base, and the service identifier and device identifier are located in the header information of the access request.
在上述第一方面的一种可能的实现中,服务标识至少包括如下一种:服务名称、服务的统一资源标识符,设备标识至少包括如下一种:设备的统一资源标识符、设备的网络地址、设备的硬件识别码。In a possible implementation of the above first aspect, the service identifier includes at least one of the following: service name, uniform resource identifier of the service, and the device identifier includes at least one of the following: uniform resource identifier of the device, network address of the device , The hardware identification code of the device.
在上述第一方面的一种可能的实现中,设备标识记录在访问请求的头部信息的X-Forwarded-For参数中。In a possible implementation of the above first aspect, the device identifier is recorded in the X-Forwarded-For parameter of the header information of the access request.
在上述第一方面的一种可能的实现中,服务代理将访问请求转发至匹配的客户端上部署的待调试的第一服务,包括:In a possible implementation of the first aspect above, the service proxy forwards the access request to the first service to be debugged deployed on the matching client, including:
服务代理根据访问请求中的设备标识确定匹配的客户端对应的网络地址;The service agent determines the corresponding network address of the matching client according to the device identifier in the access request;
服务代理根据确定的网络地址,将访问请求转发至网络地址对应的客户端上部署的待调试的第一服务。在上述第一方面的一种可能的实现中,确定存在匹配结果,还包括:The service proxy forwards the access request to the first service to be debugged deployed on the client corresponding to the network address according to the determined network address. In a possible implementation of the first aspect above, determining that there is a matching result further includes:
在不存在匹配结果的情况下,服务代理将访问请求转发至服务器端部署的第二服务的服务实例。If there is no matching result, the service proxy forwards the access request to the service instance of the second service deployed on the server side.
第二方面,本申请实施例提供了一种服务调试的路由***,包括客户端和服务器端,In the second aspect, the embodiment of the present application provides a routing system for service debugging, including a client and a server,
客户端包括调试注册模块,调试注册模块将待调试的第一服务的识别信息发送至服务器端,识别信息至少包括待调试的第一服务的服务标识和客户端的设备标识,待调试的第一服务部署在客户端上;The client includes a debugging registration module. The debugging registration module sends the identification information of the first service to be debugged to the server. The identification information includes at least the service identifier of the first service to be debugged and the device identifier of the client. The first service to be debugged Deployed on the client;
服务器端包括信息存储模块、服务检查模块和服务转发模块,服务器端上部署有与待调试的第一服务具有相同服务标识的第二服务;信息存储模块,接收客户端发送的待调试的第一服务的识别信息,并将识别信息保存在调试注册信息库中;服务检查模块,用于第二服务对应的服务代理接收其它外部服务或内部服务对第二服务的访问请求,并将访问请求中的预设信息与调试注册信息库中的识别信息进行匹配;服务转发模块,用于确定存在匹配结果,服务代理将访问请求转发至匹配的客户端上部署的待调试的第一服务。The server end includes an information storage module, a service inspection module and a service forwarding module, and a second service having the same service identifier as the first service to be debugged is deployed on the server end; the information storage module receives the first service to be debugged sent by the client The identification information of the service, and save the identification information in the debugging registration information database; the service inspection module is used for the service agent corresponding to the second service to receive the access request of other external services or internal services to the second service, and store the information in the access request Match the preset information of the preset information with the identification information in the debugging registration information base; the service forwarding module is used to determine that there is a matching result, and the service proxy forwards the access request to the first service to be debugged deployed on the matched client.
在上述第二方面的一种可能的实现中,服务器端部署有Kubernetes***,第二服务部署在Kubernetes***的软件应用容器中。In a possible implementation of the second aspect above, a Kubernetes system is deployed on the server side, and the second service is deployed in a software application container of the Kubernetes system.
在上述第二方面的一种可能的实现中,服务检查模块中对第二服务的访问请求为HTTP请求。In a possible implementation of the second aspect above, the access request for the second service in the service inspection module is an HTTP request.
在上述第二方面的一种可能的实现中,服务检查模块,用于:In a possible implementation of the second aspect above, the service checking module is configured to:
将访问请求中的服务标识和设备标识与调试注册信息库中的识别信息进行匹配,服务标识和设备标识位于访问请求的头部信息中。The service identifier and device identifier in the access request are matched with the identification information in the debugging registration information base, and the service identifier and device identifier are located in the header information of the access request.
在上述第二方面的一种可能的实现中,服务标识至少包括如下一种:服务名称、服务的统一资源标识符,设备标识至少包括如下一种:设备的统一资源标识符、设备的网络地址、设备的硬件识别码。In a possible implementation of the second aspect above, the service identifier includes at least one of the following: service name, uniform resource identifier of the service, and the device identifier includes at least one of the following: uniform resource identifier of the device, network address of the device , The hardware identification code of the device.
在上述第二方面的一种可能的实现中,设备标识记录在访问请求的头部信息的X-Forwarded-For参数中。In a possible implementation of the above second aspect, the device identifier is recorded in the X-Forwarded-For parameter of the header information of the access request.
在上述第二方面的一种可能的实现中,服务转发模块用于服务代理根据访问请求中的设备标识确定匹配的客户端对应的网络地址;服务代理根据确定的网络地址,将访问请求转发至网络地址对应的客户端上部署的待调试的第一服务。In a possible implementation of the second aspect above, the service forwarding module is used for the service agent to determine the network address corresponding to the matching client according to the device identifier in the access request; the service agent forwards the access request to The first service to be debugged deployed on the client corresponding to the network address.
在上述第二方面的一种可能的实现中,服务转发模块还用于在不存在匹配结果的情况下,服务代理将访问请求转发至服务器端部署的第二服务的服务实例。In a possible implementation of the second aspect above, the service forwarding module is further configured to forward the access request to the service instance of the second service deployed on the server side by the service agent if there is no matching result.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括:In a third aspect, an embodiment of the present application provides an electronic device, which includes:
存储器,用于存储由电子设备的一个或多个处理器执行的指令,以及memory for storing instructions to be executed by one or more processors of the electronic device, and
处理器,是电子设备的处理器之一,用于执行上述第一方面以及第一方面的各种可能实现中的任意一种服务调试的路由方法。The processor is one of the processors of the electronic device, configured to execute the first aspect and any one of the routing methods for service debugging in various possible implementations of the first aspect.
第四方面,本申请实施例提供了一种可读存储介质,可读存储介质上存储有指令,该指令在电子设备上执行时使电子设备执行上述第一方面以及第一方面的各种可能实现中的任意一种服务调试的路由方法。In the fourth aspect, the embodiment of the present application provides a readable storage medium, on which instructions are stored, and when the instructions are executed on the electronic equipment, the electronic equipment executes the above-mentioned first aspect and various possibilities of the first aspect. Implement any routing method for service debugging.
第五方面,本申请实施例提供了一种计算机程序产品,包括计算机程序/指令,其特征在于,该计算机程序/指令被处理器执行时实现上述第一方面以及第一方面的各种可能实现中的任意一种服务调试的路由方法。In the fifth aspect, the embodiment of the present application provides a computer program product, including computer programs/instructions, which is characterized in that, when the computer program/instructions are executed by a processor, the above-mentioned first aspect and various possible implementations of the first aspect can be realized Any one of the routing methods for service debugging in .
本申请实施例中提供了用于包括服务器端和客户端的***的服务调试的路由方法,该方法通过在服务器端增加调试注册服务,并将待调试的服务注册到调试注册服务中,使得服务器端在接收到服务访问请求后,服务代理可以根据服务访问请求中的头部信息检查服务是否在调试注册服务中注册,并在服务已经注册的情况下将服务访问请求转发至相应客户端的待调试的服务,使得可以在客户端上对服务进行本地调试,无需为部署在服务端的服务增加路由到本地服务的代码,避免了对服务代码的侵入式修改,降低了服务维护的复杂性,以简便的方式实现了服务端中服务对本地待调试的服务的访问路由,提高了对服务进行调试的效率。The embodiment of the present application provides a routing method for service debugging of a system including a server and a client. The method adds a debugging registration service on the server and registers the service to be debugged in the debugging registration service, so that the server After receiving the service access request, the service proxy can check whether the service is registered in the debugging registration service according to the header information in the service access request, and forward the service access request to the corresponding client to be debugged if the service has been registered. service, so that the service can be debugged locally on the client, without the need to add routing code to the local service for the service deployed on the server, avoiding intrusive modification of the service code, reducing the complexity of service maintenance, and easy The method realizes the access routing of the service in the server to the local service to be debugged, and improves the efficiency of debugging the service.
附图说明Description of drawings
图1根据本申请的一些实施例,示出了一种服务调试的路由过程的场景示意图。Fig. 1 shows a schematic diagram of a routing process for service debugging according to some embodiments of the present application.
图2根据本申请的一些实施例,示出了一种电子设备的硬件结构图。Fig. 2 shows a hardware structure diagram of an electronic device according to some embodiments of the present application.
图3根据本申请的一些实施例,示出了一种服务调试的路由方法的流程图。Fig. 3 shows a flowchart of a routing method for service debugging according to some embodiments of the present application.
图4根据本申请的一些实施例,示出了一种服务集群中服务调用本地设备上待调试的服务的场景示意图。Fig. 4 shows a schematic diagram of a scenario where a service in a service cluster invokes a service to be debugged on a local device according to some embodiments of the present application.
图5根据本申请的一些实施例,示出了多人进行服务调试时一种情况的示意图。Fig. 5 shows a schematic diagram of a situation when multiple people perform service debugging according to some embodiments of the present application.
图6根据本申请的一些实施例,示出了多人进行服务调试时另一种情况的示意图。Fig. 6 is a schematic diagram showing another situation when multiple people perform service debugging according to some embodiments of the present application.
图7根据本申请的一些实施例,示出了一种本地设备上待调试的服务调用服务集群中服务的场景示意图。Fig. 7 shows a schematic diagram of a scenario where a service to be debugged on a local device invokes a service in a service cluster according to some embodiments of the present application.
图8根据本申请的一些实施例,示出了一种服务调试的路由***的结构示意图。Fig. 8 shows a schematic structural diagram of a routing system for service debugging according to some embodiments of the present application.
具体实施方式Detailed ways
本申请的说明性实施例包括但不限于服务调试的路由方法、电子设备、介质及程序产品。Illustrative embodiments of the present application include, but are not limited to, routing methods for service debugging, electronic devices, media, and program products.
可以理解,本申请的服务调试的路由方法适用于对由远程服务和待调试的本地服务所组成的服务调用链进行调试时进行路由的场景。It can be understood that the routing method for service debugging in the present application is applicable to the scenario of routing when debugging a service invocation chain composed of a remote service and a local service to be debugged.
下面将结合附图对本申请的实施例作进一步地详细描述。Embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings.
图1根据本申请的一些实施例,提供了一种对服务集群中的服务和本地设备中的服务组成的服务调用链进行调试时进行路由的场景。如图1所示,软件开发人员需要对服务B在本地进行调试,这里服务B是由服务A、服务B和服务C组成的服务调用链中的一个服务,服务调用链的调用顺序为服务A调用服务B,服务B调用服务C。其中服务A和服务C部署在服务集群100上,由服务集群100通过容器化方式进行管理,服务A和服务C分别位于容器1和容器2中,服务B部署在本地设备200上,从而软件开发人员可以对服务B中的软件代码进行逐行调试来确定服务B中存在的问题。Fig. 1 provides a scenario of routing when debugging a service invocation chain composed of services in a service cluster and services in a local device according to some embodiments of the present application. As shown in Figure 1, software developers need to debug service B locally, where service B is a service in a service invocation chain composed of service A, service B, and service C, and the invocation sequence of the service invocation chain is service A Service B is called, and Service B calls Service C. Service A and service C are deployed on the service cluster 100, and are managed by the service cluster 100 through containerization. Service A and service C are respectively located in container 1 and container 2, and service B is deployed on the local device 200, so that software development Personnel can debug the software code in service B line by line to determine the problems in service B.
在实际的调试过程中,仍然通过实际运行服务调用链的方式来对服务B进行调用,使得服务B能够根据服务A提供的实际数据进行调试,无需创建调试数据。在运行服务调用链的过程中,先将对服务A的访问请求发送至服务A,再由服务A向服务B发送访问请求,服务B再向服务C发送访问请求。In the actual debugging process, service B is still called by actually running the service call chain, so that service B can be debugged according to the actual data provided by service A without creating debugging data. In the process of running the service call chain, the access request for service A is first sent to service A, and then service A sends the access request to service B, and service B sends the access request to service C.
这里,服务集群100是提供多种服务的计算机集群,可以理解,服务集群100可以是物理服务器组成的集群,也可以是虚拟服务器组成的集群,本申请实施例对此不做具体限制。服务集群100中的服务以容器化方式进行部署,即其中的服务部署在容器中,由容器进行控制和管理,例如由容器实现服务的负载均衡、服务的启动和故障恢复等功能。Here, the service cluster 100 is a computer cluster that provides various services. It can be understood that the service cluster 100 may be a cluster composed of physical servers or a cluster composed of virtual servers, which is not specifically limited in this embodiment of the present application. The services in the service cluster 100 are deployed in a containerized manner, that is, the services are deployed in containers, which are controlled and managed by the containers, for example, the containers implement functions such as load balancing of services, service startup, and fault recovery.
软件应用容器(Container)是一种轻量级、可移植、并将软件应用程序进行打包的技术,使得软件应用程序可以在几乎任何环境中以相同的方式运行。容器技术很好地解决了软件环境部署复杂的问题,避免软件应用因为运行环境不兼容导致的各种问题,容器为软件应用提供了一致的运行环境,从而简化了软件运行环境的配置过程。常见的容器实现例如Docker。Docker建立在Linux容器等技术之上,实现了轻量级的操作***虚拟化解决方案,直接使用本地主机的操作***,基本不消耗额外的***资源,使得应用的性能很高,Docker通过打包镜像、启动容器即可创建一个服务。A software application container (Container) is a lightweight, portable, and packaging technology for software applications, so that software applications can run in the same way in almost any environment. Container technology solves the problem of complex software environment deployment and avoids various problems caused by incompatible operating environments for software applications. Containers provide a consistent operating environment for software applications, thus simplifying the configuration process of the software operating environment. Common container implementations such as Docker. Based on technologies such as Linux containers, Docker implements a lightweight operating system virtualization solution, directly uses the operating system of the local host, basically does not consume additional system resources, and makes the performance of the application very high. , Start the container to create a service.
服务集群100使用基于容器技术的集群管理***,为容器化的应用提供部署运行、资源调度、服务发现和动态伸缩等一系列完整功能。例如,服务集群100可以使用Kubernetes***来管理服务集群,Kubernetes是可移植容器的编排管理工具,具备完整的集群管理能力,还提供了集群管理工具,涵盖了包括开发、部署测试和运维监控在内的多个环节。The service cluster 100 uses a cluster management system based on container technology to provide containerized applications with a series of complete functions such as deployment and operation, resource scheduling, service discovery, and dynamic scaling. For example, the service cluster 100 can use the Kubernetes system to manage the service cluster. Kubernetes is an orchestration management tool for portable containers and has complete cluster management capabilities. It also provides cluster management tools, covering development, deployment testing, and operation and maintenance monitoring. multiple links within.
本地设备200是软件开发人员用于对服务进行调试的电子设备,软件开发人员通过将待调试的服务B部署在本地设备200上从而实现对服务B的运行过程的跟踪和监控,能够实时检测服务B的内部状态,进而根据状态数据分析定位到服务B中存在问题的代码。The local device 200 is an electronic device used by the software developer to debug the service. The software developer deploys the service B to be debugged on the local device 200 to track and monitor the running process of the service B, and can detect the service in real time. The internal state of B, and then locate the problematic code in service B according to the state data analysis.
本申请技术方案提供的方法,通过将待调试的服务注册到服务集群100中,并在相应服务的服务代理接收到服务访问请求时检查服务访问请求的头部信息,如果头部信息表明请求的服务已经进行了调试注册,则将该服务访问请求转发至头部信息中指定的本地设备200,由本地设备200上待调试的服务进行处理,从而实现了服务集群100中服务对部署在本地设备200上的待调试服务的访问,无需为部署在服务集群100上的服务增加路由到本地服务的代码,避免了对服务代码的侵入式修改,降低了服务维护的复杂性,以简便的方式实现了服务集群100中服务对本地待调试的服务的访问路由,提高了对服务进行调试 的效率。The method provided by the technical solution of this application registers the service to be debugged in the service cluster 100, and checks the header information of the service access request when the service agent of the corresponding service receives the service access request. If the header information indicates that the requested After the service has been debugged and registered, the service access request is forwarded to the local device 200 specified in the header information, and the service to be debugged on the local device 200 is processed, thereby realizing the service pair deployed on the local device in the service cluster 100 The access to the service to be debugged on 200 does not need to add routing code to the local service for the service deployed on the service cluster 100, avoiding intrusive modification of the service code, reducing the complexity of service maintenance, and realizing it in a simple way The access route of the service in the service cluster 100 to the local service to be debugged is improved, and the efficiency of debugging the service is improved.
图2根据本申请的一些实施例,示出了一种用于实现服务调试的路由方法的电子设备30的硬件结构框图。在图2所示的实施例中,电子设备30可以包括一个或多个处理器301,与处理器301中的至少一个连接的***控制逻辑302,与***控制逻辑302连接的***内存303,与***控制逻辑302连接的非易失性存储器(Non-Volatile Memory,NVM)304,以及与***控制逻辑302连接的网络接口306。Fig. 2 shows a block diagram of a hardware structure of an electronic device 30 for implementing a routing method for service debugging according to some embodiments of the present application. In the embodiment shown in FIG. 2, the electronic device 30 may include one or more processors 301, a system control logic 302 connected to at least one of the processors 301, a system memory 303 connected to the system control logic 302, and A non-volatile memory (Non-Volatile Memory, NVM) 304 connected to the system control logic 302 and a network interface 306 connected to the system control logic 302 .
在一些实施例中,处理器301可以包括一个或多个单核或多核处理器。在一些实施例中,处理器301可以包括通用处理器和专用处理器(例如,图形处理器,应用处理器,基带处理器等)的任意组合。在电子设备30采用增强型基站(Evolved Node B,eNB)或无线接入网(Radio Access Network,RAN)控制器的实施例中,处理器301可以被配置为执行各种符合的实施例。例如,处理器301可以用于执行服务调试的路由方法。In some embodiments, the processor 301 may include one or more single-core or multi-core processors. In some embodiments, the processor 301 may include any combination of general-purpose processors and special-purpose processors (eg, graphics processors, application processors, baseband processors, etc.). In an embodiment where the electronic device 30 adopts an enhanced base station (Evolved Node B, eNB) or a radio access network (Radio Access Network, RAN) controller, the processor 301 may be configured to execute various consistent embodiments. For example, the processor 301 may be used to execute a routing method for service debugging.
在一些实施例中,***控制逻辑302可以包括任意合适的接口控制器,以向处理器301中的至少一个和/或与***控制逻辑302通信的任意合适的设备或组件提供任意合适的接口。In some embodiments, system control logic 302 may include any suitable interface controller to provide any suitable interface to at least one of processors 301 and/or any suitable device or component in communication with system control logic 302 .
在一些实施例中,***控制逻辑302可以包括一个或多个存储器控制器,以提供连接到***内存303的接口。***内存303可以用于加载以及存储数据和/或指令。例如,***内存303可以加载本申请实施例中解析服务访问请求的指令,也可以保存输入数据和配置数据等。In some embodiments, system control logic 302 may include one or more memory controllers to provide an interface to system memory 303 . System memory 303 can be used to load and store data and/or instructions. For example, the system memory 303 can be loaded with instructions for parsing service access requests in this embodiment of the application, and can also save input data and configuration data.
在一些实施例中电子设备30的***内存303可以包括任意合适的易失性存储器,例如合适的动态随机存取存储器(Dynamic Random Access Memory,DRAM)。In some embodiments, the system memory 303 of the electronic device 30 may include any suitable volatile memory, such as a suitable dynamic random access memory (Dynamic Random Access Memory, DRAM).
NVM存储器304可以包括用于存储数据和/或指令的一个或多个有形的、非暂时性的计算机可读介质。在一些实施例中,NVM存储器304可以包括闪存等任意合适的非易失性存储器和/或任意合适的非易失性存储设备,例如硬盘驱动器(Hard Disk Drive,HDD),光盘(Compact Disc,CD)驱动器,数字通用光盘(Digital Versatile Disc,DVD)驱动器中的至少一个。在本申请实施例中,NVM存储器304可以用于存储服务集群中容器化服务的镜像文件和服务使用的临时数据等。NVM memory 304 may include one or more tangible, non-transitory computer-readable media for storing data and/or instructions. In some embodiments, the NVM memory 304 may include any suitable non-volatile memory such as flash memory and/or any suitable non-volatile storage device, such as a hard disk drive (Hard Disk Drive, HDD), an optical disc (Compact Disc, CD) drive, at least one of Digital Versatile Disc (DVD) drive. In the embodiment of the present application, the NVM storage 304 may be used to store image files of containerized services in the service cluster, temporary data used by the services, and the like.
NVM存储器304可以包括安装电子设备30的装置上的一部分存储资源,或者它可以由设备访问,但不一定是设备的一部分。例如,可以经由网络接口306通过网络访问NVM存储器304。NVM memory 304 may comprise a portion of storage resources on the device on which electronic device 30 is installed, or it may be accessed by, but not necessarily part of, the device. For example, NVM memory 304 may be accessed over a network via network interface 306 .
特别地,***内存303和NVM存储器304可以分别包括:指令305的暂时副本和永久副本。指令305可以包括:由处理器301中的至少一个执行时导致电子设备30实施如图3所示的方法的指令。在一些实施例中,指令305、硬件、固件和/或其软件组件可另外地/替代地置于***控制逻辑302,网络接口306和/或处理器301中。In particular, system memory 303 and NVM memory 304 may include, respectively, temporary and permanent copies of instructions 305 . The instruction 305 may include: an instruction that causes the electronic device 30 to implement the method shown in FIG. 3 when executed by at least one of the processors 301 . In some embodiments, instructions 305 , hardware, firmware and/or software components thereof may additionally/alternatively reside in system control logic 302 , network interface 306 and/or processor 301 .
网络接口306可以包括收发器,用于为电子设备30提供无线电接口,进而通过一个或多个网络与任意其他合适的设备(如前端模块,天线等)进行通信。在一些实施例中,网络接口306可以集成于电子设备30的其他组件。例如,网络接口306可以集成于处理器301的,***内存303,NVM存储器304,和具有指令的固件设备(未示出)中的至少一种,当处理器301中的至少一个执行所述指令时,电子设备30实现如方法实施例中示出的方法。在本申请实施例中,网络接口306可以用于接收服务发送的服务访问请求数据 和服务调用结果数据。The network interface 306 may include a transceiver for providing a radio interface for the electronic device 30 to communicate with any other suitable devices (such as front-end modules, antennas, etc.) through one or more networks. In some embodiments, the network interface 306 may be integrated with other components of the electronic device 30 . For example, the network interface 306 can be integrated into at least one of the processor 301, the system memory 303, the NVM memory 304, and a firmware device (not shown) with instructions, when at least one of the processors 301 executes the instructions , the electronic device 30 implements the methods shown in the method embodiments. In this embodiment of the application, the network interface 306 can be used to receive service access request data and service call result data sent by the service.
网络接口306可以进一步包括任意合适的硬件和/或固件,以提供多输入多输出无线电接口。例如,网络接口306可以是网络适配器,无线网络适配器,电话调制解调器和/或无线调制解调器。 Network interface 306 may further include any suitable hardware and/or firmware to provide a multiple-input multiple-output radio interface. For example, network interface 306 may be a network adapter, a wireless network adapter, a telephone modem and/or a wireless modem.
在一些实施例中,处理器301中的至少一个可以与用于***控制逻辑302的一个或多个控制器的逻辑封装在一起,以形成***封装(System In a Package,SiP)。在一些实施例中,处理器301中的至少一个可以与用于***控制逻辑302的一个或多个控制器的逻辑集成在同一管芯上,以形成片上***(System on Chip,SoC)。In some embodiments, at least one of the processors 301 may be packaged together with the logic of one or more controllers for the system control logic 302 to form a System In a Package (SiP). In some embodiments, at least one of the processors 301 may be integrated on the same die with the logic of one or more controllers for the system control logic 302 to form a System on Chip (SoC).
电子设备30可以进一步包括:输入/输出(I/O)设备307。I/O设备307可以包括用户界面,使得用户能够与电子设备30进行交互;***组件接口的设计使得***组件也能够与电子设备30交互。The electronic device 30 may further include: an input/output (I/O) device 307 . The I/O device 307 may include a user interface, enabling the user to interact with the electronic device 30 ; the design of the peripheral component interface enables the peripheral component to also interact with the electronic device 30 .
可以理解的是,图2示意的结构并不构成对电子设备30的具体限定。在本申请另外一些实施例中电子设备30可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以由硬件或软件,或软件和硬件的组合实现。It can be understood that the structure shown in FIG. 2 does not constitute a specific limitation on the electronic device 30 . In some other embodiments of the present application, the electronic device 30 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components may be realized by hardware or software, or a combination of software and hardware.
下面结合上述图2所示的结构,根据图3并结合图4的具体场景,详细介绍本申请的技术方案。以下以Kubernetes集群为服务集群100,服务集群100中的服务A调用本地设备200中的待调试服务B的场景为例进行说明。如图3所示,本申请的一些实施例中服务调试的路由方法的技术方案包括:The technical solution of the present application will be described in detail below in combination with the structure shown in FIG. 2 and according to FIG. 3 and the specific scene in FIG. 4 . The following describes a scenario in which the Kubernetes cluster is the service cluster 100 and the service A in the service cluster 100 calls the service B to be debugged in the local device 200 as an example. As shown in Figure 3, the technical solution of the routing method for service debugging in some embodiments of the present application includes:
S301:本地设备200将待调试的服务注册到Kubernetes集群100中的调试注册服务。在此,调试注册服务部署在Kubernetes集群100中,用于对准备进行本地调试的服务进行注册,调试注册服务将接收的待调试的服务的识别信息存储在Kubernetes集群100的调试注册信息库中,这里,待调试的服务部署在本地设备200上,本地设备200是软件开发人员用于进行软件开发和调试的设备。如图4所示,软件开发人员准备对服务B进行本地调试,则在进行调试之前,先将待调试的服务B注册到调试注册服务中。S301: The local device 200 registers the service to be debugged with the debugging registration service in the Kubernetes cluster 100. Here, the debugging registration service is deployed in the Kubernetes cluster 100, and is used to register the service to be debugged locally, and the debugging registration service stores the received identification information of the service to be debugged in the debugging registration information base of the Kubernetes cluster 100, Here, the service to be debugged is deployed on the local device 200, which is a device used by software developers for software development and debugging. As shown in FIG. 4 , when the software developer is going to perform local debugging on service B, the service B to be debugged is registered in the debugging registration service before debugging.
本地设备200上待调试的服务向调试注册服务提供的识别信息可以包括但不限于服务的标识、本地设备200的设备标识等。可以理解,服务的标识是可以用于在同一命名空间中唯一识别服务的字符串,例如为服务的名称、服务的统一资源标识符(Uniform Resource Identifier,URI)等。类似地,本地设备200的设备标识是可以用于在同一命令空间中唯一识别本地设备的字符串,例如为设备的统一资源标识符、设备的网络地址、设备的硬件识别码等。The identification information provided by the service to be debugged on the local device 200 to the debugging registration service may include, but not limited to, an identifier of the service, a device identifier of the local device 200, and the like. It can be understood that the service identifier is a character string that can be used to uniquely identify the service in the same namespace, such as the name of the service, the uniform resource identifier (Uniform Resource Identifier, URI) of the service, and the like. Similarly, the device identifier of the local device 200 is a character string that can be used to uniquely identify the local device in the same command space, such as the uniform resource identifier of the device, the network address of the device, the hardware identification code of the device, and the like.
在一些实施例中,待调试的服务B将服务B的名称和本地设备200的网络地址作为识别信息提供给调试注册服务,调试注册服务将接收的识别信息存储在调试注册信息库中,供后续的服务检查使用。In some embodiments, the service B to be debugged provides the name of service B and the network address of the local device 200 as identification information to the debugging registration service, and the debugging registration service stores the received identification information in the debugging registration information database for subsequent use. The service check is used.
S302:Kubernetes集群100接收对服务A的访问请求,并将访问请求发送至服务A。在此,为了完整地模拟待调试的服务B的调用过程,通过在实际环境中调用服务B的服务A发起对待调试的服务B的访问。软件开发人员首先调用服务A,服务A在运行过程调用待调试的服务B,从而软件开发人员可以对待调试的服务B的运行过程进行调试。S302: The Kubernetes cluster 100 receives an access request for service A, and sends the access request to service A. Here, in order to completely simulate the calling process of the service B to be debugged, the service A calling the service B in the actual environment initiates the access to the service B to be debugged. The software developer first calls the service A, and the service A calls the service B to be debugged during the running process, so that the software developer can debug the running process of the service B to be debugged.
软件开发人员可以通过向Kubernetes集群100发送对服务A的访问请求来实现对服务 A的调用,Kubernetes集群100通过网关接收来自集群外部的服务访问请求。在此,Kubernetes集群100中的网关用于接收外部的服务访问请求和发送服务访问结果数据,是数据进出Kubernetes集群100必须经过的网络关口。The software developer can realize the invocation of service A by sending an access request to service A to the Kubernetes cluster 100, and the Kubernetes cluster 100 receives the service access request from outside the cluster through the gateway. Here, the gateway in the Kubernetes cluster 100 is used to receive external service access requests and send service access result data, and is a network gateway through which data must pass in and out of the Kubernetes cluster 100 .
网关接收到服务访问请求后,将服务访问请求转发至对应的服务。如图4所示,网关接收到对服务A的访问请求,则将该访问请求转发至服务A。After receiving the service access request, the gateway forwards the service access request to the corresponding service. As shown in FIG. 4 , the gateway forwards the access request to service A after receiving the access request to service A.
Kubernetes集群100中的服务A对应有多个服务实例,每个服务实例单独提供服务A的功能,多个服务A的服务实例例如podA-1和podA-2可以同时处理多个对服务A的访问请求,服务A对应的服务代理a用于将服务A的访问请求分发到不同的服务实例,可以实现对服务A的访问的负载均衡。如图4所示,服务A对应的服务代理a在接收到网关转发的对服务A的访问请求后,检查到服务A并没有在调试注册服务中注册,因此服务代理a将对服务A的访问请求转发给服务A的一个服务实例PodA-1进行处理。Service A in Kubernetes cluster 100 corresponds to multiple service instances, and each service instance independently provides the function of service A, and multiple service instances of service A, such as podA-1 and podA-2, can simultaneously handle multiple accesses to service A Request, the service agent a corresponding to service A is used to distribute the access requests of service A to different service instances, which can realize the load balancing of the access to service A. As shown in Figure 4, after receiving the access request to service A forwarded by the gateway, service proxy a corresponding to service A checks that service A is not registered in the debugging registration service, so service proxy a will access service A The request is forwarded to a service instance PodA-1 of service A for processing.
S303:服务A向服务B发送访问请求。S303: Service A sends an access request to service B.
在此,服务A的处理过程中需要调用服务B,因此服务A向服务B发送访问请求以获得服务B的返回数据。具体来说,如图4所示,服务A的一个服务实例PodA-1向服务B发送访问请求。服务A向服务B发送的服务访问请求中,用于对服务是否进行调试注册进行检查的头部信息保持不变。Here, service B needs to be called during the processing of service A, so service A sends an access request to service B to obtain the return data of service B. Specifically, as shown in FIG. 4 , a service instance PodA-1 of service A sends an access request to service B. In the service access request sent by service A to service B, the header information used to check whether the service is registered for debugging remains unchanged.
S304:服务B对应的服务代理检查服务B是否在调试注册服务中注册。S304: The service agent corresponding to service B checks whether service B is registered in the debugging registration service.
类似地,Kubernetes集群100中的服务B同样可以有对应的多个服务实例,每个服务实例单独提供服务B的功能,服务B对应的服务代理b用于将服务B的访问请求分发到不同的服务实例以实现服务B的负载均衡。Similarly, service B in the Kubernetes cluster 100 can also have multiple corresponding service instances, each service instance independently provides the function of service B, and the service agent b corresponding to service B is used to distribute the access request of service B to different Service instance to achieve load balancing of service B.
在此,服务B与本地设备200中待调试的服务B是同一个服务,但是部署在Kubernetes集群100中的服务B难以进行调试,因此在本地设备200上部署同样的服务B,通过调试本地设备200上的服务B来确定Kubernetes集群100中同样的服务B可能存在的代码缺陷。Here, service B and the service B to be debugged in the local device 200 are the same service, but the service B deployed in the Kubernetes cluster 100 is difficult to debug, so the same service B is deployed on the local device 200, and by debugging the local device Service B on 200 to determine possible code defects in the same service B in Kubernetes cluster 100 .
本申请的一些实施例中,Kubernetes集群100中的服务代理在对服务访问请求进行转发之前,首先检查对应服务是否在调试注册服务中进行了注册,即检查访问请求中对应服务的相关信息是否能与注册信息库中的识别信息进行匹配。在此,通过对Kubernetes集群100中的服务代理进行功能增强以实现对相应服务的检查。In some embodiments of the present application, before the service agent in the Kubernetes cluster 100 forwards the service access request, it first checks whether the corresponding service is registered in the debugging registration service, that is, checks whether the relevant information of the corresponding service in the access request can be Match against identifying information in the registry. Here, the service agent in the Kubernetes cluster 100 is enhanced to check the corresponding service.
具体来说,可通过Kubernetes集群100中的服务代理的userspace模式实现对服务是否在调试注册服务中注册进行检查。通过使用服务代理的userspace模式,软件开发人员可以为服务代理提供扩展的软件代码,从而可以让服务代理实现软件开发人员期望的功能。Specifically, the userspace mode of the service agent in the Kubernetes cluster 100 can be used to check whether the service is registered in the debugging registration service. By using the userspace mode of the service agent, software developers can provide extended software codes for the service agent, so that the service agent can realize the functions expected by the software developers.
本申请的一些实施例中,服务代理根据服务访问请求中预设的头部信息确定对应服务是否进行了注册。在此,服务访问请求的头部信息中可以包括服务标识和本地设备的标识,服务代理根据服务标识和本地设备的标识确定服务是否在调试注册服务中已经注册,即检查服务标识和本地设备的标识是否能与注册信息库中的识别信息匹配。In some embodiments of the present application, the service proxy determines whether the corresponding service is registered according to the preset header information in the service access request. Here, the header information of the service access request may include the service identifier and the identifier of the local device, and the service agent determines whether the service has been registered in the debugging registration service according to the identifier of the service identifier and the identifier of the local device, that is, checks the identifier of the service identifier and the identifier of the local device. Whether the identifier can be matched with the identifying information in the registration information base.
可以理解,服务代理可以根据服务标识检查服务是否在调试注册服务中注册,也可以根据本地设备的标识检查对应服务是否在调试注册服务中注册,还可以同时根据服务标识和本地设备的标识检查服务是否在调试注册服务中注册,本申请实施例对服务代理的检查方式不做具体限制。It can be understood that the service agent can check whether the service is registered in the debugging registration service according to the service ID, can also check whether the corresponding service is registered in the debugging registration service according to the ID of the local device, and can also check the service according to the ID of the service and the ID of the local device Whether to register in the debugging registration service, this embodiment of the application does not specifically limit the checking method of the service agent.
在一些实施例中,服务访问请求是通过HTTP协议实现的网络请求,服务访问请求包 括HTTP头部信息和HTTP正文信息,HTTP头部信息包括服务请求行和服务请求参数。服务请求行用于指明服务的访问方法和服务的统一资源定位符(Uniform Resource Locator,URL)等,访问方法例如为GET、POST等。服务请求参数用于指定服务访问中使用的参数及对应的参数值。服务代理在检查服务是否在调试注册服务中注册时,可以根据服务访问请求中服务的统一资源定位符来检查,也可以根据服务访问请求中头部信息的相关参数来检查,还可以结合统一资源定位符和相关参数来检查。服务代理在检查到服务的统一资源定位符和/或相关参数能与调试注册信息库中的识别信息匹配,则确定服务已经在调试注册服务中注册。In some embodiments, the service access request is a network request implemented by the HTTP protocol, the service access request includes HTTP header information and HTTP text information, and the HTTP header information includes a service request line and a service request parameter. The service request line is used to indicate the access method of the service and the Uniform Resource Locator (Uniform Resource Locator, URL) of the service, etc. The access method is, for example, GET, POST, etc. Service request parameters are used to specify the parameters used in service access and the corresponding parameter values. When the service agent checks whether the service is registered in the debug registration service, it can check according to the uniform resource locator of the service in the service access request, or according to the relevant parameters of the header information in the service access request, and can also be combined with the unified resource Locators and related parameters to check. After the service agent checks that the uniform resource locator and/or related parameters of the service can match the identification information in the debugging registration information base, it determines that the service has been registered in the debugging registration service.
在此,注册检查使用的服务访问请求中头部信息的相关参数可以是预设的头部参数,也可以是自定义的头部参数。预设的头部参数是在HTTP头部信息的规范中定义的相关参数,可以直接根据头部信息中相关参数的参数值进行检查,可以使用的预设头部参数例如为X-Forwarded-For。X-Forwarded-For是HTTP头部信息的一个扩展参数,记载在RFC7239规范中,用于记录HTTP请求的发出设备和转发过程中经过的设备的网络地址,最多可以记录三个网络地址。Here, the relevant parameters of the header information in the service access request used by the registration check may be preset header parameters or user-defined header parameters. The preset header parameters are related parameters defined in the specification of HTTP header information, which can be checked directly according to the parameter values of related parameters in the header information. The preset header parameters that can be used are, for example, X-Forwarded-For . X-Forwarded-For is an extended parameter of HTTP header information. It is recorded in the RFC7239 specification. It is used to record the network address of the sending device of the HTTP request and the device passing through the forwarding process. Up to three network addresses can be recorded.
另外,自定义的头部参数是软件开发人员根据自身需要定义的个性化参数,用于传输个性化的数据,接收方在接收到包含自定义的头部参数的HTTP请求后,需要对自定义的头部参数进行个性化处理。这里,自定义的头部参数可以用于传递发送服务访问请求的本地设备的设备标识。In addition, the custom header parameters are personalized parameters defined by software developers according to their own needs, and are used to transmit personalized data. After receiving the HTTP request containing the custom header parameters, the receiver needs to modify the Personalize the header parameters. Here, the custom header parameter can be used to pass the device identifier of the local device sending the service access request.
服务代理对服务B在调试注册服务中的注册情况进行检查后,根据检查结果对服务B的访问请求进行转发,如果检查到服务B已经注册,则执行步骤S305,如果检查到服务B没有注册,则执行步骤S306。After the service agent checks the registration status of service B in the debugging registration service, it forwards the access request of service B according to the check result. If it is checked that service B has been registered, then step S305 is executed. If it is checked that service B is not registered, Then step S306 is executed.
S305:服务代理将对服务B的访问请求转发至本地设备200上待调试的服务B。如图4所示,服务代理b检查到服务B已经在调试注册服务中注册,因此服务代理b需要将对服务B的访问请求转发至本地设备200,本地设备200的网络地址可以来自对服务B的访问请求中的头部参数,例如X-Forwarded-For参数,也可以是调试注册服务中记录的与服务B对应的本地设备200的网络地址。S305: The service proxy forwards the access request for service B to service B to be debugged on the local device 200. As shown in Figure 4, service agent b checks that service B has registered in the debugging registration service, so service agent b needs to forward the access request to service B to local device 200, and the network address of local device 200 can be from the service B The header parameter in the access request, such as the X-Forwarded-For parameter, may also be the network address of the local device 200 corresponding to the service B recorded in the debugging registration service.
S306:如果服务B没有在调试服务中注册,服务代理将对服务B的访问请求转发至集群中服务B的实例。S306: If service B is not registered in the debugging service, the service proxy forwards the access request for service B to an instance of service B in the cluster.
在此,在服务B没有在调试注册服务中注册的情形中,即当前没有对服务B的调试需求时,对服务B的访问请求是正常的服务访问请求,因此服务代理根据多个服务B的实例的负载情况确定一个负载较轻的服务B的实例,将对服务B的访问请求转发至该实例进行处理。Here, in the case that service B is not registered in the debugging registration service, that is, when there is no debugging demand for service B at present, the access request to service B is a normal service access request, so the service agent according to multiple service B The load condition of the instance determines an instance of service B with a lighter load, and the access request for service B is forwarded to this instance for processing.
图5示出了本申请的一些实施例中多个软件开发人员同时对服务A进行调试的一种场景。如图5所示,本地设备X 200和本地设备Y 300上均部署有待调试的服务A,并分别将待调试的服务A注册到Kubernetes集群100中的调试注册服务中,本地设备X 200上待调试的服务A提供的注册信息包括本地设备X的网络地址172.0.0.101,本地设备Y 300上待调试的服务A提供的注册信息包括本地设备Y的网络地址172.0.0.102。在调试过程中,Kubernetes集群100接收到对服务A进行调用的HTTP请求,该HTTP请求可以由本地设备X 200发起,也可以由其它调用服务A的设备发起。该HTTP请求的头部信息中预设头 部参数X-Forwarded-For的值为172.0.0.101,即本地设备X 200对应的网络地址。网关接收到HTTP请求后,将其转发至服务A的服务代理a,服务代理a通过与调试注册服务的交互对服务A的注册情况进行检查,在确定服务A已经注册后服务代理a根据X-Forwarded-For的值172.0.0.101将该HTTP请求转发至对应的本地设备X 200上待调试的服务A进行处理。因此,通过在服务的访问请求的头部信息中设置不同的本地设备的标识,服务代理可以区分同时调试相同服务的本地设备,从而对服务的访问请求转发至正确的目的设备。Fig. 5 shows a scenario in which multiple software developers debug service A at the same time in some embodiments of the present application. As shown in Figure 5, the service A to be debugged is deployed on the local device X 200 and the local device Y 300, and the service A to be debugged is registered in the debugging registration service in the Kubernetes cluster 100 respectively, and the service A to be debugged is registered on the local device X 200. The registration information provided by the debugged service A includes the network address 172.0.0.101 of the local device X, and the registration information provided by the service A to be debugged on the local device Y 300 includes the network address 172.0.0.102 of the local device Y. During the debugging process, the Kubernetes cluster 100 receives an HTTP request for invoking service A, and the HTTP request may be initiated by the local device X 200 or by other devices that invoke service A. The value of the preset header parameter X-Forwarded-For in the header information of the HTTP request is 172.0.0.101, which is the corresponding network address of the local device X200. After the gateway receives the HTTP request, it forwards it to service agent a of service A. Service agent a checks the registration status of service A through the interaction with the debugging registration service. After confirming that service A has been registered, service agent a according to X- The value of Forwarded-For is 172.0.0.101 and the HTTP request is forwarded to the service A to be debugged on the corresponding local device X 200 for processing. Therefore, by setting the identifiers of different local devices in the header information of the service access request, the service agent can distinguish the local devices that are debugging the same service at the same time, so that the service access request is forwarded to the correct destination device.
图6示出了本申请的一些实施例中多个软件开发人员同时对服务A进行调试的另一种场景。如图6所示,本地设备X 200和本地设备Y 300上均部署有待调试的服务A,并分别将待调试的服务A注册到Kubernetes集群100中的调试注册服务中,本地设备X 200上待调试的服务A提供的注册信息包括本地设备X的网络地址172.0.0.101,本地设备Y 300上待调试的服务A提供的注册信息包括本地设备Y的网络地址172.0.0.102。在调试过程中,Kubernetes集群100接收到对服务A进行调用的HTTP请求,该HTTP请求的头部信息中预设头部参数X-Forwarded-For的值为172.0.0.103。网关接收到HTTP请求后,将其转发至服务A的服务代理a,服务代理a通过与调试注册服务的交互对服务A的注册情况进行检查,确定服务A虽然已经注册,但是注册信息中的网络地址与HTTP请求中的参数值172.0.0.103不符,因此服务代理a将该HTTP请求转发至服务A的一个实例PodA-1进行处理。因此,通过在服务的访问请求的头部信息中设置与待调试的服务所在本地设备不同的标识或不对预设的头部参数进行设置,可以使服务代理区分待调试服务的访问请求和正常的访问请求,将正常的访问请求转发至集群中的服务实例进行处理。Fig. 6 shows another scenario in which multiple software developers debug service A at the same time in some embodiments of the present application. As shown in Figure 6, the service A to be debugged is deployed on the local device X 200 and the local device Y 300, and the service A to be debugged is registered in the debugging registration service in the Kubernetes cluster 100 respectively, and the service A to be debugged is registered on the local device X 200. The registration information provided by the debugged service A includes the network address 172.0.0.101 of the local device X, and the registration information provided by the service A to be debugged on the local device Y 300 includes the network address 172.0.0.102 of the local device Y. During the debugging process, the Kubernetes cluster 100 receives an HTTP request for invoking service A, and the value of the header parameter X-Forwarded-For in the header information of the HTTP request is 172.0.0.103. After the gateway receives the HTTP request, it forwards it to the service agent a of service A. Service agent a checks the registration status of service A through the interaction with the debugging registration service, and determines that although service A has been registered, the network in the registration information The address does not match the parameter value 172.0.0.103 in the HTTP request, so service agent a forwards the HTTP request to an instance of service A, PodA-1, for processing. Therefore, by setting an identifier different from the local device where the service to be debugged is located in the header information of the service access request or not setting the preset header parameters, the service agent can distinguish the access request of the service to be debugged from the normal For access requests, normal access requests are forwarded to service instances in the cluster for processing.
图7示出了本申请的一些实施例中本地设备上的待调试的服务对Kubernetes集群中服务进行访问的场景。如图7所示,本地设备200上待调试的服务B需要对Kubernetes集群100中的服务C进行调用,由于本地设备200上的服务不能直接访问Kubernetes集群100中的服务,因此待调试的服务B通过Kubernetes集群100中的影子服务实现对服务C的调用,这里的影子服务由软件开发人员在本地设备200上通过使用本地命令行工具在Kubernetes集群100上创建,本地命令行工具是由Kubernetes***提供的命令行控制工具,通过本地命令行工具可以对Kubernetes集群100进行控制和管理。这里,通过本地命令行工具创建影子服务并建立代理通道后,待调试的服务B可以请求访问服务C,代理通道可以有多种形式,如VPN、SOCKS5等。另外,创建的影子服务可以被多个本地设备共享,即多个本地设备上待调试的服务可以通过一个影子服务对Kubernetes集群100中的服务进行访问,从而能够降低Kubernetes集群100的资源消耗。FIG. 7 shows a scenario where a service to be debugged on a local device accesses a service in a Kubernetes cluster in some embodiments of the present application. As shown in Figure 7, the service B to be debugged on the local device 200 needs to call the service C in the Kubernetes cluster 100. Since the service on the local device 200 cannot directly access the service in the Kubernetes cluster 100, the service B to be debugged The call to service C is realized through the shadow service in the Kubernetes cluster 100, where the shadow service is created on the Kubernetes cluster 100 by the software developer on the local device 200 by using a local command line tool provided by the Kubernetes system The command line control tool can control and manage the Kubernetes cluster 100 through the local command line tool. Here, after the shadow service is created through the local command line tool and the proxy channel is established, the service B to be debugged can request to access the service C. The proxy channel can have various forms, such as VPN, SOCKS5, etc. In addition, the created shadow service can be shared by multiple local devices, that is, services to be debugged on multiple local devices can access services in the Kubernetes cluster 100 through a shadow service, thereby reducing resource consumption of the Kubernetes cluster 100 .
另外,图8示出了一种服务调试的路由***的结构示意图,可以理解,上述服务调试的路由方法中的具体技术细节,在该路由***中也适用,为了避免重复,在此不再赘述。In addition, FIG. 8 shows a schematic structural diagram of a routing system for service debugging. It can be understood that the specific technical details of the routing method for service debugging above are also applicable to this routing system. In order to avoid repetition, details are not repeated here. .
如图8所示,该服务调试的路由***800,包括客户端810和服务器端820,As shown in Figure 8, the routing system 800 debugged by this service includes a client 810 and a server 820,
客户端810包括调试注册模块811,调试注册模块811将待调试的第一服务的识别信息发送至服务器端820,识别信息至少包括待调试的第一服务的服务标识和客户端的设备标识,待调试的第一服务部署在客户端810上;The client 810 includes a debugging registration module 811. The debugging registration module 811 sends the identification information of the first service to be debugged to the server 820. The identification information includes at least the service identifier of the first service to be debugged and the device identifier of the client. The first service of is deployed on the client 810;
服务器端820包括信息存储模块821、服务检查模块822和服务转发模块823,服务器端820上部署有与待调试的第一服务具有相同服务标识的第二服务;The server end 820 includes an information storage module 821, a service checking module 822 and a service forwarding module 823, and a second service having the same service identifier as the first service to be debugged is deployed on the server end 820;
信息存储模块821,接收客户端发送的待调试的第一服务的识别信息,并将识别信息保存在调试注册信息库中;The information storage module 821 receives the identification information of the first service to be debugged sent by the client, and stores the identification information in the debugging registration information database;
服务检查模块822,用于第二服务对应的服务代理接收其它外部服务或内部服务对第二服务的访问请求,并将访问请求中的预设信息与调试注册信息库中的识别信息进行匹配;The service checking module 822 is used for the service agent corresponding to the second service to receive access requests from other external services or internal services to the second service, and match the preset information in the access request with the identification information in the debugging registration information base;
服务转发模块823,用于确定存在匹配结果,服务代理将访问请求转发至匹配的客户端810上部署的待调试的第一服务。本申请公开的机制的各实施例可以被实现在硬件、软件、固件或这些实现方法的组合中。本申请的实施例可实现为在可编程***上执行的计算机程序或程序代码,该可编程***包括至少一个处理器、存储***(包括易失性和非易失性存储器和/或存储元件)、至少一个输入设备以及至少一个输出设备。The service forwarding module 823 is configured to determine that there is a matching result, and the service agent forwards the access request to the matched first service deployed on the client 810 to be debugged. Various embodiments of the mechanisms disclosed in this application may be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of the present application may be implemented as a computer program or program code executed on a programmable system comprising at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements) , at least one input device, and at least one output device.
可将程序代码应用于输入指令,以执行本申请描述的各功能并生成输出信息。可以按已知方式将输出信息应用于一个或多个输出设备。为了本申请的目的,处理***包括具有诸如例如数字信号处理器(Digital Signal Processor,DSP)、微控制器、专用集成电路(Application Specific Integrated Circuit,ASIC)或微处理器之类的处理器的任何***。Program code can be applied to input instructions to perform the functions described herein and to generate output information. The output information may be applied to one or more output devices in known manner. For the purposes of this application, a processing system includes any computer having a processor such as, for example, a Digital Signal Processor (DSP), a microcontroller, an Application Specific Integrated Circuit (ASIC), or a microprocessor. system.
程序代码可以用高级程序化语言或面向对象的编程语言来实现,以便与处理***通信。在需要时,也可用汇编语言或机器语言来实现程序代码。事实上,本申请中描述的机制不限于任何特定编程语言的范围。在任一情形下,该语言可以是编译语言或解释语言。The program code can be implemented in a high-level procedural language or an object-oriented programming language to communicate with the processing system. Program code can also be implemented in assembly or machine language, if desired. In fact, the mechanisms described in this application are not limited in scope to any particular programming language. In either case, the language may be a compiled or interpreted language.
在一些情况下,所公开的实施例可以以硬件、固件、软件或其任何组合来实现。所公开的实施例还可以被实现为由一个或多个暂时或非暂时性机器可读(例如,计算机可读)存储介质承载或存储在其上的指令,其可以由一个或多个处理器读取和执行。例如,指令可以通过网络或通过其他计算机可读介质分发。因此,机器可读介质可以包括用于以机器(例如,计算机)可读的形式存储或传输信息的任何机制,包括但不限于,软盘、光盘、光碟、只读存储器(CD-ROMs)、磁光盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、磁卡或光卡、闪存、或用于利用因特网以电、光、声或其他形式的传播信号来传输信息(例如,载波、红外信号数字信号等)的有形的机器可读存储器。因此,机器可读介质包括适合于以机器(例如计算机)可读的形式存储或传输电子指令或信息的任何类型的机器可读介质。In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments can also be implemented as instructions carried by or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which can be executed by one or more processors read and execute. For example, instructions may be distributed over a network or via other computer-readable media. Thus, a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magnetic CD-ROM, Read Only Memory (ROM), Random Access Memory (Random Access Memory, RAM), Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Only Memory Read memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic card or optical card, flash memory, or use the Internet to transmit information by means of electricity, light, sound or other forms of propagation signals (for example, carrier waves, infrared signals, digital signals etc.) tangible machine-readable storage. Thus, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, a computer).
在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。In the drawings, some structural or methodological features may be shown in a particular arrangement and/or order. However, it should be understood that such specific arrangements and/or orderings may not be required. Rather, in some embodiments, these features may be arranged in a different manner and/or order than shown in the illustrative figures. Additionally, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments these features may not be included or may be combined with other features.
需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存 在其它的单元/模块。It should be noted that each unit/module mentioned in each device embodiment of this application is a logical unit/module. Physically, a logical unit/module can be a physical unit/module, or a physical unit/module. A part of the module can also be realized with a combination of multiple physical units/modules, the physical implementation of these logical units/modules is not the most important, the combination of functions realized by these logical units/modules is the solution The key to the technical issues raised. In addition, in order to highlight the innovative part of this application, the above-mentioned device embodiments of this application do not introduce units/modules that are not closely related to solving the technical problems proposed by this application, which does not mean that the above-mentioned device embodiments do not exist other units/modules.
需要说明的是,在本专利的示例和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in the examples and descriptions of this patent, relative terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply There is no such actual relationship or order between these entities or operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。Although this application has been shown and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and details may be made therein without departing from this disclosure. The spirit and scope of the application.

Claims (11)

  1. 一种服务调试的路由方法,用于包括服务器端和客户端的***,其特征在于,包括:A routing method for service debugging, used for a system including a server and a client, characterized in that it includes:
    所述客户端将待调试的第一服务的识别信息发送至所述服务器端,并由所述服务器端保存在调试注册信息库中,其中,所述识别信息至少包括所述待调试的第一服务的服务标识和所述客户端的设备标识,所述待调试的第一服务部署在所述客户端上,所述服务器端上部署有与所述待调试的第一服务具有相同服务标识的第二服务;The client sends the identification information of the first service to be debugged to the server, and the server saves it in a debugging registration information database, wherein the identification information includes at least the first service to be debugged. The service identifier of the service and the device identifier of the client, the first service to be debugged is deployed on the client, and the server is deployed with the first service having the same service identifier as the first service to be debugged. 2. Services;
    所述服务器端上第二服务对应的服务代理接收其它外部服务或内部服务对所述第二服务的访问请求,并将所述访问请求中的预设信息与所述调试注册信息库中的识别信息进行匹配;The service proxy corresponding to the second service on the server side receives access requests from other external services or internal services to the second service, and combines the preset information in the access request with the identification in the debugging registration information base match the information;
    确定存在匹配结果,所述服务代理将所述访问请求转发至匹配的所述客户端上部署的所述待调试的第一服务。It is determined that there is a matching result, and the service agent forwards the access request to the matched first service to be debugged deployed on the client.
  2. 根据权利要求1所述的方法,其特征在于,所述服务器端部署有Kubernetes***,所述第二服务部署在Kubernetes***的软件应用容器中。The method according to claim 1, wherein the server end is deployed with a Kubernetes system, and the second service is deployed in a software application container of the Kubernetes system.
  3. 根据权利要求2所述的方法,其特征在于,对所述第二服务的访问请求为HTTP请求。The method according to claim 2, wherein the access request for the second service is an HTTP request.
  4. 根据权利要求3所述的方法,其特征在于,将所述访问请求中的预设信息与所述调试注册信息库中的识别信息进行匹配,包括:The method according to claim 3, wherein matching the preset information in the access request with the identification information in the debugging registration information database includes:
    将所述访问请求中的服务标识和设备标识与所述调试注册信息库中的识别信息进行匹配,其中,所述服务标识和所述设备标识位于所述访问请求的头部信息中。Matching the service identifier and the device identifier in the access request with the identification information in the debugging registration information base, wherein the service identifier and the device identifier are located in the header information of the access request.
  5. 根据权利要求4所述的方法,其特征在于,所述服务标识至少包括如下一种:服务名称、服务的统一资源标识符,所述设备标识至少包括如下一种:设备的统一资源标识符、设备的网络地址、设备的硬件识别码。The method according to claim 4, wherein the service identifier includes at least one of the following: service name, uniform resource identifier of the service, and the device identifier includes at least one of the following: uniform resource identifier of the device, The network address of the device, the hardware identification code of the device.
  6. 根据权利要求5所述的方法,其特征在于,所述设备标识记录在所述访问请求的头部信息的X-Forwarded-For参数中。The method according to claim 5, wherein the device identifier is recorded in the X-Forwarded-For parameter of the header information of the access request.
  7. 根据权利要求3所述的方法,其特征在于,所述服务代理将所述访问请求转发至匹配的所述客户端上部署的所述待调试的第一服务,包括:The method according to claim 3, wherein the service agent forwards the access request to the matched first service deployed on the client to be debugged, comprising:
    所述服务代理根据所述访问请求中的设备标识确定匹配的所述客户端对应的网络地址;The service agent determines the matching network address of the client according to the device identifier in the access request;
    所述服务代理根据确定的网络地址,将所述访问请求转发至所述网络地址对应的所述客户端上部署的所述待调试的第一服务。The service proxy forwards the access request to the first service to be debugged deployed on the client corresponding to the network address according to the determined network address.
  8. 根据权利要求1所述的方法,其特征在于,确定存在匹配结果,还包括:The method according to claim 1, wherein determining that there is a matching result further comprises:
    在不存在匹配结果的情况下,所述服务代理将所述访问请求转发至所述服务器端部署 的所述第二服务的服务实例。If there is no matching result, the service proxy forwards the access request to the service instance of the second service deployed on the server.
  9. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    存储器,用于存储由电子设备的一个或多个处理器执行的指令,以及memory for storing instructions to be executed by one or more processors of the electronic device, and
    处理器,是电子设备的处理器之一,用于执行权利要求1-8中任一项所述的服务调试的路由方法。The processor is one of the processors of the electronic device, configured to execute the routing method for service debugging according to any one of claims 1-8.
  10. 一种可读存储介质,其特征在于,所述可读存储介质上存储有指令,该指令在电子设备上执行时使电子设备执行权利要求1-8中任一项所述的服务调试的路由方法。A readable storage medium, characterized in that instructions are stored on the readable storage medium, and when the instructions are executed on the electronic equipment, the electronic equipment executes the service debugging route described in any one of claims 1-8 method.
  11. 一种计算机程序产品,包括计算机程序/指令,其特征在于,该计算机程序/指令被处理器执行时实现权利要求1-8中任一项所述的服务调试的路由方法。A computer program product, comprising computer programs/instructions, characterized in that, when the computer programs/instructions are executed by a processor, the routing method for service debugging according to any one of claims 1-8 is implemented.
PCT/CN2022/132321 2021-12-10 2022-11-16 Routing method for service debugging, electronic device, medium and program product WO2023103727A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111509818.2 2021-12-10
CN202111509818.2A CN114205342B (en) 2021-12-10 2021-12-10 Service debugging routing method, electronic equipment and medium

Publications (1)

Publication Number Publication Date
WO2023103727A1 true WO2023103727A1 (en) 2023-06-15

Family

ID=80652451

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/132321 WO2023103727A1 (en) 2021-12-10 2022-11-16 Routing method for service debugging, electronic device, medium and program product

Country Status (2)

Country Link
CN (1) CN114205342B (en)
WO (1) WO2023103727A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205342B (en) * 2021-12-10 2023-05-16 易保网络技术(上海)有限公司 Service debugging routing method, electronic equipment and medium
US11943115B2 (en) * 2022-04-05 2024-03-26 International Business Machines Corporation Locally debugging remote deployment of microservices
CN115391215B (en) * 2022-08-31 2023-11-17 江苏安超云软件有限公司 Method and application for full link debugging under micro-service architecture
CN115633073B (en) * 2022-09-02 2023-11-14 易保网络技术(上海)有限公司 Micro-service calling method, electronic device, system and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190028569A1 (en) * 2017-07-18 2019-01-24 Citrix Systems, Inc. Cloud to on-premises debug service routing
CN111263933A (en) * 2017-09-30 2020-06-09 甲骨文国际公司 Real-time debug instances in deployed container platforms
CN113360377A (en) * 2021-06-01 2021-09-07 北京京东振世信息技术有限公司 Test method and device
CN113574845A (en) * 2019-04-26 2021-10-29 国际商业机器公司 Internal and external debug
CN114205342A (en) * 2021-12-10 2022-03-18 易保网络技术(上海)有限公司 Routing method, electronic device, medium, and program product for service debugging
CN114546843A (en) * 2022-02-11 2022-05-27 支付宝(杭州)信息技术有限公司 Program debugging processing method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2504491A (en) * 2012-07-30 2014-02-05 Ibm Remote debug service in a cloud environment
CN110018956B (en) * 2019-01-28 2022-05-13 创新先进技术有限公司 Application debugging method and related device
CN111614738B (en) * 2020-05-07 2022-05-10 北京金山云网络技术有限公司 Service access method, device, equipment and storage medium based on Kubernetes cluster
CN112187958A (en) * 2020-11-11 2021-01-05 北京金和网络股份有限公司 Method and device for registering, discovering and forwarding microservice
CN112597013A (en) * 2020-12-16 2021-04-02 北京三快在线科技有限公司 Online development and debugging method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190028569A1 (en) * 2017-07-18 2019-01-24 Citrix Systems, Inc. Cloud to on-premises debug service routing
CN111263933A (en) * 2017-09-30 2020-06-09 甲骨文国际公司 Real-time debug instances in deployed container platforms
CN113574845A (en) * 2019-04-26 2021-10-29 国际商业机器公司 Internal and external debug
CN113360377A (en) * 2021-06-01 2021-09-07 北京京东振世信息技术有限公司 Test method and device
CN114205342A (en) * 2021-12-10 2022-03-18 易保网络技术(上海)有限公司 Routing method, electronic device, medium, and program product for service debugging
CN114546843A (en) * 2022-02-11 2022-05-27 支付宝(杭州)信息技术有限公司 Program debugging processing method and device

Also Published As

Publication number Publication date
CN114205342A (en) 2022-03-18
CN114205342B (en) 2023-05-16

Similar Documents

Publication Publication Date Title
WO2023103727A1 (en) Routing method for service debugging, electronic device, medium and program product
US11106480B2 (en) Systems, methods, and apparatus to improve containerized application visibility
JP7053732B2 (en) Virtual network verification service
CN107947961B (en) SDN-based Kubernetes network management system and method
CN106776313B (en) Method and device for simulating service and centralized management platform
CN112165532B (en) Node access method, device, equipment and computer readable storage medium
US8424026B1 (en) Execution of applications distributed across a plurality of computing devices
CN102185900B (en) Application service platform system and method for developing application services
US11991077B2 (en) Data interfaces with isolation for containers deployed to compute nodes
CN106663033B (en) System and method for supporting a wraparound domain and proxy model and updating service information for cross-domain messaging in a transactional middleware machine environment
US20120290695A1 (en) Distributed Policy Service
US20120291024A1 (en) Virtual Managed Network
CN113301116A (en) Cross-network communication method, device, system and equipment for microservice application
JP2019517168A (en) Interconnection between physical and virtual networks
US20230126651A1 (en) Streamlined onboarding of offloading devices for provider network-managed servers
CN110855488B (en) Virtual machine access method and device
CN115086166B (en) Computing system, container network configuration method, and storage medium
US10547590B1 (en) Network processing using asynchronous functions
CN114143241A (en) Joint debugging testing method, device, equipment and medium based on Kubernetes
CN110417782B (en) System, method and readable medium for intelligent hardware message transmission
CN116263694A (en) Warehouse cluster deployment method and device and computing equipment
WO2017166166A1 (en) System and method for providing runtime tracing for web-based client accessing transactional middleware platform using extension interface
CN116389599A (en) Gateway service request processing method and device and cloud native gateway system management method and device
WO2015196761A1 (en) Method and device for testing forwarding performance of cpu
US11188346B2 (en) Obtaining environment information in a computing environment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22903150

Country of ref document: EP

Kind code of ref document: A1