subscribers establish SSE connection to real-time platform and subscribe to any change of connection status
real-time platform sends heartbeat signal to presence service to detect status of client, presence service publishes event to notify when status changes
when user goes offline
web browser/app triggers unload event to change presence status when closing app -> delayed trigger can be configured to detect absence of heartbeat signal and queries whether DB record of user has expired
handle jittery connections
offline and timeout events can be treated as offline, longer time interval set for timeout to prevent fluctuations status -> handle jittery connection