dracidoupe / graveyard

Open Source reimplementation of https://www.dracidoupe.cz/
https://nove.dracidoupe.cz/
MIT License
6 stars 4 forks source link

Consider migrating MySQL to PostgreSQL #193

Open Almad opened 3 years ago

Almad commented 3 years ago

This requires old version to be shut down.

pgLoader looks like a plausible solution for doing the migration.

I am not convinced there are significant advantages to the migration (besides postgres being better :D), except it would allow me to use the ddcz RDS for other projects as well :)

It is very slightly more expensive ($0.02 vs $0.021). We could also consider Aurora, but with reserved instances, that'd be significantly more expensive ($0.096). But I think we could be up for serverless, which charges $0.07 per ACU Hour and I have no idea how much that would be, some estimates and computations would be needed.

Aurora charges $0.119 per GB-month plus $0.22 per 1 million I/O, vs $0.137 per GB-month and $0.119 per IOPS-month on RDS for SSD, and $0.119 per GB-month $0.11 per 1 million I/O requests on magnetic.

Also note to self: check if Heroku and RDS traffic is considered a traffic within the same AZ or as "to Internet".

1 ACU has approximately 2 GB of memory with corresponding CPU and networking, similar to what is used in Aurora user-provisioned instances.

Almad commented 3 years ago

OK, so currently, minimum available aurora serverless capacity is 2ACU, hence $0.14/h, making it fairly expensive. That said, it can go to sleep on a short notice. It would need traffic research to see if we would be able to have such a significant cache-hit on the frontend that we'd be able to have it off for sufficient amount of time (my thinking is CEST overnight) to make it worth it.

But my guess is no: if we prepay db.t3.micro for a year, we're at $0.013/hr, for 3y $0.009/hr, which would make Aurora 15x more expensive. I don't think there is a traffic scenario for DDCZ where it would work.

image
Almad commented 3 years ago

Also, there is always someone somewhen. Few dozen users, but still.

image