LoginSignup
0
0

More than 1 year has passed since last update.

FirestoreのLocationとDocument取得にかかる時間

Posted at

測定結果

FirestoreのLocation アクセス元 時間(ms)
asia-northeast1 asia-northeast1のCloud Run 10
asia-northeast1 東京にあるノートPC 15
us-central us-central1のCloud Run 21
us-central 東京にあるノートPC 209
  • 測定に使ったDocument
    • パスは"chats/xxx/messages/yyy"
    • フィールドは"body"だけで、値は"message1"
  • 測定方法
    • httpサーバから200回 Document Read
    • 後半100回の時間の平均値を求めた。最初の方のDocument取得は、距離とは別の要因で遅くなる傾向があるので

当たり前だが、地理が離れた東京 - アメリカの通信時間は大分長い。

背景

仕事で携わっているプロダクトが、AWSの東京リージョンで動いているサーバから、us-centralのFirestoreにアクセスする構成となっている。そのせいか、FirestoreへのアクセスがAWS東京リージョンのRDBへのアクセスより遥かに遅くてつらい。

FirestoreのLocationを東京にしたら改善するのかを確認したかった。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0