Question about mongoDB in railway
magicmike123
HOBBYOP

a year ago

So, can I just create a mongoDB railway and actually get charged only by usage, unlike mongoDB atlas paid plans? If so, isnt this basically cheaper than mongoDB atlas? (I have never used anything else for mongoDB other than mongoDB atlas)

Solved

71 Replies

magicmike123
HOBBYOP

a year ago

N/A


lasse
PRO

a year ago

you always only pay for what you use, it depends how much ram, cpu your database are using 😁


magicmike123
HOBBYOP

a year ago

right, so its basically saving costs if I barely use it? I was thinking of a project where I would just send some KB each day to the mongoDB, but mongoDB atlas wants to charge me like, per hour and such, like all the time. this is cheaper I believe, for my case at least


maddsua
HOBBY

a year ago

Exactly, you only pay for resource usage and not stuff like requests or whatever


maddsua
HOBBY

a year ago

Problem is, mongo eats quite a lot of ram even when not doing anything at all


maddsua
HOBBY

a year ago

IIRC it's around 300mb when idling


magicmike123
HOBBYOP

a year ago

I would imagine mongoDB atlas would be the cheapest thing for hosting mongoDB databases, since its their own stuff. But maybe thats why they can also charge more?


magicmike123
HOBBYOP

a year ago

300mb RAM idling? holy sht


maddsua
HOBBY

a year ago

Ye just use postgres


lasse
PRO

a year ago

postgres on top


maddsua
HOBBY

a year ago

The actual database and not that soy shit


maddsua
HOBBY

a year ago

You'd have to learn sql for that, sure, but it's worth it


magicmike123
HOBBYOP

a year ago

i mean free version of mongoDB amazing I guess but holy sht, I just checked on railway and 350 mb idle you are right! thats crazy


magicmike123
HOBBYOP

a year ago

and postgres is 60 MB only!

1338488785318576000


maddsua
HOBBY

a year ago

Mongo is ass, what can I say


maddsua
HOBBY

a year ago

Even less actually


maddsua
HOBBY

a year ago

My pg instance only uses like 35 mb


maddsua
HOBBY

a year ago

And its with the workload


magicmike123
HOBBYOP

a year ago

but I barely been using this postgres db


maddsua
HOBBY

a year ago

(it only really reads a few entries tho)


maddsua
HOBBY

a year ago

It will go down after some time


magicmike123
HOBBYOP

a year ago

like I added like 3 tables and have no data on them anyways


magicmike123
HOBBYOP

a year ago

ah okey


maddsua
HOBBY

a year ago

Dw pg won't skyrocket


magicmike123
HOBBYOP

a year ago

I mean still you know compared to mongoDB


magicmike123
HOBBYOP

a year ago

and 0.0 CPU postgress vs 0.6 CPU mongoDB


maddsua
HOBBY

a year ago

Actually I lied, I'm also using the same instance to store grafana's data


magicmike123
HOBBYOP

a year ago

nice


maddsua
HOBBY

a year ago

So it's not a few records xD


magicmike123
HOBBYOP

a year ago

man I got one question now, which confuses me


maddsua
HOBBY

a year ago

It's A FUCK TON OF STUFF


magicmike123
HOBBYOP

a year ago

so I like mongoDB with node because you can use mongoose easy, for creating models directly in the DB right away etc, not have to use this migration sht that I saw on some course, is there a way to do this with PostgreSQL, with some ORM? I love this idea of create db model with mongoose then start server and collections create right away basically


magicmike123
HOBBYOP

a year ago

there has to be something, right?


maddsua
HOBBY

a year ago

Ehhh probably


maddsua
HOBBY

a year ago

I'm not using node <:kekw:788259314607325204>


magicmike123
HOBBYOP

a year ago

what you using?


magicmike123
HOBBYOP

a year ago

I was learning Rust too


maddsua
HOBBY

a year ago

I mean there definitely are orms for node


magicmike123
HOBBYOP

a year ago

but i dont know what Im doing at it so yeah


maddsua
HOBBY

a year ago

Go and C++ 💀


magicmike123
HOBBYOP

a year ago

right, I just dont know if this thing is mongoDB specific, or I could do also this in PostgreSQL


magicmike123
HOBBYOP

a year ago

I dont even know, you ever done this on Go or C++? where database creates tables automatically based on your code models?


magicmike123
HOBBYOP

a year ago

like do you do migrations in your code? @maddsua


maddsua
HOBBY

a year ago

I'm using gomigrate personally


maddsua
HOBBY

a year ago

@ThallesComH bro I'm pretty sure you know a few orms for node


magicmike123
HOBBYOP

a year ago

so I have to learn this migration sht right, theres no escape? xd


magicmike123
HOBBYOP

a year ago

1338490986979917800


magicmike123
HOBBYOP

a year ago

chatGPT spiting facts i think


magicmike123
HOBBYOP

a year ago

xd


magicmike123
HOBBYOP

a year ago

can be possible it seems


maddsua
HOBBY

a year ago

You either depend on proprietary stuff or you learn the tools. Yes, there is no escape


redicides
TRIAL

a year ago

Good ones include TypeORM and Prisma. Pick TypeORM if you value performance, Prisma if you value developer experience


maddsua
HOBBY

a year ago

sqlc+gomigrate if you're a real man <:kekw:788259314607325204>


redicides
TRIAL

a year ago

There's also Drizzle which is its own thing and doesn't use any external stuff. Prisma is annoying because it force ships specific engines for the environment, and TypeORM uses pg under the hood


redicides
TRIAL

a year ago

Sqlc on top for go developers >>


redicides
TRIAL

a year ago

Cc: @Script


redicides
TRIAL

a year ago

Also, I should mention that these ORMS work better with typescript rather than vanilla Js, so if you are currently not using typescript it would be wise to start doing so


magicmike123
HOBBYOP

a year ago

nice, well Im mostly now interested in the fact that at least, this is possible


magicmike123
HOBBYOP

a year ago

and I was trying to learn Rust so, I wonder if its possible this with Rust


redicides
TRIAL

a year ago

There are ORMS for rust too, but truthfully the good ones are only for SQL databases..


magicmike123
HOBBYOP

a year ago

yeah, I meant this on Rust with PostgreSQL


maddsua
HOBBY

a year ago

If you want to lose your mind, rust or c++ are the languages of choice


magicmike123
HOBBYOP

a year ago

well thats how we learn to become better programmers with complicated stuff sometimes


maddsua
HOBBY

a year ago

Valid


magicmike123
HOBBYOP

a year ago

big learning time ✅ have lot to learn now

1338493796786110500


adam
MODERATOR

a year ago

I think we’re good to call this thread solved! lmk if I can close


passos
MODERATOR

a year ago

@Script forget about TypeORM, its not in a good state for a while.
I would go with Prisma or Drizzle, Prisma is the easiest so I recommend that.


magicmike123
HOBBYOP

a year ago

yes


magicmike123
HOBBYOP

a year ago

can close


magicmike123
HOBBYOP

a year ago

okey thanks for info 🙂


adam
MODERATOR

a year ago

!s


Status changed to Solved adam 12 months ago


Loading...