CN107395416A - A kind of data transmission method for uplink and server cluster - Google Patents

A kind of data transmission method for uplink and server cluster Download PDF

Info

Publication number
CN107395416A
CN107395416A CN201710595992.0A CN201710595992A CN107395416A CN 107395416 A CN107395416 A CN 107395416A CN 201710595992 A CN201710595992 A CN 201710595992A CN 107395416 A CN107395416 A CN 107395416A
Authority
CN
China
Prior art keywords
data
sent
server
client
send
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.)
Pending
Application number
CN201710595992.0A
Other languages
Chinese (zh)
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710595992.0A priority Critical patent/CN107395416A/en
Publication of CN107395416A publication Critical patent/CN107395416A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • 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/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The invention provides a kind of data transmission method for uplink and server cluster, in the present invention when the current server that data to be sent are sent to client breaks down, destination server can be sent to the client not sending to the remaining data of client.The problem of because destination server need not send all data to be sent to client, and then avoiding partial data in the prior art and repeat to send, and then transfer resource can be wasted.

Description

A kind of data transmission method for uplink and server cluster
Technical field
The present invention relates to the communications field, in particular, is related to a kind of data transmission method for uplink and server cluster.
Background technology
Server cluster just refers to get up many server centereds carries out same service together, in client just It seem an only server.Cluster can carry out parallel computation so as to obtain very high calculating speed using multiple computers, Can also be backuped with multiple computers so that any one machine be broken whole system still can normal operation.
In general, when the client of user, such as mobile phone, apparatus such as computer, during to server cluster request data, main clothes Business device can send the data that user asks to client, and e.g., user asks a video file, and master server can be by the video File is sent to client.During master server sends data, if the master server breaks down, and it can not be visitor When family end provides service, a standby server is now needed to provide service again, that is, resends the data of user's request To client.
Because master server have sent partial data to client, and standby server is needed total data again Send to client, partial data can be caused to repeat to send, and then transfer resource can be wasted.
The content of the invention
In view of this, the present invention provides a kind of data transmission method for uplink and server cluster, if gone out with solving master server Existing failure, and master server have sent partial data to client, standby server needs again to send total data To client, the problem of partial data can be caused to repeat to send, and then transfer resource can be wasted.
In order to solve the above technical problems, present invention employs following technical scheme:
A kind of data transmission method for uplink, applied to server cluster, the server cluster includes multiple servers, the number Include according to sending method:
Any server in the server cluster receives the request of data that client is sent;
Obtain data to be sent corresponding with the request of data;
The data to be sent are sent to the client;
Wherein, in data transmission procedure, when current server breaks down, choose in the server cluster except described A server outside current server is as destination server;
The destination server will not send to the data of the client in the data to be sent and send to the visitor Family end.
Preferably, the destination server will not sent in the data to be sent to the data of the client send to The client, including:
Check that the data of the data to be sent send progress from shared data bank;
Progress is sent according to the data, reads in the data to be sent and does not send to the data of the client;
The data of reading are sent to the client.
Preferably, acquisition data to be sent corresponding with the request of data, including:
The data to be sent are read from data storage device.
Preferably, after any server in the server cluster receives the request of data that client is sent, in addition to:
Open and edit default lock file.
Preferably, the destination server will not sent in the data to be sent to the data of the client send to During the client, in addition to:
Open and edit the lock file after the current server editor.
A kind of server cluster, the server cluster include multiple servers;
Current server, for receiving the request of data of client transmission, obtain corresponding with the request of data pending Data are sent, the data to be sent are sent to the client;
Destination server, in data transmission procedure, when current server breaks down, by the data to be sent In do not send to the data of the client and send to the client;
Wherein, the destination server is a service in addition to the current server in the server cluster Device.
Preferably, the destination server is used to not send in the data to be sent to the data hair of the client When delivering to the client, it is specifically used for:
Check that the data of the data to be sent send progress from shared data bank;
Progress is sent according to the data, reads in the data to be sent and does not send to the data of the client;
The data of reading are sent to the client.
Preferably, it is specific to use when the current server is used to obtain data to be sent corresponding with the request of data In:
The data to be sent are read from data storage device.
Preferably, after the current server receives the request of data that client is sent, it is additionally operable to:
Open and edit default lock file.
Preferably, the destination server is used to not send in the data to be sent to the data hair of the client During delivering to the client, it is additionally operable to:
Open and edit the lock file after the current server editor.
Compared to prior art, the invention has the advantages that:
It is to be sent when being sent to client in the present invention the invention provides a kind of data transmission method for uplink and server cluster When the current server of data breaks down, destination server can be sent to the visitor not sending to the remaining data of client Family end.Because destination server need not send all data to be sent to client, and then avoid in the prior art Partial data repeats to send, and then the problem of transfer resource can be wasted.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is a kind of method flow diagram of data transmission method for uplink provided by the invention;
Fig. 2 is the communication scheme of server cluster provided by the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
The embodiments of the invention provide a kind of data transmission method for uplink, applied to server cluster, wherein, server cluster bag Include multiple servers.Reference picture 1, data transmission method for uplink includes:
Any server in S11, the server cluster receives the request of data that client is sent;
Wherein, client refers to the equipment that user uses, such as mobile phone, apparatus such as computer.Specifically, when client accesses clothes Be engaged in device cluster when, access be a server in server cluster network between the Protocol IP address that interconnects.
It should be noted that client belongs to same domain with server cluster.Control server in domain in the present embodiment Windows server 2012 active directory domain control server is installed.Server in server cluster can be peace Linux servers equipped with community's Enterprise Operation System CentOS operating systems.
Firstly, it is necessary to each linux servers in server cluster are added in AD domains.Adding AD domains i.e. can be with AD Control server communication in domain.Then when the client of user accesses server cluster, it is also desirable to add client in AD domains, specifically Adition process be:The username and password for the server for needing to access is sent to AD domains and controls server by the client of user, Pre-set user name and preset password of the server according to self record are controlled in AD domains, judge that the username and password that client is sent is No correct, if correctly, agreeing to that client is added in AD domains, if user name and/or password bad, refusal client adds In AD domains.
In addition, each linux servers in server cluster are configured with host name, domain name mapping function, domain name system Unite DNS, and supports the information service block samba softwares of transparent fault switching.Wherein, samba softwares are in linux and unix A freeware of SMB (Server Message Block) agreement is realized in operating system.Samba softwares provide general network Network file system cifs sharing functionalities, cifs are public or open SMB protocol versions.
Host name for the configuration of linux servers is relevant with the domain control value in AD domains, and host name includes two parts, Part I The name risen for linux servers, Part II are relevant with domain control value.Domain name mapping function, by host name, to finally give The process of IP address corresponding to the host name.Specifically, can be according to the host name abbreviation in the domain name of server and host name Part I parse to obtain the IP address of linux servers.
DNS (Domain Name System, domain name system), one mutually mapped as domain name and IP address on internet Individual distributed data base, user can be made more easily to access internet, remember what can be directly read by machine without spending IP number strings.
In addition, server cluster is the ctdb server clusters for establishing multiple servers in the present embodiment, pass through ctdb Samba and the winbind service of each server come in management server cluster.
S12, obtain data to be sent corresponding with the request of data;
Specifically, the server for receiving request of data goes to obtain data to be sent.
Optionally, on the basis of the present embodiment, step S12 includes:
Data to be sent are read from data storage device.
Wherein, data storage device is the server for supporting storage area network IP SAN agreements or FC SAN agreements. It should be noted that data storage device is not a part for server cluster, but data storage device can be with server Cluster communication.
In addition, data storage device is managed collectively using file system glusterfs.
S13, the data to be sent are sent to the client;
S14, in data transmission procedure, when current server breaks down, choose in the server cluster except described A server outside current server is as destination server;
Specifically, current server may break down at any time, sent when by data to be sent to the process of client In, when current server breaks down, now, current server, which can be sent, there are other in fault message to server cluster All servers, so that other servers know that failure occurs in current server.
When failure occurs in current server, a clothes in addition to the current server in server cluster are chosen Device be engaged in as destination server.The method of selection is that the ctdb functions in server cluster are chosen.
It should be noted that current server is during data to be sent are sent to client, current server In samba softwares the data of data to be sent can be established in shared data bank send program, data send progress The data that data to be sent are stored with table send progress, wherein, each server in server cluster is able to access that this Data send program.
In addition, the process that current server sends data to be sent to client is:
Current server reads data to be sent from data storage device, and the data to be sent of reading are sent to visitor Family end.
S15, the destination server will not send to the data of the client in the data to be sent and send to institute State client;
Optionally, on the basis of the present embodiment, step S15 includes:
1) check that the data of the data to be sent send progress from shared data bank;
2) progress is sent according to the data, reads in the data to be sent and do not send to the data of the client;
3) data of reading are sent to the client.
Specifically, destination server is inquired about after obtaining data transmission progress, read from data storage device and do not send Sent to the data of client, and by the data of reading to client.
For example, display data have sent 50% in data transmission progress, now, destination server is from data storage device Remaining 50% data are read, and are sent to client.
In the present embodiment, when the current server that data to be sent are sent to client breaks down, destination server It can be sent not sending to the remaining data of client to the client.Because destination server need not will be all pending Send data to send to client, and then avoid partial data in the prior art and repeat to send, and then transfer resource can be wasted Problem.
In addition, the present invention, in a server failure, the request of client can take over seamlessly an other service Device, and then 0 downtime can be realized, a small amount of input/output IO has delay in handoff procedure, the use good opinion for user Greatly improve, product competitiveness can be increased.
Optionally, on the basis of the present embodiment, any server in the server cluster receives client and sent Request of data after, in addition to:Open and edit default lock file.Wherein, preset lock file and refer to that ctdb locks file.
The destination server will not send to the data of the client in the data to be sent and send to the visitor During the end of family, in addition to:
Open and edit the lock file after the current server editor.
Specifically, under the system directory of each server using glusterfs copy pattern in server cluster Disk is created to be used to preserve ctdb lock files.
When one of server provides the user service, such as current server, now, current server can be opened simultaneously Edit ctdb lock files.The process of editor is that the process of file write data is locked to ctdb.When current server is opened and is compiled When collecting ctdb lock files, other servers in server cluster cannot be opened and edit ctdb lock files, and then prevent Two servers in service cluster are that same user provides service.
When current server breaks down, ctdb lock files can be Saved and Closed, when destination server provides the user During service, destination server can be opened and edit the lock file after current server editor, and then can avoid other servers Simultaneously service is provided for a user.
In the present embodiment, when a server in server cluster provides the user service, service is provided the user Server can open and edit default lock file, and then other servers can be prevented while provide clothes for same user Business, avoid repetition and service is provided.
Optionally, a kind of server cluster is provided in another embodiment of the present invention, the server cluster includes more Individual server, including:
Current server, for receiving the request of data of client transmission, obtain corresponding with the request of data pending Data are sent, the data to be sent are sent to the client;
Destination server, in data transmission procedure, when current server breaks down, by the data to be sent In do not send to the data of the client and send to the client;
Wherein, the destination server is a service in addition to the current server in the server cluster Device.
Reference picture 2, introduce the communication process of server cluster.Wherein, current server 101, destination server 102 and Other servers constitute server cluster, wherein, current server 101 and destination server 102 are only depicted in Fig. 2, is not had Draw other servers.
In Fig. 2, client 105 can access server cluster, but client 105 is before server cluster is accessed, Need to be communicated with AD domains control server 104, and send username and password to AD domains and control server 104, control and take when AD domains After business device 104 verifies that username and password is correct, agree to that client 105 accesses server cluster.
When client 105 is needed to server cluster request data, the server in server cluster is set from data storage Read in standby 103 and deliver to client 105. with the corresponding Data Concurrent of user's request
It should be noted that current server 101, destination server 102, data storage device 103, AD domains control server 104 and the specific work process of client 105, the respective description in above-described embodiment is refer to, will not be repeated here.
Optionally, further, the destination server is used to not send to the client in the data to be sent Data when sending to the client, be specifically used for:
Check that the data of the data to be sent send progress from shared data bank;
Progress is sent according to the data, reads in the data to be sent and does not send to the data of the client;
The data of reading are sent to the client.
Optionally, further, when the current server is used to obtain data to be sent corresponding with the request of data, It is specifically used for:
The data to be sent are read from data storage device.
In the present embodiment, when the current server that data to be sent are sent to client breaks down, destination server It can be sent not sending to the remaining data of client to the client.Because destination server need not will be all pending Send data to send to client, and then avoid partial data in the prior art and repeat to send, and then transfer resource can be wasted Problem.
It should be noted that the specific work process of each device in the present embodiment refer to the phase in above-described embodiment It should be noted that it will not be repeated here.
Optionally, on the basis of the embodiment of above-mentioned server cluster,
After the current server receives the request of data that client is sent, it is additionally operable to:
Open and edit default lock file.
The destination server is used to not send to the data of the client in the data to be sent to send to institute During stating client, it is additionally operable to:
Open and edit the lock file after the current server editor.
In the present embodiment, when a server in server cluster provides the user service, service is provided the user Server can open and edit default lock file, and then other servers can be prevented while provide clothes for same user Business, avoid repetition and service is provided.
It should be noted that the specific work process of the current server and destination server in the present embodiment refer to The respective description in embodiment is stated, will not be repeated here.
The foregoing description of the disclosed embodiments, professional and technical personnel in the field are enable to realize or using the present invention. A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The most wide scope caused.

Claims (10)

1. a kind of data transmission method for uplink, it is characterised in that applied to server cluster, the server cluster includes multiple services Device, the data transmission method for uplink include:
Any server in the server cluster receives the request of data that client is sent;
Obtain data to be sent corresponding with the request of data;
The data to be sent are sent to the client;
Wherein, in data transmission procedure, when current server breaks down, choose in the server cluster except described current A server outside server is as destination server;
The destination server will not send to the data of the client in the data to be sent and send to the client.
2. data transmission method for uplink according to claim 1, it is characterised in that the destination server is by the number to be sent Do not send to the data of the client and sent to the client in, including:
Check that the data of the data to be sent send progress from shared data bank;
Progress is sent according to the data, reads in the data to be sent and does not send to the data of the client;
The data of reading are sent to the client.
3. data transmission method for uplink according to claim 1, it is characterised in that the acquisition is corresponding with the request of data Data to be sent, including:
The data to be sent are read from data storage device.
4. data transmission method for uplink according to claim 1, it is characterised in that any server in the server cluster After receiving the request of data that client is sent, in addition to:
Open and edit default lock file.
5. data transmission method for uplink according to claim 4, it is characterised in that the destination server is by the number to be sent Do not sent in the data of the client during sending to the client, in addition to:
Open and edit the lock file after the current server editor.
6. a kind of server cluster, it is characterised in that the server cluster includes multiple servers;
Current server, for receiving the request of data of client transmission, obtain number to be sent corresponding with the request of data According to the data to be sent are sent to the client;
Destination server, in data transmission procedure, when current server breaks down, by the data to be sent not Send to the data of the client and send to the client;
Wherein, the destination server is a server in addition to the current server in the server cluster.
7. server cluster according to claim 6, it is characterised in that the destination server is used for will be described to be sent Do not sent in data to the data of the client send to the client when, be specifically used for:
Check that the data of the data to be sent send progress from shared data bank;
Progress is sent according to the data, reads in the data to be sent and does not send to the data of the client;
The data of reading are sent to the client.
8. server cluster according to claim 6, it is characterised in that the current server is used to obtain and the number According to during data to be sent, being specifically used for corresponding to request:
The data to be sent are read from data storage device.
9. server cluster according to claim 6, it is characterised in that the current server receives what client was sent After request of data, it is additionally operable to:
Open and edit default lock file.
10. server cluster according to claim 9, it is characterised in that the destination server is used for will be described pending Send during not sending to the data of the client and being sent to the client in data, be additionally operable to:
Open and edit the lock file after the current server editor.
CN201710595992.0A 2017-07-20 2017-07-20 A kind of data transmission method for uplink and server cluster Pending CN107395416A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710595992.0A CN107395416A (en) 2017-07-20 2017-07-20 A kind of data transmission method for uplink and server cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710595992.0A CN107395416A (en) 2017-07-20 2017-07-20 A kind of data transmission method for uplink and server cluster

Publications (1)

Publication Number Publication Date
CN107395416A true CN107395416A (en) 2017-11-24

Family

ID=60337438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710595992.0A Pending CN107395416A (en) 2017-07-20 2017-07-20 A kind of data transmission method for uplink and server cluster

Country Status (1)

Country Link
CN (1) CN107395416A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110557453A (en) * 2019-09-05 2019-12-10 广州虎牙科技有限公司 data distribution method, device, equipment and storage medium
CN111479117A (en) * 2020-04-03 2020-07-31 湖南快乐阳光互动娱乐传媒有限公司 Live broadcast information source output method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050086342A1 (en) * 2003-09-19 2005-04-21 Andrew Burt Techniques for client-transparent TCP migration
CN101719838A (en) * 2009-11-17 2010-06-02 华为技术有限公司 Processing method, device and system convenient for main/backup switching
CN102624542A (en) * 2010-12-10 2012-08-01 微软公司 Providing transparent failover in a file system
CN104090992A (en) * 2014-08-06 2014-10-08 浪潮电子信息产业股份有限公司 Method for high-availability configuration between conversion nodes in cluster storage system
CN104980399A (en) * 2014-04-08 2015-10-14 腾讯科技(深圳)有限公司 File transfer method, client and proxy server
CN105262820A (en) * 2015-10-29 2016-01-20 浪潮电子信息产业股份有限公司 Cluster multi-computer mutual backup method based on Linux operating system
US20160266988A1 (en) * 2013-11-22 2016-09-15 Huawei Technologies Co., Ltd. Data Processing Method, Device, and System for Storage Unit

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050086342A1 (en) * 2003-09-19 2005-04-21 Andrew Burt Techniques for client-transparent TCP migration
CN101719838A (en) * 2009-11-17 2010-06-02 华为技术有限公司 Processing method, device and system convenient for main/backup switching
CN102624542A (en) * 2010-12-10 2012-08-01 微软公司 Providing transparent failover in a file system
US20160266988A1 (en) * 2013-11-22 2016-09-15 Huawei Technologies Co., Ltd. Data Processing Method, Device, and System for Storage Unit
CN104980399A (en) * 2014-04-08 2015-10-14 腾讯科技(深圳)有限公司 File transfer method, client and proxy server
CN104090992A (en) * 2014-08-06 2014-10-08 浪潮电子信息产业股份有限公司 Method for high-availability configuration between conversion nodes in cluster storage system
CN105262820A (en) * 2015-10-29 2016-01-20 浪潮电子信息产业股份有限公司 Cluster multi-computer mutual backup method based on Linux operating system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110557453A (en) * 2019-09-05 2019-12-10 广州虎牙科技有限公司 data distribution method, device, equipment and storage medium
CN110557453B (en) * 2019-09-05 2022-10-04 广州虎牙科技有限公司 Data distribution method, device, equipment and storage medium
CN111479117A (en) * 2020-04-03 2020-07-31 湖南快乐阳光互动娱乐传媒有限公司 Live broadcast information source output method and device
CN111479117B (en) * 2020-04-03 2022-01-28 湖南快乐阳光互动娱乐传媒有限公司 Live broadcast information source output method and device

Similar Documents

Publication Publication Date Title
US10887284B1 (en) Peered virtual private network endpoint nodes
US11831611B2 (en) Virtual private gateway for encrypted communication over dedicated physical link
US10374955B2 (en) Managing network computing components utilizing request routing
AU2016235759B2 (en) Executing commands within virtual machine instances
CN102947797B (en) The online service using directory feature extending transversely accesses and controls
US20040003247A1 (en) Non-centralized secure communication services
US8694653B2 (en) Targeted data transfer between operational domains
CN110572439B (en) Cloud monitoring method based on metadata service and virtual forwarding network bridge
JP2010521761A (en) Management layer method and apparatus for dynamic allocation of remote computer resources
EP1548614B1 (en) Storage service
JP2012048697A (en) Network service providing system with high reliability
WO2005106701A2 (en) Maintaining data integrity in a distributed environment
CN111327668B (en) Network management method, device, equipment and storage medium
CN111108736B (en) Method and system for automatic address failover of a computing device
CN108933847A (en) A kind of method and device that address is quickly distributed
WO2008056496A1 (en) Information management method and information processing device
EP1741041A1 (en) Systems and methods for providing a proxy for a shared file system
CN114363165B (en) Configuration method of electronic equipment, electronic equipment and server
CN107395416A (en) A kind of data transmission method for uplink and server cluster
US7209481B2 (en) System and method for automated network address cloning for routers
Cisco Network Registrar Features
CN114157448A (en) Method, device, terminal and storage medium for establishing and deploying password service platform
KR101368210B1 (en) Policy-based cloud service brokerage system and network service method using the system
US20070162577A1 (en) System for providing managed computing service
US20030046398A1 (en) Method and system for managing a plurality of console devices in a network

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20171124

RJ01 Rejection of invention patent application after publication