Break through the tradition: How to set up BT servers in Linux
Source: Internet
Author: User
Break through the tradition: how to set up a BT server in Linux-a Linux Enterprise Application-a Linux server application is described below. The traditional file download service is based on the client/server model. The downloaded file is placed on the server. The user logs on to the server and downloads the file to the local device. During the file download process, the source and destination of the transmitted file are not equal. The server only transmits the file to the client one way.
The disadvantage of this traditional software download mode is obvious, and the bottleneck of the entire system lies in the server. Due to the constraints of server processing capabilities, Internet access link bandwidth, and other environments, when the download volume is very large, the server is often overwhelmed. After the download is completed, the user has no contact with the server, and other users cannot get any help from the versions downloaded by the previous user.
With the continuous development of Internet technology, P2P (Peer To Peer, point-To-point) technology has gradually become a mature technology for file exchange and download. P2P Technology carries forward the spirit of "freedom, equality, mutual assistance and sharing" on the Internet.
The earliest P2P technology was the music exchange software Napster. Currently, the most popular P2P file exchange technology is BT (BitTorrent, bit stream ). More and more people use BT to share and download software. websites and BT client software that provide "Seeds" on the Internet can be seen everywhere. However, most articles on the Internet about setting up BT servers are for Windows platforms, in addition, the BT principle is often not involved, which makes it impossible for administrators who want to use the Unix/Linux platform to set up BT servers and provide "seed" downloads. This article discusses the BT principle from the perspective of the application, and describes in detail how to set up a BT server on the Unix/Linux platform and provide the "Seed" download service.
BT Principle
BT is the abbreviation of BitTorrent. BT features that users can download and provide uploads to other users, therefore, the download speed does not decrease as the number of users increases as the FTP server does. On the contrary, for BT downloads, the faster the download speed is.
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // tech.ccidnet.com/col/attachment/2005/8/410623.gif'); ">
Traditional file sharing services, as shown in principle 1 of FTP and HTTP. As the number of users increases, bandwidth requirements also increase, and too many users may cause bottlenecks. Therefore, many download websites have restrictions on the number of concurrent users and download speed.
BT downloads use a shared method to transfer files, as shown in figure 2.
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // tech.ccidnet.com/col/attachment/2005/8/410625.gif'); ">
BT downloads A file into N parts on the first shared end (or called Downloader). User A can randomly download the M part from Downloader, B users can randomly download part K on the Downloader server. User A's BT client will download part K from user B as needed. Similarly, user B can also download Part M from user, this method reduces the load on the server and accelerates the download speed.
For example, a c user can download data directly from the server at A speed of several Kbps, while A and B users can download data at A much faster speed. While downloading files, users are also uploading files. While enjoying the download service provided by others, each user is uploading and contributing their own bandwidth, as a result, the more people use the BT download service, the faster the speed of everyone. The superiority of BT download is shown here.
From the perspective of building a BT server, the entire BT system consists of four parts.
1. BT Client
BT client is installed on the user PC client software, there are a lot of BT client available, here we recommend BitComet (http://www.bitcomet.com/index-zh.htm ). It is a simple and easy-to-use BT download client software similar to the FlashGet interface.
BitComet is also responsible for sharing the downloaded content to other users during the download process. If you do not know how to use the BT client to download, install BitComet and visit the BT China website.
2. BT "Seed" File
The BT "Seed" file is a file named. torrent. It is the fingerprint information of the source file produced by the first publisher and shared file based on the source file. The "Seed" file is very small, generally ranging from dozens of KB to hundreds of KB. It contains the BT address information of the file and the verification code of the target file. After a BT user obtains the "Seed", the BT user runs the "Seed" file directly in the BT client software. The BT software will follow the information contained in the "Seed" file, all available download sources of the file are automatically found and downloaded.
3. Tracker
You do not need to specify a server to use the BT service. Although the concept of a server still exists in the BT service, users who use the BT service do not need to care about where the server is located. A bt server is called a Tracker. To be precise, a Tracker is a program running on the server. This program can track how many people download the same file at the same time. When the BT client connects to the Tracker server, it will obtain a list of download personnel. Based on this list, the BT client will automatically connect to other nodes in the network for download.
4. Seeds
The BT service calls the user node that provides the complete file "Seed" and the user that is being downloaded is called the customer (Client ). The number of "seeds" and "customers" of a file can be seen. If there is a "Seed", you can download it with confidence. Of course, the more seeds, the faster the client downloads more files.
If the number of "seeds" is 0, you do not need to try it. After a user downloads the file, if the user does not choose to close it, others can continue to download the file from the user. Therefore, when there are more people to download, the "seed" will also increase, and the download speed will also increase.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service