Pergunta de entrevista da empresa Comcast

Can you explain the difference between TCP and UDP, and in what scenarios you would use each protocol?

Resposta da entrevista

Sigiloso

9 de out. de 2024

TCP (Transmission Control Protocol) is connection-oriented, meaning it establishes a reliable connection before data is transmitted. It ensures that data is delivered in order, without errors, and with acknowledgment of receipt. It’s typically used for applications where data integrity is critical, like web browsing (HTTP), file transfers (FTP), and emails (SMTP). UDP (User Datagram Protocol) is connectionless, so it doesn’t require a setup before data transmission. It’s faster but less reliable because there’s no guarantee that packets will be delivered or received in the correct order. UDP is ideal for applications where speed is more important than reliability, like live streaming, gaming, or VoIP.