【アップデート】Amazon Timestream for InfluxDB がストレージのスケーリングをサポートしました

【アップデート】Amazon Timestream for InfluxDB がストレージのスケーリングをサポートしました

Clock Icon2025.02.10

先日、AWS が提供する時系列 DB である Amazon Timestream For InfluxDB がストレージのスケーリングとして、次の機能を新たにサポートしました。

  • ストレージタイプの変更
  • ストレージサイズの拡張

https://aws.amazon.com/about-aws/whats-new/2025/01/amazon-timestream-influxdb-storage-scaling/

これまでストレージ容量が足りなくなったときは、大きな容量を持った別のインスタンスを作成して、新しいインスタンスへデータを移行する必要がありました。
今回のアップデートで、データを移行することなく既存の環境で拡張できるできるようになりました。

ストレージ設定を変更してみる

実際に試してみます。事前にインスタンスを作成します。
ストレージに関する各パラメーターは次のとおり最小値で作りました。

01-create-influxdb-instance.png

AWS CLI からは次のコマンドで確認できます。

$ aws timestream-influxdb list-db-instances

出力例です。

{
    "items": [
        {
            "id": "xxxxxxxxxx",
            "name": "test-db",
            "arn": "arn:aws:timestream-influxdb:ap-northeast-1:[YOUR_AWS_ACCOUNT_ID]:db-instance/xxxxxxxxxx",
            "status": "AVAILABLE",
            "endpoint": "xxx-xxx.timestream-influxdb.ap-northeast-1.on.aws",
            "port": 8086,
            "dbInstanceType": "db.influx.medium",
            "dbStorageType": "InfluxIOIncludedT1",
            "allocatedStorage": 20,
            "deploymentType": "SINGLE_AZ"
        }
    ]
}

ストレージに関する出力は次の 2 つです。

  • "dbInstanceType": "db.influx.medium"
  • "dbStorageType": "InfluxIOIncludedT1"

マネジメントコンソールからストレージ設定を変更してみます。

02-modify-db.png

ストレージタイプとストレージサイズをそれぞれ次のように変更しました。

03-modify-storage-settings.png

更新中は、インスタンスの状態が "status": "UPDATING" となります。

{
    "items": [
        {
            "id": "xxxxxxxxxx",
            "name": "test-db",
            "arn": "arn:aws:timestream-influxdb:ap-northeast-1:[YOUR_AWS_ACCOUNT_ID]:db-instance/xxxxxxxxxx",
            "status": "UPDATING",
            "endpoint": "xxx-xxx.timestream-influxdb.ap-northeast-1.on.aws",
            "port": 8086,
            "dbInstanceType": "db.influx.medium",
            "dbStorageType": "InfluxIOIncludedT1",
            "allocatedStorage": 20,
            "deploymentType": "SINGLE_AZ"
        }
    ]
}

5 分程度で "status": "AVAILABLE" となり完了しました。

{
    "items": [
        {
            "id": "xxxxxxxxxx",
            "name": "test-db",
            "arn": "arn:aws:timestream-influxdb:ap-northeast-1:[YOUR_AWS_ACCOUNT_ID]:db-instance/xxxxxxxxxx",
            "status": "AVAILABLE",
            "endpoint": "xxx-xxx.timestream-influxdb.ap-northeast-1.on.aws",
            "port": 8086,
            "dbInstanceType": "db.influx.medium",
            "dbStorageType": "InfluxIOIncludedT2",
            "allocatedStorage": 400,
            "deploymentType": "SINGLE_AZ"
        }
    ]
}

ダウンタイムの発生を確認してみる

前回のアップデートの検証と同様に、今回も変更中のダウンタイムを計測するために、5 秒間隔でデータの書き込みも行って見ました。

すると、連続して 2 回エンドポイントに接続できないエラーが発生しました。
この間にインスタンスの再起動が発生したものと思われます。

Error: failed to write data: Post "https://[HOSTNAME].timestream-influxdb.ap-northeast-1.on.aws:8086/api/v2/write?bucket=test-bucket&org=test-org&precision=s": dial tcp [ENDPOINT_IP_ADDRESS]:8086: connect: connection refused

InfluxDB UI のアクセスも画面をリロードするとログイン画面に戻されました。

公式ドキュメントにもダウンタイムの記載があります。どの変更に対してダウンタイムが発生するか断定的な記載はありませんが、ストレージやインスタンスタイプなどの変更はダウンタイムが発生すると考えていいと思います。

https://docs.aws.amazon.com/timestream/latest/developerguide/timestream-for-influx-managing-modifying-db.html

We recommend you test all changes on a test instance before modifying the production instance to understand their impact, especially when upgrading database versions. Review the impact on your database and applications before updating settings. Some modifications require a DB instance reboot, resulting in downtime.

最後に

待望のストレージ拡張のアップデートがサポートされました。
利用するストレージタイプにより最小容量が固定されるので細やかな指定はできませんが、簡単にストレージを拡張できるようになったので、より運用しやすくなったと思います。

以上です。

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.