Steven Lacroix
09/07/2021, 8:01 PMJason Bosco
09/07/2021, 8:25 PMAre a few hundred inserts/updates every few minutes too much?This should be fine. But the complete answer to this depends on the amount of CPU cores / capacity. In general though, bulk updates are faster than single updates. I'd recommend leaning towards batch updates when possible.
Steven Lacroix
09/08/2021, 12:33 PMJason Bosco
09/08/2021, 6:22 PMNow I'm just wondering one thing, search-as-you-type is really great user experience, but how heavy is it on the server? Is it heavier on the RAM or CPU?Many things in Typesense are heavily optimized specifically for search-as-you-type experiences. For eg, the fact that we store all indices in memory, is to be able to enable this performance for instant-search. The amount of data you have dictates the amount of RAM you'd need. The amount of concurrent searches you have, instant-search or not, dictates the amount of CPU you need. Instant-search experiences do generate more concurrent traffic in general, so CPU demand is relatively higher. But I wouldn't let that stop you from doing instant-search experiences - I'd recommend first benchmarking to see how much CPU you need.
It says it took up about 900MB of RAM when indexed, so 2-3x that amount of RAM?That's correct. Here's more info on how to choose RAM: https://typesense.org/docs/0.21.0/guide/system-requirements.html#choosing-ram
Let's say I have 104 users doing search-as-you-type, would that be more than 104 concurrent search if they type more than 1 letter a second?If 104 users type one letter at the exact same second, that would count as 104 concurrent searches. If let's say 5 of those users type 2 letters in that same second, then you'd have 104 + 5 concurrent searches. From Typesense's perspective, there is no distinction between search-as-you-type or not - you send keywords and you get results. The difference is that the frontend that's triggering the searches sends requests to Typesense on every keypress in a search-as-you-type experience, whereas historically many search experiences would require the user to press enter to start searching, which is when the query gets sent to the search engine.
Is it realistic to think of 1k-10k search a second without breaking the bank server wise?Yup, definitely realistic! It totally depends on your dataset size and the number of fields you search for within each document. Just the other day, we had one user who was able to get up to 2.5K searches per second when searching through thousands of records with one field per record, on a 512MB, 2vCPU 3-node cluster! My benchmarking server ran out of resources to be able to generate even higher load 😄
Steven Lacroix
09/08/2021, 6:36 PMJason Bosco
09/08/2021, 7:40 PMSteven Lacroix
09/08/2021, 8:45 PMJason Bosco
09/09/2021, 12:24 AMSteven Lacroix
09/09/2021, 1:00 AMbnfd
09/09/2021, 11:18 AMbnfd
09/09/2021, 11:26 AMJason Bosco
09/09/2021, 2:53 PMbnfd
09/09/2021, 2:54 PM