turn icon indicating copy to clipboard operation
turn copied to clipboard

TURN allocation marshaler/unmarshaler

Open rg0now opened this issue 1 month ago • 0 comments

Summary

A way to serialize/deserialize TURN allocation state would make it possible to back up TURN allocations in a key-value store. This would let one implement high-availability TURN servers and handle upstream NAT instability.

Motivation

The prerequisite of implementing high-availability TURN servers is to maintain allocation state in a key-value store like Redis. Then, once a crashing TURN server has restarted (over the same IP) it could recover existing allocations from the key-value store (at least UDP and probably DTLS, not sure about TCP, TLS). This may also let us handle upstream NAT instability (a TURN packet that belongs to an active allocation being re-NAT'd to an unknown 5-tuple), but that would be pretty tricky to implement.

Describe alternatives you've considered

None.

Additional context

See e.g., the pion/dtls binary marshaler/unmarshaler.

rg0now avatar Dec 08 '25 11:12 rg0now