Structuring roles for a PHP app with separate FFmpeg worker hosts

Hi everyone, I’m provisioning a PHP video platform with Ansible: web nodes (Nginx + PHP-FPM), a database host, and several FFmpeg transcoding workers. Right now everything lives in one big playbook. Would you split this into one role per service and use group_vars for each host type, or use a collection? Also curious how people handle rolling restarts of PHP-FPM without dropping uploads. Thanks!

IME its always better to use a collection structure, even if everything stays in one project.
Something like this,

playbooks/
roles/
galaxy.yml

Also generally better to break large playbooks into roles that could be re-used, skipped, targeted with tags, etc

Also curious how people handle rolling restarts of PHP-FPM without dropping uploads

I have really never used php, but you should be able to stop the webserver from accepting new connections, wait for all active connections to move to a new host, and then apply your updates. Loadbalancers will typically have settings to do this, but you could also do it with an nginx quit i think