How to organize my projects to optimize costs
bmariano
HOBBYOP

a year ago

Hi, I'd like to know what would be better to optimize costs in Railway since I'm paying around $40 per month, I don't see that as a lot but well, if I can reduce it, better then.

I have 15 projects. Each one named with the name of the company, and inside it has a Postgres database and a Strapi CMS connected to it.

These receive around 150k requests per month.

2 GB of ram should be enough (I think, lol) to handle that amount of requests (and usage in general), but around 10k requests per month is enough make a single project use 750 MB - 1.25GB of RAM, so I have 15 projects using ~1GB of RAM, which is expensive.

I'd like to ask if it'd be cheaper to create a single project, put there a single Postgres Database (using different schemas for each project), and put the 15 Strapi Admins there, connected to it. Is there any catch-ups for this implementation or something I should know?

If there isn't a clear response to this, and it's something I should try out, let me know! Thanks!

31 Replies

bmariano
HOBBYOP

a year ago

c76a19f8-74a9-4003-8811-1ffb7bf64233


a year ago

what's the average usage of those postgres instances? Strapi is a resource hungry service


bmariano
HOBBYOP

a year ago

Mmm ugh I don't know, how can I check it? Do these images respond to it?

1283393244667052000
1283393244914253800


a year ago

is that from the current month?


bmariano
HOBBYOP

a year ago

Yes


a year ago

get from a past month, there's a selector on the top of the page


bmariano
HOBBYOP

a year ago

Ok let me send everything


bmariano
HOBBYOP

a year ago

1283393667079606300
1283393667465220000


bmariano
HOBBYOP

a year ago

These are the same two of the last month


a year ago

it doesnt show the postgres usage :/
but ok, my point is that the postgres usage is so little (about 50mb~100mb) that it might not be worth it doing all of that work


bmariano
HOBBYOP

a year ago

Sorry wait


bmariano
HOBBYOP

a year ago

Is it ok?

1283394166453436400
1283394166851637200


a year ago

yep, as I guessed


a year ago

you would save about 7.5$ by doing all of that


bmariano
HOBBYOP

a year ago

Well that's around 25%


a year ago

if its worth it for you ok but IMO i would leave it as is


bmariano
HOBBYOP

a year ago

Actually I prefer to leave this the way it is now, this way is easier to separate costs by client. But I'm going to think about it. Thanks a lot @ThallesComH


a year ago

well, you also lose redundancy in case your postgres instance goes down


a year ago

and a redundant postgres instance might be more expensive


a year ago

yep, unfortunately thats the price to pay for using Strapi


bmariano
HOBBYOP

a year ago

What do you recommend?


bmariano
HOBBYOP

a year ago

Payload?


a year ago

I didn't try much CMS out there due to project restrictions so dont trust 100% my recommendations


a year ago

but i really liked payload, they seems to support Vercel so you could probably host for free


bmariano
HOBBYOP

a year ago

I'm going to take a look, thanks!


a year ago

I saw this video of them in case you want to take a look
https://www.youtube.com/watch?v=CZ7a-dx3Glw


a year ago

i would recommend that too but i don't know their resource usage so it might be the same as strapi


a year ago

I had to ask a customer to add another replica to their directus install since it couldn't handle sub 100 req/s 🫤

I don't know what they were doing with it, but still.


a year ago

which is extremely weird 'cause directus handles more than that


a year ago

I know, so they must have been doing something heavy


a year ago

its already solved 🙂


Loading...