Mobile Development 17 min read

High-Availability Mobile Network Optimization: Short and Long Connection Strategies

Meituan‑Dianping’s high‑availability mobile network optimization combines short‑connection tactics—domain merging and IP‑direct selection—to cut DNS lookups, with a proxy‑long‑link architecture (CIP and Tencent WNS) that provides DNS‑independent, multiplexed TCP links, improving latency, success rates, and offering fallback mechanisms for robust app performance.

Meituan Technology Team
Meituan Technology Team
Meituan Technology Team
High-Availability Mobile Network Optimization: Short and Long Connection Strategies

Network optimization is crucial for mobile app user experience and revenue, with data showing high abandonment for slow pages.

Meituan‑Dianping built an end‑to‑end client monitoring platform to measure request latency from the client to the server.

Common mobile network problems include network unavailability (GFW, DNS hijacking, poor infrastructure), long loading times (chip warm‑up, cross‑carrier paths, TCP handshake), and HTTP data security issues (packet sniffing, carrier tampering).

Short‑connection optimizations

1. Domain merging – consolidate multiple third‑level API domains into a single domain (e.g., api.dianping.com) and rewrite URLs on the client side, restoring them on the SLB.

2. IP direct – fetch all IPs for the unified domain, benchmark them, and replace the domain with the fastest IP for subsequent HTTPS requests.

These approaches reduce DNS lookups, enable keep‑alive reuse, and avoid backend changes.

Long‑connection construction

Adopt a proxy‑long‑connection model: the client establishes a TCP long‑link to a proxy server, which forwards binary‑encoded HTTP requests to business servers. Advantages include DNS independence, multiplexing across domains, easier optimization, transparency to business code, and full protocol customisation.

Meituan‑Dianping initially used Tencent WNS (proxy‑long‑connection) and later built its own CIP (China Internet Plus) long‑link service, complemented by WNS and a short‑connection HTTP channel.

Key components of the network channel SDK:

CIP long‑link (TCP, with UDP and HTTP fallbacks) – ~99.7% success, ~350 ms latency.

WNS – backup long‑link.

HTTP short‑link – used for large uploads, CDN, logs.

Experience highlights:

Establish long‑link early to improve success rate.

Large TCP packets can block the long‑link; consider HTTP/2‑style framing.

Provide online downgrade mechanisms for new SDK features.

Be aware of default behaviours in iOS/Android network libraries.

Handle duplicate HTTP header keys (e.g., Set‑Cookie) correctly.

Recommendations for growing companies:

Introduce a unified network layer between business code and various network libraries.

Deploy network monitoring (e.g., open‑source Cat).

Apply short‑connection optimizations such as domain merging and IP direct.

Consider HTTP/2 or Tencent WNS long‑link services.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Proxynetwork optimizationHTTP/2Mobile Networkinglong-connectionshort connection
Meituan Technology Team
Written by

Meituan Technology Team

Over 10,000 engineers powering China’s leading lifestyle services e‑commerce platform. Supporting hundreds of millions of consumers, millions of merchants across 2,000+ industries. This is the public channel for the tech teams behind Meituan, Dianping, Meituan Waimai, Meituan Select, and related services.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.