My RDS Postgres has 5 read replica and it's the maximum number of read replica and cannot scale out by increasing read replica. In this situation, some of the read replicas occur too much high CPU utilization.
I think one of the solution against it is query tunining. But we cannot login RDS postgres with ssh connect, so to read Postgres Error log we need to download and analyze it. This way is too inefficient and very depend on who do this analysis work.
So I want to build up the system of slow query analysis in RDS PostgreSQL environment. And I want to hear what sort of approach or what middleware is recommend.
My plan is - Using RDS REST API, download db log file every hour to local storage. ( https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/RESTReference.html ) - Using fluend, build up log analysis system