DB deployment help
I need some advice on deployment.
Right now, I have an app that I want to deploy using docker to containerise it with mysql, but I found out yesterday that it’s very flaky and nearly crashed the VM I have it hosted on for my staging server (smallest linode instance)
How would you recommend hosting a DB for a shop? Keep it as SQL and use SQLite? Use planetscale? Or go NoSQL/serverless?
12 Replies
Heavily depends on your use case, would you have a lot of random read and writes ? Would you expect to ever use the scalability features ? If the answer is no, AWS RDS is a great solution.
Planetscale and all of the other serverless options only make sense if your users are truly global, and you need the scalability features.
Yeah that makes sense. This is a low read/write database as it’s just a small scale web app for only 1 state here in Australia.
Would it be better to use RDS over self hosting the database on a VM?
Absolutely, hosting your own database is a lot of effort, you have to think about updates, maintenance etc, and you lose out on all of the monitoring/analytics offered by a managed service
What kind of data would you use the database for ? Just product pictures prices etc ?
Products, users and orders
I’m also using it for sessions, but may transition it over to redis if it results in a lot of read/writes in the DB
Are you doing authentication yourself ?
Haven’t got authentication in yet (will be a feature after launch) but most likely will be doing it myself
Amazon Web Services, Inc.
Managed Relational Database - Amazon RDS Pricing - Amazon Web Services
Amazon RDS is free to try with no minimum or upfront fees, and only pay only for what you use with On-Demand or Reserved Instances.
I would not do auth yourself, there are a lot of very good authentication providers.
If this is a production environment and you are using next i would look at https://clerk.com
If you are not using next, auth0 is great.
Clerk
Clerk | Authentication and User Management
The easiest way to add authentication and user management to your application. Purpose-built for React, Next.js, Remix, and “The Modern Web”.
I’m using Remix. Haven’t deployed to production yet, so I kinda have time to change things around
Remix Authentication | Clerk
Easily add secure, edge- and SSR-friendly authentication to Remix with Clerk.
Awesome, this looks really good!
Thanks so much for your help
No problem at all, have fun!