A method and system for implementing dynamic proxy based on f-stack and nginx
A dynamic proxy and purpose technology, applied in the field of Internet communication, can solve problems that are not suitable for large concurrency and high throughput application scenarios, and achieve the effect of satisfying large concurrency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0044] Such as figure 1 As shown, the first aspect of the present invention proposes a kind of method based on F-Stack and Nginx to realize dynamic agent, described method comprises the following steps:
[0045] S101: Receive a data packet, and put the data packet on the corresponding queue of the network card; the data packet includes a request data packet from the client and a response data packet from the server;
[0046] Specifically, the DPDK gateway receives the request data packet from the client or the response data packet from the server, calculates the hash value according to the quintuple information in the data packet, and then takes the remainder of the queue number of the network card to determine where the received data packet is placed. on the corresponding queue of the network card.
[0047] A queue of a network card is processed by a corresponding CPU core, queues of all network cards with the same number are processed by a designated CPU core, and a worker ...
Embodiment 2
[0058] Taking the signaling protocol of Nginx parsing SIP as an example, the present invention is further set forth based on F-Stack and Nginx to realize the dynamic agent method, comprising the following steps:
[0059] Step A1: Preset the media receiving address carried in the video viewing signaling packet when the server is viewing video as serip+recv_media_port;
[0060] Step A2: Nginx rewrites the media receiving address in the video viewing signaling packet sent by the server as vip+recv_media_vport, and forwards it to the client;
[0061] Step A3: The client responds with the push address cip+push_media_port in the 200-OK signaling;
[0062] Step A4: Nginx rewrites the media push address in the client response 200-OK signaling to lip+push_media_lport, and uses shared memory to issue proxy rules to all worker processes.
[0063] Specifically, in the proxy rules issued in step A4, the media listening address is: vip+recv_media_vport, the streaming address of the client ...
Embodiment 3
[0067] Taking the media data transmission of SIP as an example, the present invention is further set forth based on F-Stack and Nginx to realize the dynamic agent method, comprising the following steps:
[0068] Step B1: The client pushes the video stream, and the source address and destination address in the request packet are cip+push_media_port->vip+recv_media_vport, and the request packet is handled by a worker process;
[0069] Step B2: the request packet is first processed by the hook function of the ipfw mechanism, and whether there is a connection tracking table according to the quintuple information in the request packet, if there is a connection tracking table, then use the connection tracking table in the connection tracking table The cache information rewrites the source address and destination address in the request packet;
[0070] Step B3: Determine whether the destination address of the request packet matches the media listening address in the proxy rule. If it...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com