Hi, I am thinking to use self hosted typesense in ...
# community-help
j
Hi, I am thinking to use self hosted typesense in production for a product I am building. I have basically 2 major questions:- 1. I have seen typesense using GNU General Public License v3.0 license and in it source code must be disclosed if distributed. But since i am not distributing the software and i am basically indexing user info and when user search a particular term on my webapp the results are fetched from typesense. So, in this condition do i need to disclose source if i am using typesense. 2. I have read the docs in which it is written typesense stores results in ram. But, what happens when there no more space remaining in the ram, than does typesense stores them on disk or fails?
j
Hi Jainal, as long as you don't modify Typesense's source code itself and instead use it as a standalone process, GPL-3's source code disclosure does not apply.
If you run out of RAM, you'll see unpredictable results since the OS itself will start running out of RAM. You could configure swap in the OS, in which case you'll start seeing requests taking a long time to execute, since data has to be swapped back and forth between RAM and disk.
Typesense does not automatically fall-back to disk, instead if you have swap space configured it is the OS that will start swapping contents between RAM and disk. If you don't have swap configured the OS won't have memory to function and it might stall other critical processes. So the OS' Out of Memory handler will kick-in and start killing processes, and it could kill the Typesense process as well
I'd highly recommend setting up alerts on memory usage and proactively scaling up RAM capacity as you index more and more documents
j
hi, thanks for your reply
I just had a last query, if i am deploying typesense on a single vm on cloud. Will it be beneficial to set up a cluster configuration inside a single VM?
@Jason Bosco
@Kishore Nallan
j
@Jainal Gosaliya No it won’t be beneficial to setup a cluster configuration on a single VM. Because if that VM goes down then all nodes in the cluster will be unavailable
j
So, by just running the docker container can i put it in production or does it require any further steps?
k
If you don't need high availability, then all you need to do is to run the Docker container on the machine, that's it.
For HA, you need to set run atleast 3 instances, as described here: https://typesense.org/docs/0.19.0/guide/high-availability.html
j
So is there configuration involving master slave for backing up the data if 1 node falls?
k
Data durability will be there as long as the storage directory persists instance failure, for eg using EBS on AWS instead of ephemeral instance store.
We don't have a master/follower setup -- you need to run 3 instances since we use Raft for clustering.
j
Oh okay understood 😊
Thanks
k
👍