Xdeon / ecoap

0 stars 1 forks source link

NAT issues #2

Open Xdeon opened 5 years ago

Xdeon commented 5 years ago

What is the consequence of NAT? Consider client behind NAT and server behind NAT, both with ongoing observe. And consider what will happen with current implementation that endpoint with alive client process will not terminate.

Xdeon commented 5 years ago

Problem: when LwM2M client (mainly CoAP server) is behind NAT, or LwM2M server (mainly CoAP client) is behind load balancer, after the client IP change/load balancer mapping timeout, observe relation can not be maintained. In the current design, if an endpoint process is used by a client process, it will not terminate, which is good for avoid race conditions. However, in the above cases, the endpoint process and client process on the LwM2M server side can not detect such a change. As a result, we have orphaned process.

Xdeon commented 5 years ago

Either we use extra tracking to ensure such a change will always let following message exchanges hit the same client process and properly terminate outdated endpoint process, or we change the control flow and let the incoming message initiate new endpoint & client process pair as well as terminate the old ones.

Xdeon commented 5 years ago

The above problems also exist in cluster mode.