I'm not clear on how to calculate the number of nodes needed for my Cloud Spanner instance. How do I ensure that I have the right number of nodes? What factors does it depend on, and how do I verify?
I couldn't find the right docs.
Based on this documentation on Cloud Spanner compute capacity, nodes and processing units:
How do I ensure that I have the right number of nodes? What factors does it depend on, and how do I verify?
This would depend on the size of your database. If your database has a size of 300 GB, you may set the compute capacity to 100 PU as it has a limit of 409.6 GB. In the event that it would increase beyond the limit, you may add another 100 PU or Cloud Spanner may reject writes to the database.
In addition, you could run a representative workload on Spanner with a reduced scale and then extrapolate the nodes required to maintain the desired queries per second (QPS). Recommended any tests on at least 3 node Spanner instances. You could check this documentation on Cloud Spanner performance to provide you some guidance for point read/write workloads.
You may also check this documentation on how to edit an instance for Cloud Spanner if you need to increase your processing units if your database goes beyond the limit.