Movatterモバイル変換


[0]ホーム

URL:


CN104580224B - A kind of method for connecting network and device and computer system - Google Patents

A kind of method for connecting network and device and computer system
Download PDF

Info

Publication number
CN104580224B
CN104580224BCN201510017504.9ACN201510017504ACN104580224BCN 104580224 BCN104580224 BCN 104580224BCN 201510017504 ACN201510017504 ACN 201510017504ACN 104580224 BCN104580224 BCN 104580224B
Authority
CN
China
Prior art keywords
server
client
solicited message
specified
connection relation
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
CN201510017504.9A
Other languages
Chinese (zh)
Other versions
CN104580224A (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 present invention provides a kind of method for connecting network and device and computer system, solve the problems, such as that each client computer is required for establishing connection respectively with each server, simplify the connection between server and client computer, substantially reduce server and client machine system resource utilization, and existing program need not be made an amendment in number of servers increase, extended beneficial to system level.The method for connecting network of the present invention includes:Receive the solicited message that request is attached with specified client;Determine the server being connected with the specified client;The solicited message is distributed to the 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, more particularly to a kind of method for connecting network and device and department of computer scienceSystem.
Background technology
Increasing with the scale of software systems, most of system can all do load in front end using reverse proxyWeighing apparatus.But for the client computer for being communicated with hardware, Socket long connections are that only there are one physical connections.And evenConnect the server-side and client needed by Socket connections are established, it is impossible to accomplish arbitrary calling.
After HTTP request reaches Reverse Proxy, request is distributed to service by Reverse Proxy according to ruleDevice.If HTTP request is distributed to server 1, and HTTP request is wanted to communicate with the Socket of client computer 1, thisWhen, it is necessary to server 1 is established into a Socket with client computer and is connected, as shown in Figure 1, Fig. 1 is net according to prior artNetwork connection diagram.
But in actual motion, it is uncertain which platform server is HTTP request, which be distributed to, if it is desired to every serviceDevice can handle the request of arbitrary reception, it is necessary to do the Socket long connections of each client computer once on each serverConnection, not only wastes system resource, while is also unfavorable for system level extension.
The content of the invention
In view of this, the present invention provides a kind of method for connecting network and device and computer system, solves each visitorThe problem of family machine is required for establishing connection respectively with each server simplifies the connection between server and client computer, makes clothesBusiness device and client machine system resource utilization substantially reduce, and existing program need not be repaiied in number of servers increaseChange, extended beneficial to system level.
To achieve the above object, according to an aspect of the invention, there is provided a kind of method for connecting network.
The method for connecting network of the present invention includes:Receive the solicited message that request is attached with specified client;It determinesThe server being connected with the specified client;The solicited message is distributed to the server.
Optionally it is determined that be connected with the specified client server the step of include:From the server of preservation withServer corresponding with specified client is inquired in the connection relation information of client computer.
Optionally, the connection relation information is using client identifying as key, using server identification as the key assignments of valueIt is right.
Optionally, the client identifying is IP address.
Optionally, the solicited message includes HTTP request information;The connection includes Socket connections.
According to another aspect of the present invention, a kind of network connection device is provided.
The network connection device of the present invention includes:Receiving module asks what is be attached with specified client for receivingSolicited message;Determining module, for determining the server being connected with specified client;Distribution module, for by the requestInformation is distributed to the server.
Optionally, the determining module is additionally operable to inquire from the connection relation information of the server of preservation and client computerServer corresponding with specified client.
According to another aspect of the present invention, a kind of computer system is provided.
The computer system of the present invention includes:Reverse proxy, multiple servers and multiple client computer, wherein, reversed generationReason, for receiving the solicited message that request and specified client are attached;Determine the clothes being connected with the specified clientBusiness device;The solicited message is distributed to the server;Each server is connected respectively with the reverse proxy, for receivingState the solicited message of reverse proxy distribution;Each client computer is connected respectively with a server.
Optionally, storage device is further included, for storing the connection relation information of the client computer and the server.
Optionally, the storage mode of the connection relation information is caching, file, database or program variable.
Technique according to the invention scheme after the solicited message that request is attached with specified client is received, passes throughDetermine the server being connected with the specified client so that make each client computer woth no need to be established respectively with each serverConnection, simplifies the connection between server and client computer, substantially reduces server and client machine system resource utilization, andAnd existing program need not be made an amendment in number of servers increase, it is extended beneficial to system level.
Description of the drawings
Attached drawing does not form inappropriate limitation of the present invention for more fully understanding the present invention.Wherein:
Fig. 1 is network connection schematic diagram according to prior art;
Fig. 2 is computer system schematic diagram according to embodiments of the present invention;
Fig. 3 is method for connecting network schematic diagram according to embodiments of the present invention;
Fig. 4 is network connection device schematic diagram according to embodiments of the present invention.
Specific embodiment
It explains below in conjunction with attached drawing to the exemplary embodiment of the present invention, including the various of the embodiment of the present inventionDetails should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognizeIt arrives, various changes and modifications can be made to the embodiments described herein, without departing from scope and spirit of the present invention.TogetherFor clarity and conciseness, the description to known function and structure is omitted in sample in following description.
Fig. 2 is computer system schematic diagram according to embodiments of the present invention.As shown in Fig. 2, the calculating of the embodiment of the present inventionMachine system 20 mainly includes reverse proxy 21, multiple servers 22 and multiple client computer 23.Reverse proxy 21 please for receivingSeek the solicited message being attached with specified client;Determine the server 22 being connected with the specified client;By described inSolicited message is distributed to the server 22;Each server 22 is connected respectively with reverse proxy 21, for receiving the reversed generationThe solicited message of 21 distribution of reason;Each client computer 23 is connected respectively with a server 22.
Computer system 20 may also include storage device (not shown), for storing the client computer and the serviceThe connection relation information of device.The storage device can be an individual cache server, and caching read-write is by key-value pairMode carries out;Data can so be accomplished to atomicity, all programs can ensure correct, consistent in reading cache data.The storage mode of connection relation information can be caching, file, database or program variable etc..
Fig. 3 is method for connecting network schematic diagram according to embodiments of the present invention.This method is performed by reverse proxy 21, such asShown in Fig. 3, this method mainly includes steps S30 to S32.
Step S30:Receive the solicited message that request is attached with specified client.Request packet in the present embodimentHTTP request information is included, connection includes Socket connections.
Step S31:Determine the server being connected with specified client.The connection of server and client computer from preservation is closedIt is that server corresponding with specified client is inquired in information;Wherein, connection relation information be using client identifying as key,Using server identification as the key-value pair of value.Here, using the IP of client computer as key, service IP is stored in as the key-value pair of valueIn connection relation information.In this way, the Socket connection data that each client computer has connected are saved in connection relation information.WhenWhen receiving the HTTP request that request is attached with specified client, the IP institutes by checking client computer in connection relation information are rightServer ip is answered, just can determine that needs the HTTP request which platform server be distributed to, and therefore, server and client computer need not be keptMultiple connections substantially reduce server and client machine system resource utilization.In addition, if increase server/client, nothingExisting program need to be made an amendment, it is only necessary in connection relation information addition increased server/client link information.
Step S32:The solicited message is distributed to the server.And then server can send out solicited messageClient computer is given, realizes the network connection of requesting party and specified client.
Fig. 4 is network connection device schematic diagram according to embodiments of the present invention.The device can be arranged on instead as softwareInto agency 21.As shown in figure 4, the network connection device 40 of the embodiment of the present invention mainly includes receiving module 41, determining module42 and distribution module 43.The solicited message that receiving module 41 is attached for reception request with specified client;Determine mouldBlock 42 is for the definite server being connected with specified client;It can also be used to close from the server of preservation and the connection of client computerIt is that server corresponding with specified client is inquired in information;Distribution module 43 is used to solicited message being distributed to corresponding clothesBusiness device.
Technical solution according to embodiments of the present invention, in the solicited message that reception request is attached with specified clientAfterwards, pass through and determine the server that is connected with the specified client so that make each client computer woth no need to each serverConnection is established respectively, is simplified the connection between server and client computer, is made server and client machine system resource utilization bigIt is big to reduce, and existing program need not be made an amendment in number of servers increase, it is extended beneficial to system level.
The basic principle of the present invention is described above in association with specific embodiment, in apparatus and method of the present invention, it is clear thatEach component or each step can be decomposed and/or reconfigured.These decompose and/or reconfigure should be regarded as the present invention etc.Efficacious prescriptions case.Also, the step of performing above-mentioned series of processes can perform in chronological order according to the order of explanation naturally, stillAnd it need not centainly perform sequentially in time.Some steps can perform parallel or independently of one another.
Above-mentioned specific embodiment, does not form limiting the scope of the invention.Those skilled in the art should be brightIt is white, depending on design requirement and other factors, various modifications, combination, sub-portfolio and replacement can occur.It is anyModifications, equivalent substitutions and improvements made within the spirit and principles in the present invention etc., should be included in the scope of the present inventionWithin.

Claims (5)

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
CN104580224A CN104580224A (en)2015-04-29
CN104580224Btrue 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)

Families Citing this family (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 (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
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

Family Cites Families (4)

* 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
CN102624920B (en)*2012-03-312015-09-16北京奇虎科技有限公司 A method and device for accessing through a proxy server

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103067417A (en)*2011-10-192013-04-24华耀(中国)科技有限公司 Web Service Mapping Method and System of Security Proxy in VPN
CN102984277A (en)*2012-12-172013-03-20北京奇虎科技有限公司System and method for preventing malicious connection

Also Published As

Publication numberPublication date
CN104580224A (en)2015-04-29

Similar Documents

PublicationPublication DateTitle
CN108632374B (en)Software gray level release method and device
CN111861140B (en)Service processing method and device, storage medium and electronic device
CN109582588B (en)Test case generation method and device and electronic equipment
CN104751348B (en)A kind of e-commerce system based on social networks
CN110830374B (en)Method and device for gray level release based on SDK
CN104811488A (en)Load balancing equipment-based session keeping method and system and load balancing equipment
CN103209223A (en)Distributed application conversation information sharing method and system and application server
US10812346B1 (en)Application discovery and dependency mapping
CN108377247B (en)Message pushing method and device
CN109586969A (en)Content distributing network disaster recovery method, device, computer equipment and storage medium
CN111460129B (en)Method, device, electronic equipment and storage medium for generating identification
CN107333248B (en)A kind of real-time sending method of short message and system
US10915383B2 (en)Remote session information based on process identifier
US11010406B2 (en)System and method for streaming events in a transaction-based system
CN104660409A (en)System login method in cluster environment and authentication server cluster
CN111200649B (en)Scheduling method and device and scheduling model generation method and device
CN113114503B (en)Deployment method and device based on application delivery network requirements
CN103237089A (en)Method and device for repairing domain name system (DNS) polling mode-based webpages and server
CN110750780A (en)User role permission fusion method, device and equipment based on multi-service system
CN105516261A (en)Web page loading control method and load balancer
CN104125303A (en)Data read-and-write requesting method, client end and data read-and-write requesting system
CN111008220A (en) Method and device for dynamic identification of data source, storage medium and electronic device
CN103684977B (en)Method for sending information and device, method for information display and device
CN106874371A (en)A kind of data processing method and device
CN110995890B (en)Domain name request scheduling method and device

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