#community-help

Discussing Typesense Cloud's SSDs, NVMe, and Resources Needed

TLDR A asked about Typesense's storage type and configuration possibilities. Jason shared that they use SSDs and suggested NVMe SSDs for high-availability instances. They discussed server resources needed for specific user cases and briefly touched on DDoS protection via Cloudflare.

Powered by Struct AI

1

1

1

1

Jul 12, 2021 (31 months ago)
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
05:24 AM
Does Typesense cloud have SSDs or HDs?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:24 AM
SSDs
05:24
Jason
05:24 AM
There's another special type of SSD called NVMe SSDs which is an option when you have a high availability instance (called high performance disk)
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
05:25 AM
small thing, might want to consider updating the text/copy where it says “Regular Disk” under configruation
05:25
A
05:25 AM
to say SSD
05:25
A
05:25 AM
any idea on how much NVME impacts performance for typesense? its already pretty fast sub 25ms results
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:25 AM
Ah, good catch. Will update that
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
05:26 AM
I think for datasets where the doc size is small, the performance difference will be negligible.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:26 AM
Perf improvement will depend on the dataset and the number of fields in each document
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
05:26 AM
I/O is not typically the bottleneck for Typesense. CPU is.

1

A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
05:26 AM
Is there a way I can calculate the resources needed for typesense? I’m considering launching a user-facing feature that will interface with typesense directly and don’t know what i will need
05:27
A
05:27 AM
also - is it possible to obfuscate the “url” on the client side and/or the key, or is that not needed/security theater?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:29 AM
If you can share the number of records, approximate size of each record and estimated traffic per day, I can help estimate
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
05:29 AM
~20k total records, across ~4 collections
~1k users per day maximum

education based, searching for questions mainly
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:29 AM
> also - is it possible to obfuscate the “url” on the client side and/or the key, or is that not needed/security theater?
It's fine to expose both of these publicly... They're designed that way.
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
05:30 AM
of course i understand that - but is it possible?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:31 AM
Yeah a few users put the hostnames behind Cloudflare for eg for DDOS protection for eg
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
05:31 AM
doesnt that have a sizable or material hit on network performance?
05:31
A
05:31 AM
or is that a tradeoff for security/reliability
05:31
A
05:31 AM
if you guys have any documentation on that would appreciate. thanks
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:32 AM
It's a tradeoff... But it's not too big a hit from what I saw in my benchmarks. Cloudflare also keeps persisitent connections open to origins, so that helps minimize impact

1

05:32
Jason
05:32 AM
If you search this Slack for Cloudflare, you'll find instructions on how to set this up

1

05:32
Jason
05:32 AM
> ~20k total records, across ~4 collections
> ~1k users per day maximum
And size of each record?
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
05:33 AM
~60-240 characters for the main searchable attribute
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:35 AM
Ah ok, that's a total dataset size of ~5MB. Typesense usually takes 2-3x memory, so that's 15MB of RAM worst case to index that data, which is well within the 512MB RAM config.

2vCPUs should be more that sufficient to handle 1k users per day.
05:36
Jason
05:36 AM
The only think to be aware of is that the base config (512MB RAM, 2vCPU) has a burst time of 1 hr every 24 hours. Meaning if any operation (search / indexing) pegs CPU for 1 hour, it will get throttled for the next 24 hours and then it resets.
05:37
Jason
05:37 AM
If that's not preferred, then you want to pick a non-burst vCPU config

1

A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
06:10 AM
Do you guys have plans for dedicated CPU core instances?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
06:10 AM
We already have them.
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
06:11 AM
okay will look into them further - thanks
06:12
A
06:12 AM
the lowest dedicated cpu config starts at 115 per month, correct?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
06:15 AM
Correct but the burst CPU provides cumulative dedicated cpu that might just be fine for many apps. It's only an issue if cpu pegs at 100% totally until credits expire.
06:17
Kishore Nallan
06:17 AM
E.g. 2 gb ram / 2 vcpu burst option provides upto 4 hours of dedicated burst capacity. If your basline cpu load is only 15-20% that's enough for whole day. This will be a function of concurrent searches per second.

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3015 threads (79% resolved)

Join Our Community

Similar Threads

Discussing RAM, CPU, and Hosting Options for Project

Bill asked about plans, domains and performance disparity with Typesense versus Digital Ocean. Kishore Nallan and Jason provided insights about network and disk performances, comparisons and prices.

1

30
11mo

Optimizing Typesense Implementation for Large Collections

Oskar faced performance issues with his document collection in Typesense due to filter additions. Jason suggested trying a newer Typesense build and potentially partitioning the data into country-wise collections. They also discussed reducing network latency with CDN solutions.

5

67
11mo

Enhancing Vector Search Performance and Response Time using Multi-Search Feature

Bill faced performance issues with vector search using multi_search feature. Jason and Kishore Nallan suggested running models on a GPU and excluding large fields from the search. Through discussion, it was established that adding more CPUs and enabling server-side caching could enhance performance. The thread concluded with the user reaching a resolution.

3

140
1mo

Addressing Typesense Server Issues and Optimization Needs

Robert had an issue with a 'stuck' typesense server. Jason and Kishore Nallan gave advice on handling writes, configuration for high search volumes, and running multiple typesense instances. They also recommended monitoring CPU usage and updating the server version for bug fixes.

1

30
14mo

Protecting Typesense Queries from DOS Attacks

Juri sought advice on securing typesense queries. Jason suggested use of Cloudflare for DOS attack protection and explained how to create user-specific API keys for data authorization. Ricardo endorsed Cloudflare for protection.

16

27
33mo