Supabase Presence uses a real-time system to track users' online status. Which option best describes how it detects when a user goes offline?
Think about how real-time connections usually detect disconnections.
Supabase Presence uses WebSocket connections. When the connection closes, it knows the user is offline immediately.
You want to track online status for users who may be connected from multiple devices simultaneously. Which configuration approach correctly supports this?
Consider how presence channels identify connections.
Each device should connect with a unique presence channel instance but share the same user ID to track multiple devices per user.
You need to design a presence system using Supabase that can handle 10,000 concurrent users efficiently. Which architectural choice best supports this scale?
Think about how to distribute load and avoid bottlenecks.
Partitioning presence channels by groups or regions helps distribute load and improves scalability for many users.
How can you secure Supabase Presence data to prevent users from spoofing online status of others?
Consider how to restrict who can update presence data.
Using RLS policies ensures only authenticated users can update their own presence data, preventing spoofing.
In Supabase Presence, what is the best practice to ensure presence state is cleaned up if a client disconnects unexpectedly (e.g., network failure)?
Think about how real-time systems detect lost connections.
Supabase Presence uses WebSocket connection state; the server detects disconnects and cleans presence automatically.
