-
Notifications
You must be signed in to change notification settings - Fork 112
Multicast bitswap query in local network #563
Comments
We already do that in the mdns layer. I dont get what you are asking for would change to what is currently there. |
We do currently the following:
The proposal:
This would:
|
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
@Jorropo thanks for the move! :) |
@Stebalien if you got time, this might be interesting as the Lan-DHT functionality is AFAIK incompatible with the new Accelerated DHT Client. So instead of making it compatible, could this be used to make the communication lighter overall. :) |
@RubenKelevra my understanding was that mdns broadcasted provider records, but it don't mb. I don't think there is much to gain from this anyway, as we would likely not write a bitswap fast respond path, the node would need to do a full libp2p handshake anyway. |
We could dual DHT this fairly easy, we don't for some reason (on IPFS). |
@Jorropo well, correct me if I'm wrong but the reconnect should be 0 RTT with QUIC. So if the connection gets dropped and there's a request coming in from one of the nodes on the LAN bitswap could initiate the connection and start responding to it without doing any round-trips. I'm currently using IPFS in a home LAN/WLAn environment and it doesn't seem to perform very well: I do have 10-40 GB of data in each ipfs node and the nodes need the data at different times. So one of the nodes should have the data already cached in most cases. But like 90% of the time I'm not fetching the data from a LAN node but the Internet. I was attributing this to the LAN DHT. Since the nodes are normal computers they tend to be restarted or taken off the WLAN and on again. So the LAN-DHT is presumably most of the time not up to date, as the standard reprovide interval is 12 hours. Asking just via multicast all nodes which are currently on the network would result in instant responses without the DHT needing to learn which blocks are stored where. |
2022-09-08 triage conversation: there are already complaints about mdns creating too much network traffic. This proposal will only create more. You are free to create a protocol that does what you want, but we don't see adding it to Kubo and go-bitswap. Perhaps discussing this in a public forum (e.g., https://discuss.ipfs.tech/c/protocol/30) will get more engagement on the idea than as an issue in the go-bitswap repo. |
Checklist
Description
I was wondering if a somewhat simple multicast group for the local network wouldn't be easier and lighter in terms of communication necessary than a local DHT.
If we're using mDNS, we are likely to be connected to all peers anyway. So sending a database around isn't really efficient, if we do bitswap queries to the connected nodes anyway … and then a DHT search afterwards.
Using a multicast group, we could avoid all this background chatter for the DHT and reduce also the bandwidth from n (where N are local nodes) to 1 for queries while also avoiding the DHT search requests on top.
The only limitation is encryption, as we would need to encrypt it for a group of keys instead of 1:1 encryption. Not sure if that's possible without a protocol change.
But I think sending the queries in plaintext to multicast would be the better option here. As by default, we would send all queries to all nodes which are connected to us – there's no real difference regarding privacy concerns.
Or we create a group key – but that's hardly more secure than chatting in plain text – if we allow anyone to join.
The text was updated successfully, but these errors were encountered: