Odoo (We use the version 13) creates peaks of CPU usage which need sometimes 10 times more for a few seconds otherwise it will loop through the DB request and slow down the entire Odoo instance.
A good answer for that issue could be Postgres Aurora from AWS. This kind of DB has serverless instances. Thanks to that we can set the capacity range for your Aurora Serverless v2 instance by specifying the minimum and maximum capacity called ACU. One ACU equal to 0.5 CPU and 1GB of ram and AWS bill only ACU currently used.
But, Aurora Serverless automatically creates scaling rules for thresholds for CPU utilization, connections, and available memory. Odoo tends to take all the connections available. In results, even if the CPU usage is under 50% Aurora will scale up to the max because of the DB connections needed.
Conclusion, we are billed to the max the whole time just because of that DB Connection scale up rule which is wrong. Odoo must take only the necessary DB connection in need then make it free as soon as possible.
Is it possible to set Odoo to only take the minimum DB connection needed in real time ?