Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud BigTable connection setup time

I'm testing out some BigTable queries on a 3-node cluster using the Go client, like:

r, err = tbl.ReadRow(ctx, "key1")

I'm getting results back within a few ms:

query 1: 129.748451ms
query 2: 3.256158ms
query 3: 2.474257ms
query 4: 2.814601ms
query 5: 2.850737ms

As you can see there's a significant setup connection delay on the first query. Can anyone provide feedback whether this would be an acceptable value? The queries originate from a GCE VM in the same zone (europe-west1-c) as the BigTable cluster.

Furthermore, is there any support planned to pool the BigTable connections when running on App Engine?

like image 551
Mathias Verhoeven Avatar asked Jun 17 '26 14:06

Mathias Verhoeven


1 Answers

Bigtable Connections in Go are initialized asynchronously from when bigtable.NewClient() is called.

Connections are expensive objects that have significant initialization time.

The first ReadRow() call will block on waiting for that connection to finish set up. If you were to wait some amount of time between making the NewClient() call and the first ReadRow() you should not see higher latency in the first read.

like image 183
Max Avatar answered Jun 20 '26 04:06

Max