UDP is often described as faster than TCP. What is the main reason for UDP's lower latency?
Think about what happens before data is sent in TCP versus UDP.
UDP sends data without setting up a connection first, so it skips the handshake process TCP requires. This reduces the time before data starts moving, leading to lower latency.
TCP includes several features that add overhead. Which one is NOT present in UDP and contributes to TCP's slower speed?
Consider how TCP ensures data arrives correctly.
TCP uses acknowledgments and retransmissions to ensure data is received correctly, which adds overhead. UDP does not do this, making it faster but less reliable.
You are designing a live video streaming app where speed is critical and occasional data loss is acceptable. Why would you choose UDP over TCP?
Think about what matters most in live streaming: speed or perfect accuracy.
UDP sends data quickly without waiting for confirmation, which reduces delay. This is ideal for live streaming where some lost data is better than delay.
Which TCP feature directly causes slower data transmission compared to UDP?
Focus on what happens before data is sent in TCP.
TCP requires a three-way handshake to set up a connection before sending data. This setup adds delay, making TCP slower than UDP, which sends data immediately.
UDP is faster than TCP because it lacks certain reliability features. Which reasoning best explains this?
Think about what happens when data is lost or corrupted in TCP versus UDP.
TCP waits for acknowledgments and retransmits lost packets, which adds delay and processing. UDP skips these steps, sending data without waiting, making it faster but less reliable.