R
Railwayβ€’10mo ago
Supamap

Help reducing egress costs, or at least figure out what is the culprit for them.

I am hosting a webpage, front and backend services on railway, and recently ive seen that my Egress costs have ballooned a bit, theyre at about more than 600 GB, and they should not have been as high (considering our scaling). I don't think I should be using as much, but I have no idea where to look to figure out what could be the culprit of the cost. Btw... im not much on an expert, so please be understanding, Thanks!
24 Replies
Brody
Brodyβ€’10mo ago
a very common cause of ballooning egress is connecting to the database over the public network instead of the private network
Supamap
SupamapOPβ€’10mo ago
I dont think this is it, since this is the frontend service and it does not connect directly to our mongo database The backend service does
Brody
Brodyβ€’10mo ago
exactly, does your backend connect to the mongo database via the public network?
Supamap
SupamapOPβ€’10mo ago
And the backend service is not having egress costs The frontend does
Brody
Brodyβ€’10mo ago
but the database can have egress costs
Supamap
SupamapOPβ€’10mo ago
No description
Supamap
SupamapOPβ€’10mo ago
neither the database nor the backend has any egress costs
Brody
Brodyβ€’10mo ago
there's definitely egress on the database and backend, but nothing to worry about
Supamap
SupamapOPβ€’10mo ago
this is to date, the estimated monthly goes to like 80USD
Brody
Brodyβ€’10mo ago
what kind of frontend?
Supamap
SupamapOPβ€’10mo ago
yep exactly, this is why the one of the frontend worries me um, its a npm web service i thought maybe images, but most of the content is coming from another hosted service and images load from there
Brody
Brodyβ€’10mo ago
tech stack?
Supamap
SupamapOPβ€’10mo ago
I mean, im using react and git, then some other services like sentry.io Im sorry if im not too much of an expert on this
Brody
Brodyβ€’10mo ago
client side rendered app?
Supamap
SupamapOPβ€’10mo ago
yes it should be im using hygraph for storing the images, so stuff like that should not be touching railway and files should be going to AWS S3, not through railway either
Brody
Brodyβ€’10mo ago
does that mean you're returning a signed url?
Supamap
SupamapOPβ€’10mo ago
um, for uploading a file, yes
Brody
Brodyβ€’10mo ago
well I'm not seeing anything that could stand out as causing excess egress, that means it just comes down to, that's what your app has used
Supamap
SupamapOPβ€’10mo ago
hmmmm, weird Any ideas how I could track how is that egress being used ?? In any case thanks for your help Brody, but i'd love to find a way to at least try to figure stuff out, because right now I just have that egress number to work with, no clue how to know where its coming from
Brody
Brodyβ€’10mo ago
put cloudflare in front of your app would be my go to
Supamap
SupamapOPβ€’10mo ago
??
Brody
Brodyβ€’10mo ago
what's the question marks for
Supamap
SupamapOPβ€’10mo ago
Im not sure what you mean by that πŸ˜… Isn't cloudflare like a separate hosting service? Im sorry, as I said im not that much of an expert
Brody
Brodyβ€’10mo ago
cloudflare offers a proxy that you could setup to cache or even block requests
Want results from more Discord servers?
Add your server