Flink异步IO学习记录
国际惯例,先把 官方文档 介绍一波 加入flink每次IO都要去访问数据库,那么数据库读取都是基于磁盘IO,速度肯定很慢,所以这里会成为流处理的一个性能瓶颈. 那么异步IO就是把原来的同步请求异步化,总的耗时被多次IO分摊掉了. Asynchronous interaction with the database means that a single parallel function instance can handle many requests concurrently and receive the responses concurrently. 这里的异步指的是一个并发度为1的函数可以并发地发起多个请求和并发地接收多个应答 那你可能会问,为什么不干脆把函数的parallelism提高呢? parallelism is in some cases possible as well, but usually comes at a very high resource cost: Having many more parallel MapFunction instances means more tasks, threads, Flink-internal network connections, network connections to the database,