Case Study on Auto Scaling & Job Scheduling through SQS and ELB

Client Profile and Use Case:

The client is involved in audio mining and speech analytics systems. The audio files are supplied to speech servers in .WAV format and then these files are converted into textual data files and then sent for storage. The client was facing issues with the load balancing and auto scaling solution design, since the audio files were live telephonic conversation between call center agents and customers. These calls might stretch to 2 or 3 hours sometimes due to which the Speech conversion Application was facing a lot of issues in the production environment and an efficient auto scaling and load balancing was needed. Tekzee was required to design a load balancing solution using AWS services and scripting python.

AWS Services Used:

Tekzee used five AWS services to build the required architecture:

  •  Amazon EC2.
  •  Amazon SQS.
  •  Amazon S3.
  • Amazon Dynamo DB & Auto Scaling working together.
  • Python.

Implementation:

Step by step implementation of the solution is as follows:

  •  The audio files are placed in S3 Bucket.
  • A request message is placed in an incoming Amazon SQS queue with a pointer to the file location.
  • The speech server that runs on EC2 instances reads the request message from incoming queue, retrieves the file from AmazonS3 using the pointer, and converts the file into the target format.
  • The converted .json is putted back into Amazon S3 and another response message is placed in an outgoing Amazon SQS queue with a pointer to the converted file.
  • Metadata about these files is indexed into Amazon Dynamo DB for querying.

During this work-flow, a dedicated Auto Scaling instance can constantly monitor the incoming queue. Based on the number of messages in the incoming queue, the Auto Scaling instance dynamically adjusts the number of speech server instances to meet the response time requirements of the customers.