HI Team, We are using rocksDBStateBackend in flink...
# troubleshooting
n
HI Team, We are using rocksDBStateBackend in flink to store states, but we have high local disk usage, being consumed by states and as per flink documentation at https://flink.apache.org/2021/01/18/using-rocksdb-state-backend-in-apache-flink-when-and-how/#state-location-in-rocksdb
Copy code
It's discouraged to configure it to a remote network-based location like NFS or HDFS, as writing to remote disks is usually slower.
We were going to use s3 as dbStoragePath, but is it anti pattern? If yes, then what kind of storage we can use if in case of local disk overflow with given task manager memory, which is very likely in my case. It would be really helpful if anyone have any suggestion on this?
g
State management is probably one of the trickiest part around stream processing and there are many things to consider, like the number of parallelism/tasks writing state, if the downstream system causes backpressure etc. For the most part the best disk for Flink would be local NVMe SSD. (You could consider EBS for example, but since you have heavy disk usage it might down grade the performance). When dealing with checkpoints there are many optimizations you can consider i.e switching between aligned and unaligned checkpoints, use buffer debloating to control the size of inflight data that need to be snapshotted, incremental checkpoints to minimize the size of state that needs to be stored. Also flink supports now a changelog state backend that can improve and stabilize the performance, This might be a good read for more context: https://www.ververica.com/blog/generic-log-based-incremental-checkpoint
πŸ‘ 1