parallelism.default
configuration, ingress topic partition counts together with message partition keys. What is the design intentions behind this topic.As the docs suggest, one of the benefits of flink statefun remote functions is that the remote function can scale differently with the flink workers and task parallelism. To understand more about how these messages are sent to the remote function processes. I have tried following scenarios.
Preparation
...
functions = StatefulFunctions()
@functions.bind(typename="example/hello")
async def hello(context: Context, message: Message):
arg = message.raw_value().decode('utf-8')
hostname = os.getenv('HOSTNAME')
for _ in range(10):
print(f"{datetime.utcnow()} {hostname}: Hello from {context.address.id}: you wrote {arg}!", flush=True)
time.sleep(1)
...
parallelism.default
in the flink.conf, replicas count in the functions deployment configuration as well different partitioning configurations in the ingress topic: names
Observations
My Expectations
Can some Flink expert help me understand the above behavior and design intentions more?
There are two things happening here...
Usually in Statefun you'd scale up processing by having more parallel functions, versus scaling up the number of task managers that are running.