CN108123912B - Micro service system supporting P2P - Google Patents

Micro service system supporting P2P Download PDF

Info

Publication number
CN108123912B
CN108123912B CN201611064190.9A CN201611064190A CN108123912B CN 108123912 B CN108123912 B CN 108123912B CN 201611064190 A CN201611064190 A CN 201611064190A CN 108123912 B CN108123912 B CN 108123912B
Authority
CN
China
Prior art keywords
client
stun server
stun
server
intranet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611064190.9A
Other languages
Chinese (zh)
Other versions
CN108123912A (en
Inventor
江海国
王伟
韩凯
朱立松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cntv Wuxi Co ltd
Original Assignee
Cntv Wuxi Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cntv Wuxi Co ltd filed Critical Cntv Wuxi Co ltd
Priority to CN201611064190.9A priority Critical patent/CN108123912B/en
Publication of CN108123912A publication Critical patent/CN108123912A/en
Application granted granted Critical
Publication of CN108123912B publication Critical patent/CN108123912B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0227Filtering policies
    • H04L63/0236Filtering by address, protocol, port number or service, e.g. IP-address or URL
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/164Adaptation or special uses of UDP protocol

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a micro-service system supporting P2P in the technical field of micro-service systems, which comprises a P2P client, an intranet server, a Router route, a STUN server and a TRAVERSA L, wherein a UDP request protocol is used as a communication protocol of the micro-service system, the STUN server uniformly filters and forwards the communication protocol, the P2P client is supported to directly send the communication protocol through the TRAVERSA L, the STUN server establishes NAT mapping table items of media streams on NAT in advance, and various micro-services can be deployed in different local area networks.

Description

Micro service system supporting P2P
Technical Field
The invention relates to the technical field of micro service systems, in particular to a micro service system supporting P2P.
Background
The microservice architecture is a distributed system architecture that suggests to segment traffic into finer-grained services and requires independent deployment of responsibility for each service, high cohesion within the service, low coupling between services, mutual isolation, etc. In addition, a unified API is provided to the outside according to a model for service-oriented business domains. The micro service architecture suggests to disassemble services according to services, and the most appropriate technology can be completely selected to realize specific services, and only the API interfaces provided externally are required to be kept consistent. Since the system can be split into multiple services, when these services are configured, the current practice generally directly deploys the services on the public network (or deploys one-end services on the public network and one-end services on the local area network) to facilitate mutual communication between the services, which has the disadvantage that more money is required, and a large number of services are configured by buying a large number of ip addresses of the public network; a large number of services are deployed in a public network, so that network attacks are easy to find, and the security is poor; when the systems are all placed in a local area network, the system does not have good expansibility (a machine room cannot be built across regions) so as to respond to the requests of a large number of cross-region clients, and therefore, a micro service system supporting P2P is provided.
Disclosure of Invention
The invention aims to provide a micro-service system supporting P2P, which solves the problems that more money needs to be spent and a large number of services are deployed by buying a large number of public network ip addresses in the background art; a large number of services are deployed in a public network, so that network attacks are easy to find, and the security is poor; when the system is placed in a local area network, the system does not have good expansibility (a machine room cannot be built across regions) so as to solve the problem of large number of requests of cross-region clients.
In order to achieve the above object, the invention provides the following technical scheme that the micro service system supporting P2P comprises a P2P client, an intranet server, a Router route, a STUN server and a TRAVERSA L, a UDP request protocol is used as a communication protocol of the micro service system, the STUN server uniformly filters and forwards the communication protocol, the P2P client is supported to directly send the communication protocol through the TRAVERSA L, the STUN server establishes NAT mapping table entries of media streams on NAT in advance, and the specific component content is as follows:
STUN server: the STUN server is a control center of a micro service system supporting the P2P, all request messages are detected and distributed by the STUN server, when entering the network, a P2P client needs to perform request registration in the STUN server, after the registration is passed, the information of the P2P client registered by the P2P client is stored in a memory of the STUN server, and the functions of establishing information exchange and modifying conversation between the P2P clients are achieved in the system;
the P2P client is added into the network of the STUN server, one P2P client is used as a service site of the STUN server to carry out information transmission with another P2P client, and when the detection information passes, the P2P client is added into the STUN server site and carries out TRAVERSA L direct information transmission;
an intranet server: the intranet servers are used as hubs for establishing information transmission among the P2P clients, the intranet servers are connected into a mapping network taking the STUN server as a center to play a role in information transmission, and the intranet servers are added into the STUN server network;
route routing: the route is used as a transmission tool for the contact between the P2P clients, the set use standard needs to have the matching of a user name and a password to use the intranet server to play a certain firewall role, the route is connected with the P2P client and the STUN server, and the route is added into the STUN server network;
TRAVERSA L, the STUN server protocol establishes NAT mapping table items of media stream in advance on NAT, and after the network between P2P clients is established, the information exchange of the P2P clients between internal networks is carried out through NAT TRAVERSA L.
Preferably, the network service types supported by the P2P client include an intranet service and a STUN service, wherein the intranet service serves as a basis for establishing contact between the P2P client and serves as an information communication carrier, and the STUN service serves as a control center in an information communication process between the P2P clients.
Preferably, the microservice system where the P2P client is located is deployed in different intranet services, and services not in the same lan are subjected to network penetration through STUN service, so as to realize registration and communication between services.
Compared with the prior art, the invention has the beneficial effects that: various micro services can be deployed in different local area networks, so that the communication efficiency of the services in the same local area network is higher, the services are safer, the services which are not in the same local area network penetrate through the network by using the STUN standard protocol, the registration and communication among the services are realized, the high efficiency and the safety similar to the local area network can be achieved, and the fund pressure and the network attack brought by deploying a large number of services in a public network are reduced.
Drawings
FIG. 1 is a schematic block diagram of the present invention;
FIG. 2 is a flow chart of the present invention.
In the figure, 1P2P client, 2 intranet server, 3route, 4STUN server and 5TRAVERSA L.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
STUN's full name Simple traversal over UDP Through Network addresses relays, i.e. Simple traversal over NAT by UDP (Symmetric NAT), client (host provided service within the home Network, compare STUN C L iett) sends a request to STUN SERVER outside NAT according to UDP request protocol, the request message continues forwarding the translated Address after reaching NAT, STUN SERVER receives the request message, generates a response message carrying the source port number of the request message (i.e. the port number on which STUN C L iett communicates outside on NAT) and then sends the response message to STUN C L iett Through NAT, STUN C L iett knows its corresponding external Address on NAT by the content in the response message body and fills it in the UDP load of the later call protocol, the opposite end, and also can register this translated Address directly at the terminal, thus solving the problem of traversal over mgc NAT and media stream mapping on the NAT.
Referring to fig. 1-2, the present invention provides a technical solution, wherein a P2P-supporting microservice system includes a P2P client 1, an intranet server 2, a ROUTER 3, a STUN server 4 and a trasversa L5, a UDP request protocol is used as a communication protocol of the microservice system, the STUN server 4 filters and forwards the communication protocol uniformly, and supports the P2P client 1 to send directly through the trassa L5, the STUN server 4 establishes a NAT mapping table entry of a media stream in advance on a NAT, and the specific component contents are:
STUN server 4: the STUN server 4 is a control center of a micro service system supporting the P2P, all request messages are detected and distributed by the STUN server 4, when entering the network, the P2P client 1 needs to perform request registration in the STUN server 4, after the registration is passed, the P2P client 1 information registered by the P2P client 1 is stored in a memory of the STUN server 4, and the functions of establishing information exchange and modifying conversation between the P2P clients 1 are achieved in the system;
the P2P client 1 joins the network of the STUN server 4, one P2P client 1 is used as a service site of the STUN server 4 to carry out information transmission with another P2P client 1, and when the detection information passes, the P2P client 1 joins the STUN server 4 site and carries out TRAVERSA L5 direct information transmission;
and the intranet server 2: the intranet server 2 is used as a hub for establishing information transmission between the P2P client sides 1, the intranet servers 2 are connected into a mapping network taking the STUN server 4 as a center to play a role in information transmission, and the intranet server 2 is added into the STUN server 4 network;
route 3: the route 3 is used as a transmission tool for the contact between the P2P client 1, the set use standard needs to have the matching of a user name and a password to use the intranet server 2 to play a certain firewall role, the route 3 is connected with the P2P client 1 and the STUN server 4, and the route 3 is added into the STUN server 4 network;
the protocol of TRAVERSA L5, STUN server 4, establishes NAT mapping table items of media stream in advance on NAT, and after the network between P2P client 1 is established, the information exchange of P2P client 1 between internal networks is carried out through NAT TRAVERSA L5.
The network service types supported by the P2P client 1 include intranet service and STUN service, wherein the intranet service is used as a basis for establishing contact between the P2P client 1 and plays a role of an information communication carrier, the STUN service is used as a control center in an information communication process between the P2P client 1, a micro service system where the P2P client 1 is located is deployed in different intranet services, services which are not in the same local area network penetrate the network through the STUN service, and registration and communication between the services are achieved.
Before information exchange between P2P client 1, file storage is established on STUN server 4, namely registration information is established, P2P client 1 sends a request to STUN server 4 outside NAT according to UDP request protocol, the request message reaches NAT through route 3 and then is forwarded continuously, STUN server 4 receives the request message, generates a response message, the response message carries the source port number of the request message (namely the port number of the outward communication of STUN C L IENT on NAT), then the response message is sent to STUN C L IENT through the response message, STUN C L IENT knows the corresponding external address on NAT through the content in the response message body, and fills the external address into UDP load of the call protocol later, informs the opposite end, and can directly register the converted public IP address when the terminal registers, thus solving the problem of communication establishment of MGCP/SIP and the problem when the client passes through the client, the client establishes the called information after being registered, stores the called information in STUN server 4 as central control system 4625 for exchanging information between STUN P server 464, and the central control server 592 exchanging the client side 464.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (3)

1. A micro service system supporting P2P is characterized in that the system comprises a P2P client (1), an intranet server (2), a Router ROUTER (3), a STUN server (4) and a TRAVERSA L (5), a UDP request protocol is used as a communication protocol of the micro service system, the STUN server (4) uniformly filters and forwards the communication protocol, the P2P client (1) is supported to directly send the communication protocol through the TRAVERSA L (5), the STUN server (4) establishes mapping table entries of media streams on NAT in advance, and the specific component contents are as follows:
STUN server (4): the STUN server (4) is a control center of a microservice system supporting the P2P, all request messages are detected and distributed by the STUN server (4), then the STUN server generates response messages, when the STUN server enters the network, the P2P client (1) needs to perform request registration on the STUN server (4), after the registration is passed, the information of the P2P client (1) registered by the P2P client (1) is stored in a memory of the STUN server (4), and the functions of establishing information exchange and modifying conversation between the P2P clients (1) are achieved in the system;
the P2P client (1) joins the network of the STUN server (4), a P2P client (1) as a service station of the STUN server (4) and carries out information transmission with another P2P client (1), when the detection information passes through, the P2P client (1) joins the STUN server (4) station and carries out TRAVERSA L (5) direct information transmission;
intranet server (2): the intranet servers (2) are used as hubs for establishing information transmission between the P2P client sides (1), the intranet servers (2) are connected into a mapping network taking the STUN server (4) as the center to play a role in information transmission, and the intranet servers (2) are added into the STUN server (4) network;
route routing (3): the route (3) is used as a transmission tool for the contact between the P2P clients (1), the set use standard needs to be matched with a user name and a password to use the intranet server (2) to play a certain firewall role, the route (3) is connected with the P2P client (1) and the STUN server (4), and the route (3) is added into the STUN server (4) network;
and TRAVERSA L (5) establishing NAT mapping table items of the media stream on NAT in advance by a STUN server (4) protocol, and after the network between the P2P client (1) is established, performing information exchange between the P2P client (1) and the intranet through the NAT and the TRAVERSA L (5).
2. The microservice system supporting P2P, according to claim 1, wherein: the network service types supported by the P2P client (1) comprise an intranet service and a STUN service, wherein the intranet service is used as a basis for establishing contact between the P2P client (1) and plays a role of an information communication carrier, and the STUN service is used as a control center in the information communication process between the P2P client (1).
3. The microservice system supporting P2P, according to claim 1, wherein: the micro service system where the P2P client (1) is located is deployed in different intranet services, services which are not in the same local area network are subjected to network penetration through the STUN service, and registration and communication among the services are achieved.
CN201611064190.9A 2016-11-28 2016-11-28 Micro service system supporting P2P Active CN108123912B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611064190.9A CN108123912B (en) 2016-11-28 2016-11-28 Micro service system supporting P2P

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611064190.9A CN108123912B (en) 2016-11-28 2016-11-28 Micro service system supporting P2P

Publications (2)

Publication Number Publication Date
CN108123912A CN108123912A (en) 2018-06-05
CN108123912B true CN108123912B (en) 2020-07-10

Family

ID=62223719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611064190.9A Active CN108123912B (en) 2016-11-28 2016-11-28 Micro service system supporting P2P

Country Status (1)

Country Link
CN (1) CN108123912B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795486A (en) * 2019-10-29 2020-02-14 北京中电普华信息技术有限公司 Micro-service platform
CN112866091B (en) * 2021-01-21 2022-09-13 即时匹配(上海)网络科技有限公司 Instant communication system and communication method
CN117439815B (en) * 2023-12-08 2024-03-19 中国人民解放军31203部队 Intranet penetration system and method based on reverse transparent bridging
CN117640363B (en) * 2024-01-24 2024-04-05 成都中科合迅科技有限公司 Micro-service configuration and management and control method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571797A (en) * 2012-01-16 2012-07-11 何建亿 Method for improving penetration rate and stability of STUN-P2P through universal plug-n-play (UPnP)
CN103369362A (en) * 2013-04-09 2013-10-23 陈文胜 Data dissemination method and related equipment
CN103957287A (en) * 2014-04-25 2014-07-30 浙江大学城市学院 Internet of things device P2P connection method based on NAT penetration adapter
CN104170446A (en) * 2012-03-16 2014-11-26 瑞典爱立信有限公司 Methods and apparatus for inter-cell interference coordination with protected subframes

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070011731A1 (en) * 2005-06-30 2007-01-11 Nokia Corporation Method, system & computer program product for discovering characteristics of middleboxes
KR100765325B1 (en) * 2006-02-13 2007-10-09 삼성전자주식회사 Symmetric Network Address Translator using STUN and Method Thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571797A (en) * 2012-01-16 2012-07-11 何建亿 Method for improving penetration rate and stability of STUN-P2P through universal plug-n-play (UPnP)
CN104170446A (en) * 2012-03-16 2014-11-26 瑞典爱立信有限公司 Methods and apparatus for inter-cell interference coordination with protected subframes
CN103369362A (en) * 2013-04-09 2013-10-23 陈文胜 Data dissemination method and related equipment
CN103957287A (en) * 2014-04-25 2014-07-30 浙江大学城市学院 Internet of things device P2P connection method based on NAT penetration adapter

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Combining STUN Protocol and UDP Hole Punching Technique for Peer-to-Peer Communication across Network Address Translation";Ha, Tran Thi Thu;《nternational Conference on IT Convergence and Security》;20141231;345-347 *
"基于UDP交换路由的NAT互联技术研究";张健伟;《计算机科学》;20080930;第35卷(第9期);119-122 *

Also Published As

Publication number Publication date
CN108123912A (en) 2018-06-05

Similar Documents

Publication Publication Date Title
US8868757B1 (en) Two-way web service router gateway
CN108123912B (en) Micro service system supporting P2P
KR100941947B1 (en) Communication module and computer readable recording medium which recorded application program provided with same
US8429279B2 (en) Method and device for connecting packet-oriented communication terminals
US20070253418A1 (en) Routing path optimization between sip endpoints
US20130138819A1 (en) File server device
CN1856163B (en) Communication system with dialog board controller and its command transmitting method
CN101146017B (en) Relay-server
CN104660952B (en) Video conference communication method and system
US20120099599A1 (en) Method and Apparatus for Relaying Packets
WO2015143802A1 (en) Service function chaining processing method and device
EP2466806B1 (en) Method and system for implementing network intercommunication
JP5506932B2 (en) Method, system and communication terminal for realizing mutual communication between new network and Internet
CN102932235B (en) Instant communicating method and server system under cloud computing environment
CN106604119B (en) Network penetration method and system for private cloud equipment of smart television
US8832280B2 (en) Interactive connectivity establishment for non-enabled endpoints
CN110635942A (en) Device discovery method, Internet of things device and Internet of things server
US9088542B2 (en) Firewall traversal driven by proximity
CN105556921B (en) The agency based on mobile device of regulation is originated for browser
KR100660123B1 (en) Vpn server system and vpn terminal for a nat traversal
CN104301197A (en) Method and system of implementing mutual discovery between multiple terminals of user
CN107689881A (en) Message processing method and device
CN105323326B (en) A kind of general conversion platform of terminal room communication, server, system and method
CN117439815B (en) Intranet penetration system and method based on reverse transparent bridging
JP5752014B2 (en) Gateway device and data transmission method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant