Home Data Center Series: What can multi-dial do and how to maximize the benefits of multi-dial
本文最后更新于 361 天前,其中的信息可能已经有所发展或是发生改变,如有失效可到评论区留言。

Preface

Actually, writing an article to talk about multi-dial is not very meaningful, mainly because the premise is that the home broadband supports multi-dial, which is purely a matter of fate. It just so happens that my home data center has made full use of multi-dial, and I think that there are still many netizens whose home broadband can support multi-dial, so I just write an article to talk about it, and by the way, help everyone sort out some concepts such as upstream bandwidth superposition and downstream bandwidth superposition.


In fact, to talk about multi-dial, we should first mention another concept: multi-export link load balancing. Since the separation of China Telecom and China Unicom from the north and south, and the emergence of operators such as China Mobile and China Tietong (if it is a school, there is also an additional link to the education network), a situation of multi-operator melee has begun, and each operator restricts access to each other (cross-operator access traffic is charged). At that time, CDN was not yet popular, so various corporate units could only use their existing broadband to build their own websites (usually one of China Telecom, China Unicom, and China Mobile, and only a few could use 2 or 3 at the same time, such as banks, securities, or similar units that are originally facing all users), and then find a cooperative broadband operator to apply for a few public network IPs. At that time, large ICPs would use mirror sites (such as China Telecom mirror sites, China Unicom mirror sites, and China Mobile mirror sites) to solve the problem of cross-operator access.

For visitors, if the operator used by the site they visit is not the same as the operator they use, the access experience will be very bad. So at this time, for corporate units, a solution was launched: multi-export link load balancing. The core idea is to introduce broadband lines of multiple operators at the same time, and then select the most suitable line according to the operator to which the IP address of the site you visit belongs, so as to achieve the best access experience (and also realize export link backup). At the same time, because the bandwidth and price of links of different operators are different, strategies are needed to balance the use of export links of various operators by outbound access requests. (This is for visitor units. For site providers with multiple operator links, there are also corresponding multi-link load balancing access, which is to guide different users to use different operator links through DNS resolution. I will just mention it here and not go too far).

Why do we mention this? Because multi-dial is actually a special type of multi-exit link load, which is just multiple links of the same operator with the same bandwidth.


Multi-dial

Is there a public IP?

Multi-dial should also be divided into two situations: with a public network address and without a public network address. The truly valuable multi-dial is when there is a public network address. For example, my family can have up to 3 dials, and there are 3 IPv4 public network addresses (my family also has an IPv6 public network address, but this does not require multi-dial, just enable one port). If it is multi-dial without a public network address, you can optimize downloads and uploads by setting a suitable link balancing strategy (this also depends on the settings of the operator's local end, there are many variables, it depends on your luck). However, optimizing the downlink is only suitable for small downlink bandwidths, such as 100 megabits or 200 megabits. Generally, for downlinks exceeding 300 or 500 megabits, there is no need to worry about the downlink bandwidth for ordinary families, which is completely sufficient. The key is actually to optimize the use of the uplink bandwidth.

The so-called "bandwidth stacking"

1. Downlink bandwidth superposition

In fact, there is no concept of downstream bandwidth superposition in multi-dial. Those who are engaged in multi-export link balancing should be very clear about this. The download speed can be improved through appropriate export strategies, but this improvement is not due to the superposition of downstream bandwidth, but because of the reasonable use of the advantages of multiple export links with multiple IP addresses. And this still has a prerequisite: it must be multi-threaded downloading, and the download site has no speed limit for downloading.

Single-threaded downloads will only go out from one exit link. The download speed depends first on the restrictions of the download site (Is the single thread limited? Is it allowed to download multiple threads at the same time from a single IP? How many threads are allowed to download from a single IP at the same time?), and secondly on the downstream bandwidth of your own broadband. If the download site does not have a speed limit for single-threaded downloads, then the speed limit for single-threaded downloads comes from the downstream bandwidth of the broadband. But in reality, the speed of single-threaded downloads (browser clicks to download) is often difficult to say, there are fast and slow (also divided into domestic and foreign, it is estimated that it will not be able to download abroad), but no matter how fast it is, it will generally not exceed the downstream rate of home broadband, so at this time the speed bottleneck is often at the download site, so it has nothing to do with whether your home broadband is 200, 300, 500, or 1000 megabytes downstream (100 is still too much), at this time even if you have 10g, it is useless. (Does it sound familiar? I mentioned a lot of useless things in the previous article, and the source is here).

If the bottleneck of single-threaded download speed comes from the download site, then multi-threaded download may be useful at this time, if the other party allows it, for example:

image.png

If the restrictions in the above picture are enabled, a single IP can have a maximum of 3 concurrent threads (this is for users with public network addresses. If you don’t have a public network address, you must use NAT. In the end, how many threads you can use to access depends on how many people visit this site on the public network IP you are using at the time. If it is full of 3, you can’t access it~), then you can indeed triple the download speed by using multi-threaded downloading, but that’s all.

In this case, the power of multi-dial comes into play:

1. If your home broadband supports 3 dials (let’s assume 3 dials, taking my home as an example)

2. If your home phone has 3 IPv4 public addresses (this is not necessary. Even if you get an intranet address, you may end up with 3 different public IP addresses because the operator's IPv4 public address pool is large enough)

3. If your multi-dial load strategy is configured properly (how to configure it properly will be explained later)

Then theoretically you can achieve 9 times the download speed (this is not because of bandwidth superposition, but just because you have 3 public IP addresses).

However, I believe this is not the norm now. There shouldn’t be many normal downloads now, and most of them still use p2p.

2. Uplink bandwidth superposition

This is more elusive than the downlink bandwidth superposition mentioned above, because the scenarios that require uplink bandwidth are often bound to your public IP (such as PT), so the uplink bandwidth of your single dial-up determines the bandwidth limit of this application, and it is useless to dial 100 times more. Of course, it is also possible to play PT with multiple dials, and you can make full use of the uplink bandwidth of each link (prerequisite is an IPv4 public network address, why not mention the ipv6 public network address? Unless the port mapping of the router supports the mapping of the ipv6 public network to the ipv6 private network, otherwise the ipv6 public network address is routed and has no chance of multiple dials). It’s just a bit more troublesome. You need to specify different export links for each pt tracker server. This is what I did before, but I don’t do it now. First, it’s too troublesome, dozens of pt stations. . Second, I have graduated. . I no longer need upload capacity~. In fact, if you really need upload capacity, you might as well buy a box. Using home broadband to hang pt is still based on points, so bandwidth is actually not important.

Now that we have clarified the basic concepts, let’s move on to talking about multi-dialing.

Multi-dial strategy

Earlier, we mentioned the issue of proper multi-dial strategy configuration. What does proper configuration mean? In fact, this mainly refers to how you use your multiple egress links, also from the perspective of downlink and uplink.

1. Downward

If you don't have any detailed requirements, you can directly use the "multi-line load" method to reuse several export links. There are also several options for this, such as:

image.png

image.png

This is up to you to choose according to your needs.
You can also use protocol diversion:
https://www.ikuai8.com/index.php?option=com_content&view=article&id=146&Itemid=253
Port splitting:
https://www.ikuai8.com/index.php?option=com_content&view=article&id=147&Itemid=254
Domain name diversion:
https://www.ikuai8.com/index.php?option=com_content&view=article&id=148&Itemid=255
Uplink and downlink traffic diversion:
https://www.ikuai8.com/index.php?option=com_content&view=article&id=149&Itemid=256
I won’t go into details about these, you can just read AiKuai’s official online help, so I say that AiKuai’s online help is well done.

2. Upward

This is the point I want to make. A core concept of a home data center is to achieve the purpose of building a website with the lowest cost, and the experience must be very good. I think that with multi-dial with a public IPv4 address (it is also OK to have an IPv6 public address, but it has nothing to do with multi-dial, and I will talk about it in a new article later), the place where the economic benefits can really be realized is in building a website. Through multi-dial, I can have 3 IPv4 public addresses, and theoretically there can be 3 exits, each with 50 megabytes of upstream bandwidth (because operators have left a margin, and each exit actually has more than 60 megabytes of upstream bandwidth). Combined with the dynamic domain name function of AiKuai, the access traffic of different sites can be distributed to different exits to achieve load sharing of upstream traffic. This is the maximum benefit of multi-dial with a public address. Think about it, what is the concept of 180 megabytes upstream, and how expensive it would be if it were business fiber optic:).

The biggest disadvantage of home data centers

In fact, the biggest problem in building a website in a home data center is the lack of ports 80 and 443. As for the upstream bandwidth, even if there is not much dialing, the 60M I have now is generally sufficient. If you buy a 64GB memory and a 13th generation i5 mini host at home, it will only cost 3000-4000 (install pve, create a lot of virtual machines and lxc containers, how much money can you save if converted to a cloud host??), and the performance is much better than a cloud host (of course, the rich can do whatever they want), so as long as the problem of ports 80 and 443 is solved, the home data center will have no obstacles (except for a few minutes when the dynamic IP changes regularly).

How to solve the problem of 80 and 443? Use CDN. Generally, it is the CDN of domestic cloud providers (recordation is required), or it can be Cloudflare (after optimization, Cloudflare's access speed is acceptable). The source station of CDN can specify non-80 and 443 ports, which solves the most critical problem. Multi-dial can have multiple IPv4 public network addresses. If the export link IPv4 address corresponding to the source station domain name is reasonably allocated, the uplink bandwidth of 3 dials can be 180 megabits (60 times 3, not directly superimposed). What is this concept? How much money can be saved?

Note: The multi-dial method relies on the IPv4 public network address to work, which is expected to be increasingly difficult in the future. Currently, Chengdu Telecom requires an IPv4 public network address for at least 499 per month (399 or more packages and 100 service fees), which is not cost-effective. I will never change my 199 package. If I change (even if it is an upgrade), I guess I will not be able to keep the IPv4 public network address.

Configuring public network access

For publishing to the public Internet, you need to choose the most suitable method according to the actual environment and the reverse proxy you use. You can refer to my previous articles:
1,Docker series uses Docker to build its own reverse proxy based on NPM
2,Linux panel series configure reverse proxy and use non-443 port for publishing
3.Home data center series uses domestic cloud hosting to get free cloudflare to achieve fast access to domestic sites from abroad
4.Home Data Center Series: Use cloudflare to build a website quickly with no public IP in your home broadband (general purpose)

The first and second methods are suitable for environments with public IP but no legal 443 port (home broadband, unregistered cloud host). You need to add a non-standard port after the URL (if you use cloudflare to build a website, you don't need to add a port, but you need to customize the source station port. You can refer to:Home data center series uses cloudflare's Origin Rules to solve the problem of having a public IP but no legal ports 80 and 443 when building a websiteThe third method is suitable for cloud hosts with a record, and the fourth method is suitable for all environments (including environments without public IP), which is also the method I recommend (regardless of whether your environment has a public IP or not, because this method does not require running https traffic directly on the public network).

The content of the blog is original. Please indicate the source when reprinting! For more blog articles, you can go toSitemapUnderstand. The RSS address of the blog is:https://blog.tangwudi.com/feed, welcome to subscribe; if necessary, you can joinTelegram GroupDiscuss the problem together.
No Comments

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠(ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ°Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
Emoticons
Emoji
Little Dinosaur
flower!
Previous
Next
       
error:
en_US
Spring Festival
hapiness