MietzeKatze
MietzeKatze5w ago

How scalable is convex realy?

So im loving Convex so far. Its realy sweet. Im almost sold. But the biggest question of all: How scalable is it ? e.g. facebook has 383 million facebook users ... searchich a table of 383 user entries must be horrible in terms of performance, so they probably partition their user table and do all other kinds of optimization. With convex on the other hand, who will do that optimization ? Is the backend so genius to just do it all by itself? Are we as developers in charge of making such big tables work (if so how)? Or is the convex team manually optimizing projects as soon as they hit a certain size and generate good revenue for the company? I watched this youtube video of "How convex works" (https://www.youtube.com/watch?v=3d29eKJ2Vws) Which explains that convex stores a lot of metadata and doesnt use plain tables.... So Im curious does this overhead slow it down compared to simple mysql or postgresql to a point where it cant handle 383 million users? Also I found this interesting limit on the db " Documents scanned: 32,000 (Documents not returned due to a filter count as scanned)" Does this mean we cant query tables bigger than 32000 documents?
Convex
YouTube
How Convex Works - A Technical Deep Dive
This video demystifies how Convex works under the hood for real-time web apps. From a developer’s perspective, it explains Convex’s log-structured storage, versioned indexes, and transaction model that enables strong consistency with high throughput. Viewers see how optimistic concurrency control (OCC) resolves conflicts (e.g., “two users,...
4 Replies
Convex Bot
Convex Bot5w ago
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!
ari-cake
ari-cake5w ago
Not a convex maintainer, but I’ve read parts of the code: - if you use a query with an index, it’s generally fast enough. You don’t need to scan a document if you van reliably filter with an index - indices are often implemented using binary trees. With your users table example, you can half the number of potential documents you look at every time. So, if you have an index that sorts users by email, it would look at the middle document, see if the desired email is bigger or smaller than the email we are looking for. Then you only have 200 million documents. In the next step, you have 100 million, then 50, then 25, … -> After looking at 29 documents, you know which entry in the users table contains your desired user. A database can do this operation quickly. As a rule of thumb, if there’s an index, it’s still fast - Convex in the cloud option does some things to be fast and supports running on multiple servers, to handle bigger loads. But if you expect to replace facebook tomorrow, I’d recommend you look at something else - though no solution will be sufficient out of the box. - No, not even MongoDB or Firebase. - You don’t have 380 million users - Generally, convex is slower than plain postgres on the same hardware. But it adds features that would be difficult to implement there In the end, my recommendation would be to use a technology that allows you to build an application that creates value for users. If you think that requires postgres or mysql, use those. If you expect to have complicated queries, and need to e.g. generate reports constantly, use postgres/mysql. if you want to focus on user-experience, and can live with the tradeoffs of convex, then it is a good choice. Note: based on your name, you’re German. Convex only offers their cloud-hosted variant on american servers right now, so there is some degraded user experience as every request has to go to america and back again. My recommendation would be to pick something that can handle 10’000 active users - once your thing is used by this many people, you’ll likely have a team behind you that can resolve technical debt you acquired.
MietzeKatze
MietzeKatzeOP5w ago
Thanks for you fast reply! I mean indexes sound like THE solution then 🙂 Guess I never realy knew what they were realy doing. Now I know 🙂 thank you 🙂 In general Im not quite so sure I will hit the 380 million users anytime soon 😉 , but you never know, and when its all running and people use your service, its a pain to migrate somehwere else, so just wanted to sniff a little 🙂 Regarding the servers only beeing in US, I was told having some in EU is an upcoming milestone ... they need to finish migration to postrgesql first and then its somewhat next 🙂
Clever Tagline
Yup. If you haven't already seen this FAQ entry, keep an eye on it for future updates on region expansion: https://discord.com/channels/1019350475847499849/1410082090682159205

Did you find this page helpful?