Take control of your workflow with Encoding.com's powerful and flexible API. You can easily use your pre-existing CMS to assign tactics to resbubmit jobs, retry tasks and reformulate API requests that have less than expected results. Below you'll find a list of workflows that intelligently assign actions to correct solvable workflow issues.
While we strive for 100% uptime and have a 99.8% average uptime, the reality is there are a variety of situations where an individual or small group of encoding jobs could fail or take longer than expected to process. If the video transcoding workflow is critical to your business, there are a number of workflows we suggest to deploy within your API integration. These actions aim to virtually eliminate any downtime related to our availability or that of our dependent cloud providers.
Specifically in the event a predefined set of error messages are received from Encoding.com or an individual job takes longer than expected to process you can flag the job in your system as “pending” instead of failing the job or waiting indefinitely. Automatic cron based resubmission of jobs that are in this pending status can be resubmitted to Encoding.com at a set time interval. When this workflow is deployed the worst case scenario would result in negligibly longer than normal encoding times rather than the need for your team to manually intervene.
Examples of error messages you would receive from the Encoding.com API
1. Timeout Error
2. Encoding.com returns 500, 502, or 503 error
3. Encoding.com returns 421 “Request Rate over limit”
+ Ensure that you have not exceeded your request rate per limit. Upgrade now for a higher request rate limit via our API.
If any of above happened we would recommend not considering that job as failed immediately and attempt a retry. To track status of the job, a local database should include the following fields from submitted jobs:
1. Local ID
2. Source URI/URL
3. Encoding.com Media ID
4. Status (new, processing, success, error)
5. Number of retries
6. Last try date stamp of resubmittal of mediaID
Here is an example of a complete error mitigation workflow with Encoding.com to ensure a solid workflow 100% of the time:
1. Find a job with the status = new and earliest Last Try date
2. Generate and post XML including AddMedia or AddMediaBenchmark request
3. If you received response code 200 you can mark this job as “processing” in your local queue database or CMS.
4. If received response code 421 then your script should wait 1 second (or more, depending of your Plan's available requests per second) and retry post.
5. In case when you received 500, 502, 503 error or in case of connection timeout your script should increment the “retries” field (#5) and update “Last Try” (#6) to current time. We would suggest waiting some time before new attempt and increase that interval with each failed attempt. Also we would recommend limiting number of retries to a reasonable number (e.g. 3) and when a limit was reached, set the error status for the job. When the Encoding.com platform is available again or connectivity between your source media location and our platform was ressolved you will then be able to easily identify all jobs with error status and resend them.
We have worked with a number of our high volume customers to assist in this integration, and we are happy to set up a time to talk with your or your team about getting this level of integrity live in your integration with Encoding.com.