Change the number of Spanner Nodes
gcloud pubsub topics create $YOUR_TOPIC
gcloud functions deploy HandleSpannerMagnet --runtime go111 --trigger-topic $YOUR_TOPIC
Create a schedule for which you want to change the number of Spanner's Nodes. If you increase at the beginning of the peak time and decrease after the end, you need two Jobs.
{
"projectId" : "hoge",
"instanceId" : "fuga",
"nodeNumber" : 7
}
gcloud beta scheduler jobs create pubsub $JOB --schedule=$SCHEDULE --topic=smagnet --message-body-from-file=example-pubsub-message.json