Movatterモバイル変換


[0]ホーム

URL:


CN104580224A - Network connection method and device and computer system - Google Patents

Network connection method and device and computer system
Download PDF

Info

Publication number
CN104580224A
CN104580224ACN201510017504.9ACN201510017504ACN104580224ACN 104580224 ACN104580224 ACN 104580224ACN 201510017504 ACN201510017504 ACN 201510017504ACN 104580224 ACN104580224 ACN 104580224A
Authority
CN
China
Prior art keywords
server
client
information
request
specified
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.)
Granted
Application number
CN201510017504.9A
Other languages
Chinese (zh)
Other versions
CN104580224B (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co LtdfiledCriticalBeijing Jingdong Century Trading Co Ltd
Priority to CN201510017504.9ApriorityCriticalpatent/CN104580224B/en
Publication of CN104580224ApublicationCriticalpatent/CN104580224A/en
Application grantedgrantedCritical
Publication of CN104580224BpublicationCriticalpatent/CN104580224B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention provides a network connection method and device and a computer system. By means of the network connection method and device and the computer system, the problem that all clients need to be connected with all servers respectively is solved, connection between the servers and the clients is simplified, the using rate of system resources of the servers and the clients is greatly reduced, an existing program does not need to be modified when the number of the servers is increased, and system horizontal expansion is facilitated. The network connection method includes the steps that request information requiring to be connected with a designated client is received; the corresponding server connected with the client is determined; the request information is sent to the corresponding server.

Description

A kind of method for connecting network and device and computer system
Technical field
The present invention relates to field of computer technology, particularly a kind of method for connecting network and device and computer system.
Background technology
Along with the scale of software systems is increasing, most of system all can utilize reverse proxy to do load balancing in front end.But for carrying out for the client computer of communication with hardware, Socket long connection is but only have a physical connection.And connect the service end and client that need to rely on and set up Socket connection, can not accomplish to call arbitrarily.
When HTTP request arrives after Reverse Proxy, Reverse Proxy according to rule by Requests routing to server.If HTTP request is distributed to server 1, and HTTP request is wanted to communicate with the Socket of client computer 1, at this moment, just need server 1 and client computer to be set up a Socket to be connected, as shown in Figure 1, Fig. 1 is the network connection diagram according to prior art.
But in actual motion, which station server is HTTP request be distributed to is uncertain, if wish that every station server can process the request received arbitrarily, just need long for the Socket of each client computer connection to do on each server once to connect, not only waste system resource, be also unfavorable for that system level is expanded simultaneously.
Summary of the invention
In view of this, the invention provides a kind of method for connecting network and device and computer system, solve the problem that each client computer needs to connect respectively with each server, simplify the connection between server and client computer, server and client machine system resource utilization are reduced greatly, and do not need when number of servers increases to make an amendment existing program, be beneficial to system level expansion.
For achieving the above object, according to an aspect of the present invention, a kind of method for connecting network is provided.
Method for connecting network of the present invention comprises: receive the solicited message asking to carry out with specified client being connected; Determine and the server that described specified client is connected; By described request distribution of information to described server.
Alternatively, determine to comprise with the step of the server that described specified client connects: from the connection relation information of the server preserved and client computer, inquire the server corresponding with specified client.
Alternatively, described connection relation information is using client identifying as key, the key-value pair using server identification as value.
Alternatively, described client identifying is IP address.
Alternatively, described request information comprises HTTP request information; Described connection comprises Socket and connects.
According to a further aspect in the invention, a kind of network connection device is provided.
Network connection device of the present invention comprises: receiver module, for receiving the solicited message that request and specified client carry out being connected; Determination module, for determining the server be connected with specified client; Distribution module, for by described request distribution of information to described server.
Alternatively, described determination module is also for inquiring the server corresponding with specified client from the server preserved with the connection relation information of client computer.
According to a further aspect in the invention, a kind of computer system is provided.
Computer system of the present invention comprises: reverse proxy, multiple server and multiple client computer, and wherein, reverse proxy, for receiving the solicited message that request and specified client carry out being connected; Determine and the server that described specified client is connected; By described request distribution of information to this server; Each server is connected with described reverse proxy respectively, for receiving the solicited message of described reverse proxy distribution; Each client computer is connected with a server respectively.
Alternatively, also comprise storage device, for storing the connection relation information of described client computer and described server.
Alternatively, the storage mode of described connection relation information is buffer memory, file, database or program variable.
According to technical scheme of the present invention, after reception request carries out with specified client the solicited message be connected, by determining and the server that described specified client is connected, each client computer need not be connected respectively with each server, simplify the connection between server and client computer, server and client machine system resource utilization are reduced greatly, and does not need when number of servers increases to make an amendment existing program, be beneficial to system level expansion.
Accompanying drawing explanation
Accompanying drawing is used for understanding the present invention better, does not form inappropriate limitation of the present invention.Wherein:
Fig. 1 is the network connection diagram according to prior art;
Fig. 2 is the computer system schematic diagram according to the embodiment of the present invention;
Fig. 3 is the method for connecting network schematic diagram according to the embodiment of the present invention;
Fig. 4 is the network connection device schematic diagram according to the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, one exemplary embodiment of the present invention is explained, comprising the various details of the embodiment of the present invention to help understanding, they should be thought it is only exemplary.Therefore, those of ordinary skill in the art will be appreciated that, can make various change and amendment, and can not deviate from scope and spirit of the present invention to the embodiments described herein.Equally, for clarity and conciseness, the description to known function and structure is eliminated in following description.
Fig. 2 is the computer system schematic diagram according to the embodiment of the present invention.As shown in Figure 2, the computer system 20 of the embodiment of the present invention mainly comprises reverse proxy 21, multiple server 22 and multiple client computer 23.The solicited message that reverse proxy 21 is carried out being connected for receiving request and specified client; Determine the server 22 be connected with described specified client; By described request distribution of information to this server 22; Each server 22 is connected with reverse proxy 21 respectively, for receiving the solicited message of described reverse proxy 21 distribution; Each client computer 23 is connected with a server 22 respectively.
Computer system 20 also can comprise storage device (not shown), for storing the connection relation information of described client computer and described server.This storage device can be an independent caching server, and buffer memory read-write is by key-being worth right mode carries out; Data can be accomplished atomicity like this, all programs can ensure when reading cache data correctly, consistent.The storage mode of connection relation information can be buffer memory, file, database or program variable etc.
Fig. 3 is the method for connecting network schematic diagram according to the embodiment of the present invention.The method is performed by reverse proxy 21, and as shown in Figure 3, the method mainly comprises following step S30 to S32.
Step S30: receive the solicited message asking to carry out with specified client being connected.Solicited message in the present embodiment comprises HTTP request information, connects and comprises Socket connection.
Step S31: determine the server be connected with specified client.The server corresponding with specified client is inquired with the connection relation information of client computer from the server preserved; Wherein, connection relation information is using client identifying as key, the key-value pair using server identification as value.At this, using the IP of client computer as key, service IP is kept in connection relation information as the key-value pair of value.Like this, the Socket connection data that each client computer has connected is saved in connection relation information.When receiving request and carrying out with specified client the HTTP request be connected, by server ip corresponding to the IP that checks client computer in connection relation information, just can determine to need which station server is HTTP request is distributed to, therefore, server and client computer need not keep multiple connection, and server and client machine system resource utilization are reduced greatly.In addition, if increase server/client, without the need to making an amendment existing program, only need the link information of adding increased server/client in connection relation information.
Step S32: by described request distribution of information to described server.And then solicited message just can be sent to client computer by server, realize requesting party and be connected with the network of specified client.
Fig. 4 is the network connection device schematic diagram according to the embodiment of the present invention.This device can be arranged in reverse proxy 21 as software.As shown in Figure 4, the network connection device 40 of the embodiment of the present invention mainly comprises receiver module 41, determination module 42 and distribution module 43.The solicited message that receiver module 41 carries out being connected for receiving request and specified client; Determination module 42 is for determining the server be connected with specified client; The server that also can be used for from preserving inquires the server corresponding with specified client with the connection relation information of client computer; Distribution module 43 is for being distributed to corresponding server by solicited message.
According to the technical scheme of the embodiment of the present invention, after reception request carries out with specified client the solicited message be connected, by determining and the server that described specified client is connected, each client computer need not be connected respectively with each server, simplify the connection between server and client computer, server and client machine system resource utilization are reduced greatly, and does not need when number of servers increases to make an amendment existing program, be beneficial to system level expansion.
Below describe general principle of the present invention in conjunction with specific embodiments, in apparatus and method of the present invention, obviously, each parts or each step can decompose and/or reconfigure.These decompose and/or reconfigure and should be considered as equivalents of the present invention.Further, the step performing above-mentioned series of processes can order naturally following the instructions perform in chronological order, but does not need necessarily to perform according to time sequencing.Some step can walk abreast or perform independently of one another.
Above-mentioned embodiment, does not form limiting the scope of the invention.It is to be understood that depend on designing requirement and other factors, various amendment, combination, sub-portfolio can be there is and substitute in those skilled in the art.Any amendment done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within scope.

Claims (10)

CN201510017504.9A2015-01-142015-01-14A kind of method for connecting network and device and computer systemActiveCN104580224B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201510017504.9ACN104580224B (en)2015-01-142015-01-14A kind of method for connecting network and device and computer system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201510017504.9ACN104580224B (en)2015-01-142015-01-14A kind of method for connecting network and device and computer system

Publications (2)

Publication NumberPublication Date
CN104580224Atrue CN104580224A (en)2015-04-29
CN104580224B CN104580224B (en)2018-06-01

Family

ID=53095404

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201510017504.9AActiveCN104580224B (en)2015-01-142015-01-14A kind of method for connecting network and device and computer system

Country Status (1)

CountryLink
CN (1)CN104580224B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106294403A (en)*2015-05-212017-01-04阿里巴巴集团控股有限公司The method of across a network operating database, system, client and server

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20100017500A1 (en)*2008-07-172010-01-21Rubik LeeMethods and systems for peer-to-peer proxy sharing
CN101729598A (en)*2009-11-182010-06-09福建星网锐捷网络有限公司Method and system for increasing Web service response speed and network processor
CN101753478A (en)*2008-12-052010-06-23中国移动通信集团公司Distributed E-mail system and service method thereof
CN102624920A (en)*2012-03-312012-08-01奇智软件(北京)有限公司 A method and device for accessing through a proxy server
CN102984277A (en)*2012-12-172013-03-20北京奇虎科技有限公司System and method for preventing malicious connection
CN103067417A (en)*2011-10-192013-04-24华耀(中国)科技有限公司 Web Service Mapping Method and System of Security Proxy in VPN

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20100017500A1 (en)*2008-07-172010-01-21Rubik LeeMethods and systems for peer-to-peer proxy sharing
CN101753478A (en)*2008-12-052010-06-23中国移动通信集团公司Distributed E-mail system and service method thereof
CN101729598A (en)*2009-11-182010-06-09福建星网锐捷网络有限公司Method and system for increasing Web service response speed and network processor
CN103067417A (en)*2011-10-192013-04-24华耀(中国)科技有限公司 Web Service Mapping Method and System of Security Proxy in VPN
CN102624920A (en)*2012-03-312012-08-01奇智软件(北京)有限公司 A method and device for accessing through a proxy server
CN102984277A (en)*2012-12-172013-03-20北京奇虎科技有限公司System and method for preventing malicious connection

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106294403A (en)*2015-05-212017-01-04阿里巴巴集团控股有限公司The method of across a network operating database, system, client and server

Also Published As

Publication numberPublication date
CN104580224B (en)2018-06-01

Similar Documents

PublicationPublication DateTitle
CN109640319B (en)Scheduling method and device based on access information and electronic equipment
US10440069B2 (en)System and method for acquiring, processing, and updating global information
CN110430274A (en)A kind of document down loading method and system based on cloud storage
CN108173774B (en)Client upgrading method and system
US8935377B2 (en)Dynamic registration of listener resources for cloud services
CN105681387A (en)Method, device and system for uploading live video
CN102625287A (en)Method for downloading mobile phone application software
CN103024085A (en)System and method for processing P2P (peer-to-peer) node request
CN109873855A (en) A method and system for resource acquisition based on blockchain network
US20170279738A1 (en)Method, apparatus, and system for transmitting data
CN110798495B (en)Method and server for end-to-end message push in cluster architecture mode
US20150006622A1 (en)Web contents transmission method and apparatus
CN114124926A (en)Data transmission method, device, storage medium and computer program product
CN106973106B (en)Method, device and system for acquiring session information
CN111083204B (en)File transmission method, device and storage medium
CN103560937A (en)Data accessing method and entry server
CN114268631B (en)Low-delay network system, communication connection method thereof and readable storage medium
CN111427703A (en)Industrial data real-time display method and system
CN114490100B (en)Message queue telemetry transmission load balancing method, device and server
CN105099885A (en)Information transmitting method and device
CN106790354B (en)Communication method and device for preventing data congestion
CN110555040A (en)Data caching method and device and server
CN104580224A (en)Network connection method and device and computer system
CN111131367B (en)Distributed access service processing method and device
CN105871972A (en)Video resource distributed cathe method, device and system

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp