Let's say I have 4 read pools, I see that usage is less during off hours, is it possible to stop/remove 2 read pools and add again during business hours.
Also, does Primary and read pools have same IP?
I mean how to direct traffic to read pools , is there load balancer internally for all read pools/read only nodes?
Currently, AlloyDB does not have an autoscaling feature, and there isn't a direct option to schedule the creation or deletion of read pools (read-only nodes) based on usage. However, you might be able to use Cloud Scheduler and Cloud Functions to automate the process of adding or removing read pools during specific times. This would require using the AlloyDB API or gcloud CLI commands to manage the read pools programmatically.
Important Considerations:
IP Address for Primary and Read Pools: Primary and read pools in AlloyDB do not share the same IP address. Each read pool (or read replica) has its own distinct IP address. This separation allows you to direct traffic specifically to the primary instance or to one of the read pools.
Directing Traffic to Read Pools: Traffic is directed to read pools by using the individual IP addresses of each read pool. AlloyDB does not provide a built-in load balancer specifically for read pools. If you want to distribute read traffic across multiple read pools, you would need to implement a load-balancing mechanism externally. Options include using a proxy like PgBouncer, or configuring your application to distribute read queries among the available read pools. This setup allows you to control how queries are routed, ensuring that reads are directed to the read pools and not the primary instance.