Open entrotech opened 8 months ago
I moved the DEV database on to the same server as the PROD database. This has some downsides:
REVOKE ALL ON DATABASE foodoasisdev from public;
REVOKE ALL ON DATABASE foodoasisprod from public;
CREATE USER devuser with encrypted password '
CREATE USER produser with encrypted password '
This was very difficult to figure out and likely to cause confusion for anyone attempting to maintain the databases in the future.
2. Backups are performed at an instance level, so both databases are backed up to a single backup file. If it proves necessary to restored from backup, we don't have the option of restoring one of the databases easily. Instead, you would need to restore both to a new temporary instance, create a snapshot of the one you want to restore, restore that to the permanent instance and then delete the temporary instance. Not a big deal.
3. Performance of either database can be affected by the other, since they are no longer on isolated instances (separate virtual machines), so share memory and CPU resources.
Also, I upgraded the Postgres version of both databases from 11.22 to 15.5 (required since support for ver 11.22 is being retired), and changed the database instance from a db.t2.small (which does not support Postgres versions newer than 12.*) to db.4g.small), which is slightly less expensive at $0.034 / hr vs the t2.small instance price of $0.036. After the partial month of Feb 2024, the monthly charges should be less than $39/mo.
Overview
We need to investigate ways to reduce the recurring monthly expenses for the Food Oasis project, since it currently about $120/mo, and absorbed by personal in-kind contributions from Bonnie Wolfe and John Darragh.
Action Items
AWS database charges are the largest cost. Some ways to reduce costs are:
@Bonnie pointed out that we could split the client application into two separate React apps for the Food Seekers and Volunteers, respectively. There are a few good reasons to consider this, one of which is to reduce the load on the database, allowing us to use a smaller database instance. We should at least make the changes 1 and 2 mentioned above, bringing our total AWS costs down to about $26 / month, so splitting the app might save us as much as $13 /month.
Resources/Instructions
Monthly AWS cost: ($83/mo)
The database cost further breaks down by instance and storage charge (December shown here)
Heroku ($14 /mo)
SendGrid ($20/mo) billing_invoices_8a1287778c190525018c26923be75ec4.pdf