From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 14 Nov 2008 20:12:54 -0800 From: Roman Shaposhnik In-reply-to: <140e7ec30811130855l3defca3cof48a336b6c7de46a@mail.gmail.com> To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-id: MIME-version: 1.0 Content-type: text/plain; delsp=yes; format=flowed; charset=US-ASCII Content-transfer-encoding: 7BIT References: <7D122EF9133395AC4DEA0396@192.168.1.2> <140e7ec30811130855l3defca3cof48a336b6c7de46a@mail.gmail.com> Subject: Re: [9fans] Do we have a catalog of 9P servers? Topicbox-Message-UUID: 43aacd8a-ead4-11e9-9d60-3106f5b1d025 On Nov 13, 2008, at 8:55 AM, sqweek wrote: >> I understand that if you import a gateway's /net on each computer >> in a >> rather large internal network you will be consuming a huge amount >> of mostly >> redundant resources on the gateway. My impression is that each >> imported >> instance of /net requires a persistent session to be established >> between the >> gateway and the host on the internal network. NAT in comparison is >> naturally >> transient. > > I'm not sure there's as much difference as you make out to be. On the > one hand, you have a NAT gateway listening for tcp/ip packets, and on > the other hand you have an open tcp/ip connection and a file server > waiting for 9p requests. It's not as though 9p is wasting bandwidth > chatting away while there's no activity, so the only cost is the > tcp/ip connection to each client on the network, which shouldn't > qualify as a huge amount of resources. Exactly! An idle TCP connection costs you nothing except the state that is kept by the kernels of the two connected end points. No packets ever get generated unless there's an application level payload that needs to be transferred. Not only that, but if you look at the amount of state something like iptables on Linux needs to keep in order to provide NAT capabilities it becomes a complete toss. With Plan9 as a gateway you're not paying a visible extra premium. Thanks, Roman.