You should implement it by using the load balancer, and first try to save all documents data in database and then in next step create docx in new queue so that all errors can be logged and after that implement the load balancer