Say your loan portal has modules for applications, uploads, and notifications. Applicants use it mostly during the day. At night, the document module spends hours generating previews for large files.
I'd check what the API is doing during those runs. If requests are waiting on image conversions, put conversions on a queue and run them in workers with their own process and resource budget. The upload API can return an ID and a status of processing . One team can still deploy the API and workers from the same repository.
When I'd split document processing
The preview job can take minutes, so it already runs outside the application's request path. I'd consider a separate service if the document team needs to release changes to scanning or conversion on its own schedule and the rest of the portal can keep working during those releases.
Decide who owns each piece of data before making that split. The application can keep track of which document IDs belong to a loan application.…