Professional Cloud Database Engineer free question 9 / 10 · Domain 4: Deploy scalable and highly available databases in Google Cloud
You set max_connections explicitly on the AlloyDB primary. Which condition applies to the same flag on the read pools?
- Add up the values of the read pools so that the total matches the primary
- Divide the value of each read pool by the number of nodes on the primary
- You can set it freely, as long as the value is smaller than the primary
- Set it to the same value as the primary or a larger value
Show the answer and explanation
Answer: D
Why this is correct
The AlloyDB database flags page says that for the flags whose Read pool restrictions column is Yes, you set the flag on each read pool instance before you set it on the primary of the cluster, and that if the flag is set on the primary, the value on the read pool must be the same as or larger than the value on the primary. max_connections has Yes in that column.
Why the other options are wrong
"Add up the values of the read pools so that the total matches the primary" … It is not a constraint that adds up values across several instances. You check the value of each read pool.
"You can set it freely, as long as the value is smaller than the primary" … Even if a read pool has fewer connections, you cannot freely specify a value smaller than the primary.
"Divide the value of each read pool by the number of nodes on the primary" … It is not a parameter that is divided by the number of nodes of the primary.
Key point
This flag needs a restart to change. Also check the order in which you change the primary and the read pools, and the effect on memory of a higher number of connections.