Without TCP or UDP, internet communication as we know it would cease to function. Applications wouldn't have standardized ways to send and receive data over IP. We'd lose reliability (guaranteed delivery, in-order packets) provided by TCP, and the speed and simplicity offered by UDP. Developers would have to implement custom protocols for each application, leading to immense complexity, incompatibility, and a much less efficient and robust internet. Essentially, we'd regress to a pre-internet state for networked applications, with ad-hoc solutions and significantly reduced interoperability.
Network Address Translation (NAT) presents significant challenges for battery-powered IoT devices aiming for low power consumption. Because devices behind NAT can't be directly addressed from the outside, they must maintain persistent outbound connections to receive data, negating the power-saving benefits of sleep modes. Techniques like keep-alive messages or frequent polling to maintain these connections consume significant energy. This post advocates for solutions that bypass NAT, such as IPv6 with its vast address space enabling globally routable unique addresses for each device, or by employing intermediaries like a message broker positioned outside the NAT. These approaches allow devices to initiate communication only when necessary, drastically reducing power consumption and extending battery life.
Several commenters on Hacker News discussed the challenges of NAT traversal for low-power devices, agreeing with the article's premise. Some suggested solutions like using a TURN server or a lightweight VPN, while others pointed out the benefits of IPv6 in eliminating the need for NAT entirely. One commenter highlighted the trade-offs between power consumption and complexity when implementing these workarounds, and another mentioned the difficulty of managing NAT keepalives with devices that sleep frequently. The issue of scaling these solutions for a large number of devices was also raised. Several users shared personal anecdotes of struggling with similar NAT issues. One commenter proposed a simpler approach involving a central server that all devices could communicate with, bypassing direct peer-to-peer communication and thus avoiding NAT complications altogether.
Summary of Comments ( 60 )
https://news.ycombinator.com/item?id=43169103
Hacker News users discussed alternatives to TCP/UDP and the implications of not using them. Some highlighted the potential of QUIC and HTTP/3 as successors, emphasizing their improved performance and reliability features. Others explored lower-level protocols like SCTP as a possible replacement, noting its multi-streaming capabilities and potential for specific applications. A few commenters pointed out that TCP/UDP abstraction is already somewhat eroded in certain contexts like RDMA, where applications can interact more directly with the network hardware. The practicality of replacing such fundamental protocols was questioned, with some suggesting it would be a massive undertaking with limited benefits for most use cases. The discussion also touched upon the roles of the network layer and the possibility of protocols built directly on IP, acknowledging potential issues with fragmentation and reliability.
The Hacker News post titled "What would happen if we didn't use TCP or UDP?" sparked a discussion with several interesting comments exploring alternatives and the fundamental roles of TCP and UDP.
One commenter highlighted the existence of other protocols like QUIC and SCTP, suggesting that the question isn't entirely hypothetical, as the internet is already exploring alternatives. They mentioned that QUIC, in particular, is gaining traction. Another commenter pointed out that HTTP/3 uses QUIC, further emphasizing the shift away from exclusive reliance on TCP and UDP.
Delving deeper into the theoretical aspects, a user explained that IP itself doesn't mandate TCP or UDP. They described how the IP protocol provides a "best-effort" delivery mechanism, and TCP/UDP build upon it to offer features like reliability (TCP) and connectionlessness (UDP). They further explained that one could theoretically implement other protocols on top of IP.
Another comment emphasized the importance of some protocol for managing port numbers and multiplexing applications. They argued that even if TCP/UDP weren't used, a similar system would be needed to handle these functionalities. This highlighted the core problem that TCP/UDP solve, which is not inherently tied to their specific implementations.
One commenter humorously suggested ICMP as an alternative, acknowledging its impracticality but emphasizing the theoretical possibility of building something upon it. This highlighted the point that IP itself is the foundational layer, and other protocols are built on top.
Expanding on the core functionalities, another comment explained that flow control and congestion control are not inherent to IP and are managed by higher-level protocols. They explained that without mechanisms like those provided by TCP, the network would quickly become congested and unusable.
Another commenter proposed a thought experiment of removing only UDP, highlighting the reliance of DNS and other services on UDP and the disruptive consequences of such a change. This highlighted the specific niche filled by UDP and its importance to the current internet infrastructure.
Finally, some comments discussed the historical context of TCP and UDP, mentioning pre-IP protocols like IPX/SPX, and how these offered similar functionalities. This offered a perspective on how the current internet architecture evolved and that the core concepts predate TCP/UDP.
In summary, the comments on the Hacker News post explored various facets of the question, from existing alternatives and their adoption, to the fundamental roles of TCP/UDP in managing ports, multiplexing applications, and providing crucial functionalities like flow control and congestion control. The discussion also touched upon the theoretical possibility of designing entirely new protocols on top of IP and considered the practical implications of removing either UDP or TCP.