Reputation: 79
When my application interacts with IO (database, third API,...), I'm using Async as a recommendation of Flink: https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/asyncio.html. But my application usually interacts with DB, should I always use async?
I have many questions:
Upvotes: 0
Views: 1509
Reputation: 43524
Using asynchronous i/o is better for these reasons:
Yes, you can make synchronous i/o work by increasing the parallelism. But that's throwing resources at a problem that has a better solution.
As for the Mailbox problem, I believe this can only occur if the job is shutting down. I think this is a side effect of some other problem that has caused the job to fail. Maybe look around in the logs for other indications of what's going on.
Upvotes: 2