2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Memorystore for Redisのフェールオーバー時間を調べた

Posted at

Memorystore for Redisのフェールオーバー時間を調べた

結果

30秒程度かかる

回目 秒数
1 33
49
3 32
4 16
5 25
6 49
7 35
8 34
9 34
10 32

測定方法

外部のGCEから毎秒pingを飛ばしてpingが通らない期間を疎通不可とする。

#!/bin/bash

for i in {1..10000}
do
	result=`redis-cli --no-auth-warning -h 10.128.0.4 -a AUTH文字列 ping`
	echo "`date` ${result}" >> result.txt
	sleep 1
done

Memorystoreのフェールオーバーは以下のコマンド
gcloud redis instances failover sakon-test --data-protection-mode=force-data-loss --region=asia-northeast1

フェールオーバーを実行したら以下のようになる。

Sat May 22 03:33:53 UTC 2021 PONG
Sat May 22 03:33:54 UTC 2021 PONG
Sat May 22 03:33:55 UTC 2021 PONG
Sat May 22 03:33:56 UTC 2021 PONG
Sat May 22 03:33:57 UTC 2021 PONG ← このあとから
Sat May 22 03:34:14 UTC 2021 PONG ← 一回返ってきたけどノーカンにする
Sat May 22 03:34:30 UTC 2021 PONG ← ここまで疎通できてないとする
Sat May 22 03:34:31 UTC 2021 PONG
Sat May 22 03:34:32 UTC 2021 PONG
Sat May 22 03:34:33 UTC 2021 PONG
Sat May 22 03:34:34 UTC 2021 PONG
Sat May 22 03:34:35 UTC 2021 PONG
2
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?