متى يكون التخلّي عن ضمانات TCP صواباً — DNS، فيديو، ألعاب — والمفاضلة التي تجعل UDP مناسباً.
متى تستخدم UDP
باختصار
الأهداف
- المقارنة بين ضمانات TCP و UDP
- اختيار البروتوكول المناسب
- شرح «في الوقت أفضل من كامل»
TCP guarantees delivery and order, at the cost of the handshake and retransmissions. UDP throws that away: it fires packets and does not care if they arrive. That sounds worse, but for the right job it is exactly right.
| TCP | UDP | |
|---|---|---|
| Guarantees delivery | Yes | No |
| Ordered | Yes | No |
| Overhead | Higher | Minimal |
| Good for | Web, files, mail | DNS, video calls, games |
Note
A dropped frame in a video call is better ignored than re-sent a second too late. That is the whole argument for UDP — sometimes on-time beats complete.
للمراجعة
- UDP يتخلّى عن ضمانات TCP بأقل عبء
- يُستعمل لـ DNS والفيديو والألعاب
- أحياناً التوقيت أهم من الاكتمال