How to make your product users have a first-class upload experience

Source: Internet
Author: User

This article is published by NetEase Cloud.

In the current Internet products, short video, online KTV, online multimedia interaction and other scenes are more and more. Such products rely heavily on value creators, such as beauty anchors, small screen makers, music producers, and so on, to create a quality user experience for value providers that is especially important for these Internet products.

So, how can we protect this? Let's talk about the user experience of producing and disseminating value (uploading data) from value providers.


As shown, this should be the current many apps are faced with problems, upload failure, upload slow, resulting in the user experience is not satisfactory, from the macro level we can summarize the reasons are as follows:

Mobile

Mobile network of various, WiFi, 2g, 3g, 4g, compared to the PC side, mobile Internet is a more significant feature is the environment is very unstable, dropped packets more serious, which directly led to the client and the service side of the low connectivity, resulting in file upload download speed is slow, low success rate.

Long Journey

The other point is that the mobile network and the PC-side network have to face the problem-wan high latency. From the NetEase cloud object storage distribution in the various areas of the time delay between the computer room monitoring can be learned that north, northwest, southwest and other regional nodes to the Hangzhou computer room delay is basically about 30ms~50ms, to the evening when the network busy, sometimes delay will reach the hundred MS level, packet loss rate will be correspondingly higher.

you is in China

The domestic network environment also has a typical problem is the telecommunications, Unicom North-South separation, there are many small operators network problems. Foreign and cross-border visits are not to mention, whether domestic visits abroad or foreign visits to the domestic basic can only anxious, delay drops high to scary.

To the technical level, technicians know that this is because of the foundation of the Internet-the great TCP protocol is somewhat stretched in such a mobile, wide-area network environment. As shown, we are faced with an extremely poor quality underlying TCP data transfer channel, packet loss (high loss rate)), and a higher latency (hi RTT) that makes the data transmission channel narrower and more congested.

NetEase Cloud offers Solutions

NetEase Cloud as a first-class storage service provider (this is our goal), for NetEase group internal and many partners to provide high-quality object storage and storage-based data transmission acceleration and other value-added services, one-stop for enterprises to solve the mobile internet era of non-structural data management problems.

In the domestic, foreign and cross-border upload difficult, upload slow and so on we are in the Internet products with all walks of life when they are connected to reflect the problem. To this end, from the beginning of 2014, NetEase Cloud started to create a unified solution to help products overcome this problem, at present, we have a very complete solution. Let's take a look at some of the results we've achieved:

Significant acceleration effect


NetEase Cloud provides solutions to help products in the transmission speed and upload success rate has achieved a good effect, has been affirmed by users. (objective data obtained from the use of keynote tests at all levels of the country)

Convenient Access

Enterprises only need to use the SDK (Android, IOS, Web PC), in a short period of time to solve a variety of all kinds of upload, upload slow, secure upload and other issues, so that product users have a first-class upload experience.


And if companies want to build their own set of customer upload system, it will involve all aspects of investment:

0 Reliable Upload protocol: Support file Shard, breakpoint upload, streaming upload, secure upload (HTTPS)
0 uploading server-side systems: support for high concurrency, high throughput (service-side design for large data interactions is often difficult)
0 platform-wide SDK: including mobile Android, IOS, web-side, PC-side
0 large amount of resources input, including a large number of human resources (development, operation and maintenance), various regional edge nodes, domestic and foreign dedicated resources and so on

With so much input, capital costs are at least millions of. And the use of NetEase cloud, enterprises can zero-cost access to upload systems, and NetEase partners stand on the same technical starting line to build products.

Technology Disclosure

Next, we will share with you how we are technically building the above upload solution.

We have invested a lot in resources, architecture, system optimization and so on, among which the main optimization work includes:

0 Edge Fabric Point

0TCP Protocol Tuning

0 Application Layer Protocol optimization

0 mobile-side upload optimization

0 Routing Optimization System

1 Edge fabric point and TCP optimization


The client-to-base station is mainly high-Loss rate, which is the problem of higher packet loss, and the high-RTT-delay problem is mainly between the base station and the data center.

Our solution is divided into divided. In order to solve the problem of high latency in the second half of the network, we deploy the Edge node service to the nearest user, and quickly upload the user data to the data center with high-speed leased line.

At present, NetEase cloud object storage through balls accelerated network has covered the domestic central China, north China, South China, east China, southwest, northwest several large areas, mainly including the United States, Japan, Southeast Asia, Europe and other regions, other regional coverage is constantly improving.

Areas covered by the country:


In foreign countries, we use the AWS Room node to cover, through the foreign high-speed leased line access to domestic computer room.


The network between the Edge node and the data Center (the Nos Center room) is mastered by NetEase Cloud in its own hands, so optimization is the first to overcome the high latency problem of WAN. We established a long connection pool between the Edge node and the central room, and made some parameter tuning for the TCP connection, such as Tcpslowstartafteridle, Tcp_wmem and so on. This avoids the slow-start process of uploading data each time, guaranteeing a piece of data to be sent to the data center (theoretically optimal) in only one RTT.

The following is the online tone test of the Beijing node optimization before and after the optimization of the edge node to the center of the statistics (the Edge node to the central room of the time, including write NOS), you can see the optimization, compared to the Hangzhou BGP edge node to the Hangzhou Central computer room (same room), Beijing, AWS with a basic difference of about 30ms.

2 Application layer protocol optimization

The traditional standard object storage service (AWS S3 is basically the fact standard) is designed for the service side, including the system design and the interface provided by it, are not well adapted to the needs of the mobile network. The most important point is that the traditional (also standard) object storage interface is unable to support the continuation of the breakpoint, and its block upload protocol is mainly for users to upload large files of the scene (minimum block size of 5M).

In terms of the current mobile Internet application scenario, in order to provide users with a better experience, including voice, pictures and video resources are generally in ensuring that no impact on the user experience based on a large amount of data compression, the size of the uploaded file will not be more than 1M, the smallest chunk of 5M is completely useless.

Therefore, we must design a set of common protocols for through balls to support mobile uploads, we mainly consider the following two basic design goals:

continuation of the breakpoint: support for small files in a short time of the continuation of the breakpoint, supporting large files for a longer period of time to continue the transmission.

streaming uploads: supports streaming uploads of size files, which are part of a streaming upload without knowing the final file size, such as support for Benku side-pass.

The following is the core interface Postpart


POST/${bucketname}/${objectname}?offset=${offset}&complete=${complete}&context={context}&version= 1.0 http/1.1
Content-length: ${length}
Content-type: ${contenttype}
X-nos-token: ${token}

<data of Body>

0offset offset of uploaded data throughout the file
0x-nos-token for uploading tokens
0complete identification is the last file shard data
0context is the identity returned by the server, used to uniquely identify this file upload in a breakpoint continuation scenario

3 Mobile-side upload optimization

In order to cope with the high packet loss rate of the mobile network, in addition to the design of the protocol dedicated to the Shard upload, we have also made the following optimizations:

HTTP PipeLine


In the mobile network environment, in order to improve the success rate of file upload, the client tends to slice the file. For example, 1M file with 16K as a Shard, a shard of one shard to upload.

The traditional mode of HTTP 1.1 requests (that is, the way most users currently use them) is the following no pipelining mode. Each time a shard is uploaded, it waits for a rtt to be uploaded. In the WAN environment, such as outside of the user upload to Hangzhou, the next shard upload must wait for the last shard upload completed, that is, hundreds of Ms time before the next shard upload.


It is obvious that the traditional HTTP non pipeling protocol pattern is not appropriate in a WAN environment. Currently, the SDK of NetEase Cloud supports HTTP pipeling mode, which is uploaded by default using HTTP pipling mode. Make full use of the client's upload bandwidth, but also make the upload speed on the client block size is not very sensitive.

NetEase Cloud in the experimental environment, using Raspberry Pi + Facebook augmented traffic Control (Facebook Open Source network environment Simulation tool, which is mainly used to test the performance of Facebook social network in some weak network environment) Pipeline conducted a round of tests, as shown in the test results. And its performance on the actual line is also very good, can be in the service side and network optimization on the basis of a further increase in speed.

Domestic:


Foreign:

Connection Pool Management


The time to complete a TCP 3 handshake is basically in hundreds of MS, so the NOS andriod SDK, IOS SDK, and other SDKs maintain the connection pool to the upload node, avoiding the time spent on connection creation before each upload.

4 Routing Optimization System


In addition, the WAN system is constantly adjusting the process. To get the best results, we built a closed-loop system that dynamically tracks WAN's best routes using the keynote to find the optimal strategy.

On-line keynote random route data---statistics of each route quality--production of the best system route and update line routing

More Highlights

In addition to through balls acceleration services, NetEase cloud object storage services in the typical data resources, compared to film, audio and video, anti-spam and other aspects of the various services have also done a variety of ecological, one-stop solution to the Internet era of non-structural data management problems, to help enterprises start efficiently.

0s of rich picture processing
0 native support Video on demand
0 Video and Transcoding services
0 Easy Shield One key anti-spam
0 Event Notifications
0 Rich access Control

Learn about NetEase Cloud:
NetEase Cloud Official Website: https://www.163yun.com/
New User package: Https://www.163yun.com/gift
NetEase Cloud Community: https://sq.163yun.com/

How to make your product users have a first-class upload experience

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.