Score:0

How I can use the CPU usage as load balancing weight?

fr flag

I have the following infrastructure:
enter image description here

Infrastructure is N apps that connect into a master-slave replication schema for Postgresql databases located upon amazon RDS. I use rotated weighted DNS using a private zone in Route53 AWS where I use it to direct the connection to either master or slave for load balancing.

What I want though is a more fine-grained control upon connection via using the CPU usage as load balancing weight. What I want is to direct the database query from my applications towards the database that has the least amount of CPU usage.

I found some solutions:

But I do not know which one suits the best. What I want is to use the CPU usage as a weight where the least amount of CPU usage gets higher priority.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.