Can I stop server or db machines?
I ran default configuration for fly.io setup. My website is working with out any problem. However even with lowered memory settings, (256 MB mimunum for each app) fly.io cost a lot of money. It won't be free with 3 different default machines as below:
I know that wasp creates client db, and server, but it cost more than 5 dollar which is the minumum money fly.io free version.
Can I close server or db with out any problem? Or what is the suggested method in here?
6 Replies
Hi @skyblade2954. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Wasp indeed creates a client, server, and database for your application. However, shutting down either the server or the database might cause your application to stop working correctly, as both are essential components of a full-stack application.
If you're looking to reduce costs, you might want to consider optimizing your usage or exploring other deployment providers. Wasp supports manual deployment to different providers such as Fly.io, Netlify, Railway, and Heroku. Each of these providers may have different pricing models that could potentially be more cost-effective for your use case.
Remember, before making any changes, ensure you understand the implications and have a backup of your data to prevent any loss.
Sources:
- Deploying Manually (https://wasp-lang.dev/docs/advanced/deployment/manually#different-providers)
- Fly.io Deployment (https://wasp-lang.dev/docs/advanced/deployment/manually#flyio-server-and-database)
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @skyblade2954, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
Let me check the knowledge base for you. One moment! :books:
----------------------
Fly.io does offer a free tier, but it has certain limitations. According to the information provided, Fly.io provides free allowances for up to 3 VMs. However, all plans require you to add your credit card information before you can proceed. If you don't, the deployment will fail.
It's also worth noting that Fly.io offers $5 free credit each month. However, depending on your usage, you might exceed the free tier limits, which would then incur costs.
If you're finding that your usage is costing more than expected, it might be worth reviewing your application's resource usage and scaling needs. You might be able to optimize your application to fit within the free tier limits.
Source: Fly.io Deployment (https://wasp-lang.dev/docs/advanced/deployment/cli)
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @skyblade2954, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
Just closing them wouldn't be great as your app needs client + server + db.
HOwever, you currently have 2 machines for client and 2 for server -> Fly gives you that to ensure redundancy and that at least one machine is working while doing updates. So you really have 5 machines. If you are running a simpler app that doesn't need that kind of guarantees, you can take that down to 1 and 1, so it will be 3 machines in total. Additionally, you can allow Fly to turn off the machines when they are not used (I believe that falls under autoscaling) -> keep in mind however that in that case it might take a bit for a client to spin up when not used for some time + if you are using wasp
jobs
which should run at some scheduled time they migt not be able to run if server is sleeping at that moment due to nobody using it. But if you are ok with that, then you can also go for that, it should save money.@martinsos hello, I believe my machines are autoscaling. Check my client app, it is closed.
When I refresh page, or enter my page, client app becames active.
"HOwever, you currently have 2 machines for client and 2 for server -> Fly gives you that to ensure redundancy and that at least one machine is working while doing updates. "
How did you saw that I have 5 apps? Where can I see that? How can I modify it?
On the image you shared, look at the right -> it says 2 machines, 2 machines, 1 machine.
As for how to do those -> I don't know it by heart I am afraid, but remember it was doable, you should check their docs! I would guess you can possibly update that directly in the dashboard, or if not, then through CLI commands (or toml file?) I think I remember I did it via CLI commands, I tried searching in my terminal history but failed to find them. Not sure hm!
@martinsos Do you think it will decrease the price?
Are you sure?
Nope, not sure, I haven't checked the impact on price myself, and I can't remeber now exactly how they price it hm. But it is more or less the only thing you can do on Fly.
Another option might be hosting client somewhere on static hosting like Netlify that is for free, so you host only server and database on Fly or Railway, that will reduce costs somewhat.