Easy to understand: understanding the "weakness" and "slowness" of mobile networks

Easy to understand: understanding the "weakness" and "slowness" of mobile networks

1. Introduction

With the rapid development of mobile Internet, mobile IM has long been deeply rooted in people's minds by using mobile networks as physical communication carriers. Successful ones include WeChat, mobile QQ, Alipay (from the perspective of instant messaging products, Alipay is already half an IM), etc., which have also brought various benchmark functions and concepts for reference to mobile instant messaging developers: voice intercom, picture messages with mobile experience characteristics, the concept of full-time online, real-time notifications that truly break through the physical experience, etc.

The above-mentioned IM products, functions and concepts, when discussed among developers, are all labeled with the feature of “mobile terminal” without exception. From the perspective of network communication, the essence of this feature can be considered as the feature of mobile network.

Taking file sending as an example, traditional PC-side IM (which can be simply understood as IM on traditional wired networks) can be sent directly point-to-point in real time (theoretically without the need for server transit).

[[251295]]

But we can't do this in mobile IM, the reason is:

  • 1) The success rate of P2P in 3G/4G/5G networks is not that high (because it is a symmetric NAT, see "Easy to understand: Quickly understand the NAT penetration principle in P2P technology" for details);
  • 2) The signal jump and jitter of the mobile network are difficult to predict (even the moment you turn around, the signal may suddenly change from strong to weak);
  • 3) Delays, packet loss, and retransmissions on the mobile network lead to a poor communication experience (just like the “slowness” of visiting foreign websites from China, the experience is similar);
  • 4) Another consequence of delay, packet loss, and retransmission is excessive power and data traffic consumption, which is unacceptable.
  • 5) The system power saving strategy of smartphones (mainly Android and iOS) may cause the network to be blocked or even the process to be killed, and the functions cannot continue to work in the background.

Therefore, it is precisely these characteristics of mobile networks that make the functions that were originally common on traditional PCs (such as the file sending mentioned above) have to be solved in other ways in mobile IM: Take file sending as an example - mainstream mobile IM now uses server transfer to complete it. Other functions implemented using similar technologies include AMR audio files of voice short messages and picture files of picture messages in mobile IM.

So let’s get back to the main topic of this article: Why do mobile networks have characteristics such as “weak” and “slow”?

This question is best answered by network engineers. For programmers at the application layer, the theory of mobile networks is too abstruse and boring, and too difficult to understand. And for network engineers, they also don’t understand “What the hell are you programmers tangling about with mobile networks?”

Just like the line in Huang Pinyuan's song "Why Do I Love You So Much" by Karen Mok: "I can't explain it clearly, and you can't understand it..." This is probably the reason why it is difficult for application layer programmers to find easy-to-understand information about mobile networks.

Therefore, the purpose of this article is to help mobile IM developers better understand the various characteristics of mobile networks in plain language, so that the functions they develop can better adapt to mobile networks and bring better user experience.

In addition, the article "Summary of Optimization Methods for Short Connections in Modern Mobile Networks: Request Speed, Weak Network Adaptation, and Security Assurance" also mentions the relevant content discussed in this article, and it is strongly recommended to read.

4. Introduction

Mobile Internet is subverting our way of life. What are the characteristics of this network that accompanies us every moment, and how does it affect our experience of accessing the information world?

If the following scenes seem familiar, please identify yourself:

1) On the way to work, I received a picture of a beautiful woman from a friend. From the thumbnail, I could tell that the clothes were made of very economical materials. I immediately clicked on it to study it in detail, but found that I couldn’t take them off no matter how hard I tried. No, it should be “drag” rather than “taken off”. I looked up at the sky, feeling so sad that I couldn’t cry.

2) Before entering the elevator, I received a message from my girlfriend: "Do you love me or not?", of course I replied immediately "Of course I definitely!", the elevator door closed, the north wind was blowing, the chrysanthemums were turning, and when spring came and the elevator opened, the screen was full of greetings from my girlfriend: "Are you there!", "It took you so long to think about this!", "Which girl are you chatting with!", "I'm angry!", "You are a good person, bye!", I saw that my reply had just been sent successfully and stopped at the last line. The whole interactive information was completed in one go, and I was filled with tears.

3) When dining with friends, take photos and share the dishes as they are served, then devour them. Even though we are sitting opposite each other, we have to chat on our phones. The furthest distance in the world is when we sit together but can only communicate with our fingers.

There are causes and effects, there are principles and techniques. You can't get a tiger cub without risking it. Let's stop talking about this and get to the point.

5. Characteristics of mobile networks

In theory, we see that mobile networks have the following three typical characteristics:

  • 1) The mobile network signal is unstable, with high latency, easy jitter and packet loss, and narrow channels;
  • 2) Mobile state network access types and access points change frequently;
  • 3) Mobile users use high-frequency, fragmented, and non-WIFI traffic sensitive information.

Why?

Referring to [Figure 1: Schematic diagram of wireless network link], we try to trace the source physically:

▲ Figure 1: Schematic diagram of wireless network link

According to the content shown in "Figure 1: Wireless Network Link Schematic", we can obtain the following information.

***. The intuitive impression is that the communication link is long and complicated: from the (mobile) terminal device to the application server, compared with the wired Internet, it has to go through more links such as base stations, core networks, WAP gateways (the good news is that WAP gateways are being banned according to law). This is like delivering express. The more intermediate links there are, the slower it is. The service quality and efficiency of each transfer station are different. Each delivery has to be re-handed over to the warehouse and dispatched, and the package may be lost if you are not careful.

Second, this is a resource-constrained network: the number of air channels for mobile devices to access base stations is very limited, and channel scheduling is even more complicated. I will not elaborate on how complicated it is, but the lyrics of Karen Mok's song are just right here: "I can't explain it clearly, and you can't understand it..." The most important thing is that if the allocated service channel unit does not transmit data for 1 second, it will be released and recycled immediately, without any discrimination on anyone's part.

Third, the front end of this chain (wireless end) is a high-latency (except for some WIFI scenarios), low-bandwidth (except for some WIFI scenarios), and easy-to-jitter network: the bandwidth upper limit of various wireless network standards is relatively low and the transmission delay is relatively large (see [Table 1 Mobile Signal Standard Bandwidth Standards of Operators]), and you can throw a package for fun. The most important thing is that the distance from the base station, the angle of playing with the phone, the depth of the basement, etc. can all affect the quality of the wireless signal, making the package fly in the air for a while, and then fly for a while... These factors also cause the poor stability of the mobile Internet network quality and frequent access changes. Compared with the wired Internet, it is a world of difference. You can have a more intuitive feeling from [Figure 2 Differences in network quality between wired Internet and mobile Internet].

▲ Figure 2: Differences in network quality between wired Internet and mobile Internet

[Table 1 Mobile Signal Bandwidth Standards of Operators] The data comes from various encyclopedias on the Internet. It is qualitative but not quantitative, and is for reference only.

Fourth, this is a partially closed network: after accessing the air channel, authentication, billing and other pre-processing are required. The WAP network even needs to filter the data before forwarding. There are too many middlemen who want to participate before the business data can flow effectively, and the efficiency can be imagined. The majority of programmers know why product development is slow and chaotic; most importantly, cross-network transmission between different operators is expensive, slow and has many restrictions. Smart operators also use caching technology, which has given rise to the so-called network "hijacking" phenomenon.

If we consider that users frequently switch between 2G/3G/4G/WIFI base stations/APs, or between different network standards while on the move, the situation becomes even more complicated.

6. Why is the mobile network so slow?

In the introduction of the characteristics of mobile networks, we easily got three keywords:

  • 1) “High latency”;
  • 2) “Easy to shake”;
  • 3) "Narrow channel".

These physical constraints do limit the speed we experience when surfing on the go, so are there other factors?

Of course there are, and they are too numerous to mention:

  • 1) DNS resolution, a common service on wired Internet, has become a burden on mobile Internet. A round trip takes at least 1 second, not to mention the embarrassment when encountering DNS failure of mobile operators;
  • 2) Link establishment cost, i.e. TCP three-way handshake. In a high-latency and jittery network environment, where most business data interactions are limited to a single HTTP round trip, the link establishment cost is particularly significant.
  • 3) The parameters of TCP protocol layer slow start, congestion control, timeout retransmission and other mechanisms are not suitable for mobile networks;
  • 4) Poor product requirements or extensive technical solution implementations result in uncontrolled large data packets, frequent data network interactions, etc., which cause loads on the TCP link on the mobile network side;
  • 5) Poor protocol format and data structure design make protocol encapsulation and parsing computationally time-consuming, memory-consuming, and bandwidth-consuming, and even the protocol format is bloated and redundant, resulting in low network transmission efficiency;
  • 6) Poor cache design makes data loading and rendering computationally time-consuming, memory-consuming, and bandwidth-consuming.

Now I finally know where my time goes. It is too wasteful and extravagant. It also makes it unpleasant for me to play with my phone. The only martial arts in the world that cannot be defeated is speed. Let's embark on the road of exploring "speed" together.

7. Is there any way to optimize the “weak” and “slow” characteristics of mobile networks?

The answer is: Yes.

The mobile Internet era poses higher challenges to our products and technological pursuits. In order to face them calmly and elegantly, we need to be fully prepared mentally and be fully armed with a set of unified thinking and action guidelines.

There has never been a savior, only the dream of programmers to conquer all technical problems is floating in the air. Fight again and again after repeated failures, summarize the lessons learned from past practices, and discuss them together.

<<:  Wireshark network protocol analysis: interpreting the TCP protocol and understanding TCP three-way handshake and four-way handshake

>>:  The 5G era is coming. Will the WiFi you use every day disappear?

Recommend

The most feared problems when migrating from data center to IDC data center

1. Introduction When an enterprise wants to chang...

The difference between SMTP and IMAP in email protocols

Author: Li Jiabin, Unit: China Mobile Smart Home ...

The only way an OSPF router cannot become a DR/BDR is: DR priority = 0

After learning the DR/BDR selection rules in OSPF...

What is 5G IoT?

What is non-cellular 5G? I imagine most readers a...

Meta and Microsoft integrate Workplace and Teams to provide new features

[[436945]] Microsoft Teams users can now access a...

IoT and 5G are changing the world

By 2025, there will be 5 billion cellular-connect...

What have the three major operators done to prevent and control the epidemic?

On February 14, the Ministry of Industry and Info...

Five-minute technical talk | A brief discussion on WebSocket protocol-RFC 6455

01 Introduction WebSocket is a network communicat...

India issues 5G trial license, but won't use Chinese network technology

The decision to exclude the Chinese manufacturer ...