Technical Interview Questions

TikTok Live Streaming Low-Latency Architecture

"How would you design a low-latency live streaming architecture capable of supporting millions of concurrent viewers on TikTok?"

Why Interviewers Ask This

TikTok Live is one of ByteDance's fastest-growing revenue streams, and engineering low-latency delivery at massive scale is a core technical challenge. This question tests your understanding of real-time media protocols, CDN edge caching, and horizontal scaling strategies that are directly relevant to the team's daily work.

How to Answer

  1. 1

    Start by outlining the end-to-end pipeline: ingest (RTMP/SRT from streamer), transcoding, edge distribution via CDN, and playback on the client.

  2. 2

    Explain how you would minimize latency at each hop — using SRT or QUIC for ingest, chunked transfer with low GOP sizes, and WebRTC or HTTP-FLV for last-mile delivery.

  3. 3

    Discuss horizontal scaling: geo-distributed edge nodes, consistent hashing for stream routing, and graceful degradation under load spikes.

  4. 4

    Address fault tolerance — multi-path redundancy for ingest, automatic failover between CDN nodes, and real-time monitoring dashboards with alerting.

Sample Answer

I would design the system in four layers. First, the ingest layer accepts streams via SRT for its forward error correction, reducing retransmission delays. Streams are routed to the nearest transcoding cluster using geo-aware DNS. The transcoding layer produces multiple ABR renditions with 1-second GOP and low-latency CMAF segments. For distribution, I would leverage a tiered CDN — origin shields aggregate requests, while edge PoPs serve viewers with HTTP-FLV or low-latency HLS. To handle millions of concurrent viewers, each edge node uses shared-memory caching so a single segment fetch serves thousands of connections. On the client side, an adaptive player monitors buffer levels and switches renditions without stalling. For resilience, every ingest stream is dual-published to two geographically separate origins, and a health-check service triggers automatic failover within 2 seconds. Real-time metrics on latency, rebuffer ratio, and error rates feed into an alerting pipeline so we can detect regressions before users notice.

Pro Tips

  • Mention specific protocols like SRT, QUIC, or WebRTC to show depth — avoid staying at a purely abstract level.

  • Quantify where possible: target end-to-end latency under 3 seconds, GOP of 1 second, failover within 2 seconds.

  • Acknowledge trade-offs between latency and cost — shorter segments mean more CDN requests and higher origin load.

Frequently Asked Questions

What is the difference between RTMP and SRT for live ingest?

RTMP is widely supported but runs over TCP, making it susceptible to head-of-line blocking. SRT uses UDP with built-in FEC and retransmission, achieving lower latency over lossy networks while maintaining reliability.

How does TikTok handle sudden viewer spikes when a stream goes viral?

Edge CDN nodes cache segments locally, so a viral stream only hits the origin once per PoP. Combined with predictive scaling based on trending signals and overflow routing to secondary CDN providers, the system absorbs spikes without quality degradation.

Worried About Going Blank in Your Interview?

HireMe AI listens to your interview in real-time, detects questions, and generates instant answer suggestions — so you never freeze up again.

Try HireMe AI Free