http://kb.cnblogs.com/page/519824/
The Network performance optimization practice of Ctrip app
Benefit from an article that let me know that network interaction is not simply transmitting and receiving data. The real challenge is the performance optimizations behind
Here are some of the articles in the summary and collation, as a personal note
Common Network performance issues:
1.DNS problem
- DNS is hijacked or invalidated
- DNS resolution slow or failed
2.TCP Connectivity Issues
- The TCP connection port is sealed
- TCP connection timed out
3.write/read problems
- Set a reasonable read/write timeout length
- Common ports in the environment where the client is located are limited
- Network switchover (that is, when the user's network in the wifi/4g/3g/2g type switch, its client IP will change, if the Network service communication at this time, then the socket connection itself has been invalidated, and eventually will cause network service failure)
4. Transmission payload Too large
- It's a lot more slow to pass.
5. Complex domestic and international network conditions
Optimized solution with the goal of being connected, fast, and short in transmission time
Optimization Practice One: Optimizing DNS resolution and caching
A server IP table is built in early, and the first network service in the app selects one from the server IP table, and DNS resolution is performed in parallel, and after the DNS resolution succeeds, it is returned to the server IP table that best fits the current IP value.
Optimization Practice two: Network quality inspection
- According to the current network quality, the parameters of the network connection are configured in different scenarios
Optimization Practice Three: Provide network Service priority and dependency mechanism
Optimization Practice FOUR: Provide network service re-send mechanism
Optimization Practice Five: Reduce the amount of data transfer
- Efficient data format and serialization/deserialization algorithms
- Picture optimization
Optimization Practice VI: Optimizing Overseas Network performance
Turn: The network performance optimization practice of Ctrip app