Updating software on cluster nodes without dropping traffic on those nodes

Hi Ansible Gurus,
I need some suggestions for performing online opeations on a cluster.

Problem : I have a 5 nodes cluster set up by Ansible . All nodes of cluster carrying some network traffic.
Now I want to update application software on each node , so that no traffic is dropped.
If I update all 5 nodes software , exiting on going traffic on those nodes will be dropped.

So i thought of updating node wise node using --limit option in ansible CLI. So that during update operation, some nodes active enough (means no update going on those at that time) to handle upcoming traffic.
This apporach is updating nodes in cluster sequenctially node wise node so that traffic is not dropped.

is there any better way of doing so with Ansible ?

Regards
Rahul

Maybe you can check about serial
https://docs.ansible.com/ansible/latest/user_guide/playbooks_delegation.html#rolling-update-batch-size

Thanks Chiku , How it is different from --limit option (which limits no. of nodes and decides on which play should be invoked) invoked from ansible command line ?
And which is the best practice recommended ?

Regards
Rahul

As far as I understand “limits” actually executes the tasks only to that ansible host(s), whereas “serial” defines the concurrent hosts the tasks runs against. => serial doesn’t limit the affected hosts overall, only the timely manner.

It means, serial will guarantee that task will be executed on all hosts at the end ( may be some host first , then other etc ) provided no host fails .

exactly.