Google Cloud BigTable connection setup time

308 views Asked by At

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?

1

There are 1 answers

0
Max On

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.