Kimmo Sääskilahti
12/19/2023, 7:36 AMValueState and MapState in our application has TTL set.
Our Flink cluster is under quite heavy load, both CPU usage and I/O to sink occasionally create backpressure. Could that explain why checkpoints are increasing in size? Thanks so much for any insights 🙏Kimmo Sääskilahti
12/19/2023, 7:37 AMYuval Itzchakov
12/19/2023, 7:48 AMKimmo Sääskilahti
12/19/2023, 8:22 AMWe recommend that your application create a snapshot several times a day to restart properly with correct state data. The correct frequency for your snapshots depends on your application's business logic. Taking frequent snapshots allows you to recover more recent data, but increases cost and requires more system resources.1. AWS Managed Flink uses RocksDB. We have state TTL set on all
MapState and ValueState that we have. We're not explicitly running compaction, I believe all that should be handled by the managed Flink service
2. It is possible, but we have double-checked all state has TTL set. Also, the savepoint size seems to be relatively stable. It's only the checkpoints that are increasing in size.Yuval Itzchakov
12/19/2023, 8:26 AMKimmo Sääskilahti
12/19/2023, 8:28 AMYuval Itzchakov
12/19/2023, 8:31 AMKimmo Sääskilahti
12/19/2023, 8:35 AMval ttlConfig =
StateTtlConfig
.newBuilder(Time.hours(24))
.setUpdateType(StateTtlConfig.UpdateType.OnCreateAndWrite)
.build()
Should we add those? I have seen the documentation for those but I'm a little hesitant to add such in Managed Flink, especially since we don't control the state backend 🤔Yuval Itzchakov
12/19/2023, 8:36 AMKimmo Sääskilahti
12/19/2023, 8:45 AM