mobiusml/aana_sdk

[ENHANCEMENT] Enable Parallel Deployments

Closed this issue · 0 comments

Enhancement Description

The current deployment process for AanaSDK in the AanaSDK.deploy function deploys each Aana Deployment sequentially. This process can be time-consuming as it requires waiting for one deployment to finish before starting the next one. The proposed enhancement is to modify this process to allow simultaneous deployments, thereby increasing efficiency. This parallel deployment approach is already utilized when deploying with serve config files, but it has not yet been implemented for aana deploy.

Advantages

  • Reduced Deployment Time: By deploying multiple instances simultaneously, the total deployment time can be significantly reduced.
  • Improved Efficiency: Parallel deployments can make better use of available resources, leading to more efficient operations.
  • Enhanced User Experience: Faster deployments can lead to quicker updates and less downtime, improving the overall experience for users and developers.

Possible Implementation

  • Concurrency Management: Utilize concurrency libraries such as concurrent.futures in Python to manage and execute multiple deployments in parallel.
  • ServeSubmissionClient: Another possibility is to use ServeSubmissionClient similar to how serve config files are deployed (see serve deploy code).
  • Error Handling and Rollback Mechanism: Ensure robust error handling is in place to manage any failures during the simultaneous deployment process.
  • Testing and Validation: Implement comprehensive testing to validate the functionality and performance of the parallel deployment process before full-scale deployment.