Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cost estimate #13

Open
CharlesFr opened this issue Jan 7, 2024 · 4 comments
Open

Cost estimate #13

CharlesFr opened this issue Jan 7, 2024 · 4 comments
Labels
question Further information is requested

Comments

@CharlesFr
Copy link

CharlesFr commented Jan 7, 2024

Nice template, curious to understand what's the base running cost for this solution?

Do you also foresee any issues adding flower dashboard or running this for high-availability production systems?

@Antvirf Antvirf added the question Further information is requested label Jan 8, 2024
@Antvirf
Copy link
Owner

Antvirf commented Jan 8, 2024

Hey, thanks for opening an issue @CharlesFr !

Cost estimates are a bit difficult with Railway since the services will use minimal CPU when not in use. If you spin up just the base template, having it idle consumes ~zero vCPU, but about 1.3-1.5 GB of RAM, most of which is taken up by Celery. That would amount to about USD 13-15 per month from the latest pricing. If you wanted to optimise it further, it's probably possible to reduce that by decreasing Celery concurrency since by default it uses all available cores.

I've set already configured something like that with Gunicorn as the number of workers is set to 3 in the template to provide a reasonably cheap starting point, though this bit is something you may find a need to increase once you receive more traffic.

For Flower dashboard, I don't think it would be a problem, just add another container/service to deploy. Since it's an admin tool that's probably only used occasionally, I'd recommend configuring app sleeping - that way the cost would probably only be a few cents.

Haven't come across any issues around availability 😄

@CharlesFr
Copy link
Author

CharlesFr commented Jan 8, 2024

Thanks for your response, I am paying about $2k per annum with GKE for a very low demand (but high availability) so this seems like a substantially better deal.

Is the docker-compose you've added actually used by Railway or it's just for dev?

On a minor note, Railway has implemented structured logs - is that something you'll be adding to the template?

@Antvirf
Copy link
Owner

Antvirf commented Jan 9, 2024

The docker-compose is purely for development and trying it out, Railway itself just uses the Dockerfile to build the images and the template itself to choose what/how to deploy.

I've looked at structured logs in Django a couple of times but always rolled back to avoid the extra complexity of more config + more deps. I'm sure at some point I'll get on that train also and then perhaps expand the template :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants
@CharlesFr @Antvirf and others