Building a Decoupled Architecture for EdTech SaaS

Discover how we decoupled the application architecture, facilitating further scalability, elasticity, and cost-efficiency of the system.

  • Application Modernization
  • EdTech
  • UK
Decoupling Application for EdTech

Executive Summary

Decoupled Architecture for the Application

Our Customer

LearnCube is a purpose-built SaaS for live online education. The platform provides multiple e-learning solutions for teaching, tutoring & training of all kinds. The main platform features include virtual classrooms, class scheduling, inbuilt payment gateways, eCourses, on-line tests and a management system that streamlines administration.

The Obstacles They Faced

LearnCube came with a functional necessity to re-architect their video processing solution to eliminate bottleneck issues resulting from the usage of a single on-demand cloud compute instance (Amazon EC2) for all the video-converting purposes.

How We Helped

We developed and built the decoupled architecture of the application that facilitates further scalability, elasticity, and cost-efficiency of the system.

The Challenge

High-Cost Bottlenecks in Cloud-Based Video Processing

The key issue of the application’s architecture lies in the way the platform video recording option was designed and built:

  1. During online lessons, that are conducted on the platform, small chunks of streamed videos are stored in S3 buckets in the *.ts format.
  2. Playlists of these chunks are described in *.m3u8 files.
  3. When a lesson ends a dedicated cloud compute instance (Amazon EC2) with installed Agora SDK performs assembling and video converting of *.ts files into *.mp4 format files that are available for end users.

This led to sporadic unpredictable reloading of the compute instance, so we can say that it was a single point of failure of the platform’s architecture.

Since the entire video processing on the platform was ensured by a single EC2 instance, it demanded substantial resources as well as their 24/7 utilization. This constant high workload caused high final costs of the application’s cloud computing resources.

Also, another important client’s requirement was to keep using Agora SDK. It’s real-time engagement platform which provides an ecosystem for embed voice, video, real-time messaging and recording solutions quickly and cost-effectively.

The Solution

Optimizing Video Processing with Decoupled Architecture

To accomplish the abovementioned client’s requirements we suggested building a new decoupled architecture of the application using Amazon Simple Queue Service (SQS) and Amazon Elastic Compute Cloud (EC2).

In general, by using the decoupling we can run separate cloud computing instances for each video processing. When the instance has done the job, we terminate it.

Also, decoupling allows to use Spot Instances – it’s up to 75% cheaper than the On-Demand option. So we managed to achieve significant cloud cost optimization in such a way.

The solution we designed and delivered works in the following way:

1. When an online lesson ends application stores *.txt files with metadata in a corresponding bucket.

2. Then an event is triggered and it sends a message to SQS (Simple Queue Service).

3. EC2 consumption with installed Agora SDK scales based on the amount of messages in SQS and then EC2 processes video converting tasks using file’s metadata from the message.

4. When no new messages appear in the queue, consumption of EC2 is scaled down to zero.

Decoupled architecture for EdTech SaaS – AWS Architecture diagram

Amazon Web Services utilized

Amazon EC2
Elastic Compute Cloud (EC2)
Amazon Simple Storage Service icon
Simple Storage Service (S3)
Amazon SQS icon
Simple Queue Service (SQS)

The Results

Cost-Effective Cloud Scalability and Application Performance

The implementation of the decoupled architecture allows to achieve excellent scalability of the application and the performance of video processing tasks. From now on, video processing on the platform runs in parallel (using the needed amount of cloud compute instances for fast processing) so end users are able to get their recordings within the forecasted time period.

What these improvements mean to the client’s business:

  • Higher customer satisfaction and lower churn rate due to improved user experience
  • Reduction of cost spent on the utilized cloud compute resources for the same workflow and capacity.

Why Romexsoft

Partner With Us to Build Modern Application

Romexsoft is an AWS-certified Consulting Partner, trusted Software Development Company and Managed Service Provider, founded in 2004. We help customer-centric companies build, run, and optimize their cloud systems on AWS with creative, elegant, and cost-efficient solutions.

Our key values

  • Delivery of quality solutions
  • Customer satisfaction
  • Long-term partnership

We have successfully delivered 100+ projects and have a proven track record in FinTech, HealthCare, AdTech, and Media industries.

Romexsoft possesses a 5-star rating on Clutch due to its strong expertise, responsiveness, and commitment. 60% of our clients have been working with us for over 4 years.

Decoupling Architecture for the App FAQ

What does "decoupling AWS" mean in the context of application architecture?

Decoupling AWS refers to the process of separating different components of an application's architecture to ensure they operate independently. In the case of LearnCube, the decoupling was essential to address bottleneck issues they faced due to the usage of a single on-demand cloud compute instance (Amazon EC2) for all video-converting purposes. By decoupling, they were able to achieve scalability, elasticity, and cost-efficiency in their system.

How does "application decoupling" enhance the performance and cost-efficiency of a system?

Application decoupling allows different parts of an application to function independently, reducing dependencies and potential bottlenecks. In the case study, by using application decoupling, separate cloud computing instances were run for each video processing task. This not only optimized performance but also allowed the use of Spot Instances, which are up to 75% cheaper than the On-Demand option. As a result, significant cost optimization was achieved without compromising on performance.

Why is "decoupling applications" crucial for platforms that rely heavily on video processing like EdTech SaaS platforms?

Decoupling applications is vital for platforms with heavy video processing because it ensures that the video processing tasks are distributed and not reliant on a single point of failure. The entire video processing on the platform was initially ensured by a single EC2 instance, leading to high costs and potential system failures. By decoupling, video processing tasks could run in parallel, ensuring timely delivery to end users and optimizing costs.

How does AWS decoupling utilize services like Amazon Simple Queue Service (SQS) and Amazon Elastic Compute Cloud (EC2)?

AWS decoupling leverages Amazon SQS and EC2 to optimize and streamline various tasks. When a specific event or trigger occurs, it sends a message to SQS. EC2 instances, equipped with the necessary tools or SDKs, then scale based on the number of messages in SQS to process these tasks. This approach ensures efficient resource utilization, allowing for dynamic scaling based on demand, leading to cost optimization and enhanced performance.

Related Success Stories

Database Migration to AWS Aurora for EdTech SaaS
Unveil how we led the database migration to Amazon Aurora, resulting in a reliable, scalable, and resource-efficient system.
  • AWS Migration
  • EdTech
  • UK
Implementation of Multi-Tenant Architecture on AWS
Unveil how we transformed the client's application by implementing a multi-tenant architecture, thereby enhancing the app's scalability, security, and deployment.
  • Application Modernization
  • BioTech
  • USA

Craft Your Vision – Make the First Step.
Book a Consultation With Our Experts.