Is Convex good for high read/writes
Hi there!
I’m creating an app that requires real time user tracking. There could be a room of up to 100 people and their locations updating every 5-10 seconds. I understand in a regular system you could use something like Redis stream to hold the location info and send it to every other client, but I’m wondering if Convex is an appropriate solution.
I’m mostly concerned because Convex reruns queries on every change. So if there’s 100 users updating their locations, and 100 users listening for those location changes, rerunning the query for a specific “room” of users every few seconds doesn’t sound very efficient. At the moment I have it implemented with a custom web socket that only sends the changed values (and using Redis for horizontal scaling). I understand Convex should cache these similar requests, but running a query to the database asking for 100 specific locations from the database every few seconds does not sound good either.
Is this a valid concern? Has anyone looked into high read/write performance with Convex or done any benchmarks?
2 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Sounds similar to the mouse cursor following in examples such as: https://github.com/get-convex/multiplayer-cursors and https://www.youtube.com/watch?v=Tx_YIN-87_M
GitHub
GitHub - get-convex/multiplayer-cursors
Contribute to get-convex/multiplayer-cursors development by creating an account on GitHub.
Convex
YouTube
How to implement Figma’s multiplayer cursors with Convex
After 33 years of coding, Mike shares a game-changing real-time update trick that unlocks collaborative cursor tracking—even in serverless environments. This video is a must-watch for full-stack developers, React engineers, and anyone building multiplayer experiences.
Learn how to simulate high-frequency updates by batching mouse movements a...