#community-help

Discussion on Deploying Typesense on Render.com

TLDR Matthias shared their deployment template for Typesense on Render.com which led to a discussion with Jason about docker volumes and memory allocation. Janaka made a point on private deployment.

Powered by Struct AI
heavy_plus_sign1
ok_hand1
15
18mo
Solved
Join the chat
Aug 27, 2021 (25 months ago)
Matthias
Photo of md5-8ac455f6d302407f03def4c775778b28
Matthias
06:19 PM
Hey, I created a template to easily deploy Typesense on Render.com. You can find it here and deploy a Typesense instance with a single click: https://github.com/hmbrg/typesense-on-render
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:24 PM
Hi Matthias! This is interesting! Thank you for sharing. Do you know how Render handles persistence of docker volumes, and if these docker containers can be kept running for extended periods of time?

Asking because Typesense is a stateful datastore and requires both of these to operate
Matthias
Photo of md5-8ac455f6d302407f03def4c775778b28
Matthias
06:27 PM
This uses a Disk (more info: Disks for Persistent File Storage | Render) that is persistent over multiple deploys. Also Render.com provides Zero Downtime Deploys by checking the /health endpoint. All that is configured by the render.yaml inside the repo. So far everything works as expected.
06:27
Matthias
06:27 PM
Oh, and the mounted disk also provides automatic backups that can be rolled back to at any point, which makes backups easy.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:28 PM
Oh nice, that's pretty cool
06:29
Jason
06:29 PM
Can you configure how much RAM the docker container uses?
06:29
Jason
06:29 PM
Because Typesense stores all indices in memory to enable fast search
Matthias
Photo of md5-8ac455f6d302407f03def4c775778b28
Matthias
06:29 PM
Yes you can be choosing an appropriate plan here: Pricing | Render · Cloud Hosting for Developers
ok_hand1
06:30
Matthias
06:30 PM
How many records can I expect to store with 512mb of RAM? Any pointers?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:30 PM
It usually takes 2x-3x RAM, compared to the size of your dataset on disk. More info here: https://typesense.org/docs/0.21.0/guide/system-requirements.html#choosing-ram
Matthias
Photo of md5-8ac455f6d302407f03def4c775778b28
Matthias
06:31 PM
I see, thanks. I should be fine for a while then. 🙂
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:33 PM
Would be cool, if we can get Typesense listed on the sidebar in their docs: https://render.com/docs/deploy-elasticsearch

(At the risk of cannibalizing our own cloud hosted version 😅)
heavy_plus_sign1
Matthias
Photo of md5-8ac455f6d302407f03def4c775778b28
Matthias
06:38 PM
Yeah that would be nice! You could probably shoot them an email with a link to my repo here: [email protected]

I don't think this jeopardises your hosted version as this is far from handling any serious prod load, not to mention providing any high availability.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:39 PM
Ah right, good point about high availability, and there's also SDN.
Mar 26, 2022 (18 months ago)
Janaka
Photo of md5-3ecfadbfb82a962691e2d6cb42f876b4
Janaka
08:24 AM
I generally agree with Matthias point on not cannibalising your cloud offering. This is the exception where I'm choosing to start with self host because i was convinced that gave me the security model i wanted. But been less convinced as I've progressed. Keeping it as a private/internal service to my backend is the main juatificantion as this point (I'm indexing none public content)