apple / apple/swift-distributed-actors
Test and allow binding/joining nodes behind NAT (think about binding to 0.0.0.0?)
- Dominant language
- Swift
- Stars
- 677
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
It should be possible to join nodes behind NAT (for some discussion https://doc.akka.io/docs/akka/2.4/scala/remoting.html#Akka_behind_NAT_or_in_a_Docker_container ) -- in general this is about binding and validating incoming join() to be "was this really intended for me, or a random join that ended up on my host".
As part of this, we should also see about supporting binding to 0.0.0.0 -- I don't know from the top of my head if it makes sense or not... It could in containers; but it would likely result in having to drop that validation?
The current validation is a bit too intense I guess?
`2019-12-07T08:19:11+0000 warning: [sact://BackgroundService@0.0.0.0:7000][ClusterShell.swift:546][thread:140256753989376][/system/cluster] │ ---> fc16ab88646f
Rejecting handshake from sact://BackgroundService@0.0.0.0:7000, error: [targetHandshakeAddressMismatch(DistributedActors.Wire.HandshakeOffe│Step 12/12 : WORKDIR /app
r(version: Version(0.0.1, reserved:0), from: sact://BackgroundService:257046539@0.0.0.0:7000, to: sact://sact@10.1.3.14:7000), selfNode: sa│ ---> Running in 836e457219bc
ct://BackgroundService:1009555597@0.0.0.0:7000)]:HandshakeError`
Note the bind to 0.0.0.0 so NO incoming join will be accepted since:
```
guard self.boundAddress.node == self.offer.to else {
let error = HandshakeError.targetHandshakeAddressMismatch(self.offer, selfNode: self.boundAddress)
```
Contributor guide
Assessment
This issue has not been assessed yet.