| From: | Deepak Goel <deicool(at)gmail(dot)com> |
|---|---|
| To: | Siraj G <tosiraj(dot)g(at)gmail(dot)com> |
| Cc: | Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: DB load balancer |
| Date: | 2025-08-05 05:21:22 |
| Message-ID: | CA+b7NVXqrV8b6O=6OkSNLS97BuD2L1orss_D8hPL2ta_PiMpoQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
Please share what you mean by slow (CPU usage of secondary over time,
response times of the transactions over time).
Deepak
"The greatness of a nation can be judged by the way its animals are treated
- Mahatma Gandhi"
+91 73500 12833
deicool(at)gmail(dot)com
LinkedIn: www.linkedin.com/in/deicool
"Plant a Tree, Go Green"
Make In India : http://www.makeinindia.com/home
On Tue, Aug 5, 2025 at 10:18 AM Siraj G <tosiraj(dot)g(at)gmail(dot)com> wrote:
> Hello Experts!
>
> We have a multi tenant model DB with a Primary and a Secondary. There are
> 3x or 4x connections flowing to Secondary as the application is read
> intensive. Accordingly we have allocated more number of resources to the VM
> hosting the secondary/replica DB.
>
> Spec:-
> Primary: 48 CPUs, 48GB memory
> Secondary: 80 CPUs, 128GB memory
> PG version: 12.22 (we have already started the upgrade process)
> OS: Ubuntu
>
> The problem very frequently we are experiencing is that the CPU load on
> the SECONDARY is going very very high causing the app slowness. Also,
> frequently the postgres is crashing due to OOM.
>
> I was thinking of these (please give feedback):
> 1. Have a DB level balancer for the load balancing in the DB level,
> meaning primary will also receive the READ traffic
> 2. Add a second REPLICA and configure load balancer for the connection
> load balancing
>
> What do we do for load balancing at the DB level, in postgres?
>
> If there are any suggestions, please let me know.
>
> Regards
> Siraj
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Siraj G | 2025-08-05 06:11:53 | Re: DB load balancer |
| Previous Message | Siraj G | 2025-08-05 04:48:15 | DB load balancer |