The audio transcoding server implementation is now feature complete: it exposes an HTTP API to encode MP3 files to FLAC, and the resulting file is uploaded on an S3 database. However, there are still several things which are needed to improve it. This part focuses on improvements to the performance of the server. Let's start with a quick analysis of the current performances of the server. The following shell script executes ten instances of curl to transcode ten files in parallel. In other words, it simulates ten simultaneous encoding requests:
#! /bin/sh
transcode_url="http://localhost:8080/api/transcode/v1/flac"
date
echo "encoding file 0"
curl -X POST --data-binary @banjo0.mp3 $transcode_url/banjo0 &
echo "encoding file 1"
curl -X POST --data-binary @banjo1.mp3 $transcode_url/banjo1 &
echo...