Joey Resuento
10/05/2023, 10:50 AMevent1 - data event_time=2023-10-05T07:28:18.985605, latency=6505, flink_received_latency=1184, flink_to_kcl_latency=5321
event2 - data event_time=2023-10-05T07:28:20.046061, latency=5444, flink_received_latency=123, flink_to_kcl_latency=5321
event3 - data event_time=2023-10-05T07:28:21.102405, latency=4388, flink_received_latency=1066, flink_to_kcl_latency=3322
event4 - data event_time=2023-10-05T07:28:22.166583, latency=3324, flink_received_latency=2003, flink_to_kcl_latency=1321
> event_time - is the event time when the kinesis record added via a client script.
> flink_received_latency - is the latency between the flink event time (added via a map operator) and data event.
> flink_to_kcl_latency - is the latency between the flink event time (added via a map operator) and the time it took for it to be sent to sink and read by a kcl app.
> latency - overall latency
We used the enhanced fanout as well but it didn't help with the latency.
Setting the max batch size on the kinesis sink seems to help reduce the latency to around (1.5 - 3 seconds) but this is still not enough in our use case.
A full sample script is in github for your reference - https://github.com/jp6rt/pyflink1-15-kinesis-latency/tree/main/app
I hope someone can provide some insights on this.RootedLabs
10/05/2023, 5:28 PMJoey Resuento
10/06/2023, 6:41 AMRootedLabs
10/06/2023, 7:53 PMRootedLabs
10/06/2023, 7:56 PMJoey Resuento
10/07/2023, 3:31 AM