TL;DR: Treat the last-participant callback as a fast hint, not as proof that a video room is empty. In a Node.js fintech calling service, list participants before deleting a room, make deletion idempotent, and run a scheduled sweep over rooms that the callback missed. Track the open-room count as an operational metric. Presence accuracy is the decision axis: if the system cannot prove zero occupants at deletion time, it must leave the room alone and let reconciliation try again.
I have been paged for missed jobs and duplicate deliveries. The lesson transfers cleanly to RTC cleanup: edge-triggered handlers are useful, but they are not a complete statement of current state. A disconnect can race a reconnect, arrive twice, or never reach the worker. One path gives low cleanup latency; the other gives eventual repair.…