Building a Decoupled Architecture for EdTech SaaS

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

  • Application Modernization
  • EdTech
  • UK
Building a Decoupled Architecture for EdTech SaaS

Our Customer

Virtual Classroom Platform

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 Challenge

Architectural Flaws in Building Scalable Video Recording

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.

As all video processing tasks depended on a single instance, this led to sporadic unpredictable reloading of the compute instance. making it a single point of failure of the platform’s architecture.

In addition, because the same instance handled all processing continuously, it demanded substantial resources as well as their 24/7 utilization. And constant high workload significantly increased cloud computing costs.

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 on AWS for EdTech SaaS

Decoupled architecture on AWS

Implemented AWS Services
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 delivers excellent scalability of the application and improves the performance of video processing tasks. From now on, video processing on the platform runs in parallel (using the required number of cloud compute instances for fast processing) so end users are able to get their recordings within the expected time frame.

What these improvements mean to the client’s business:

  • Higher customer satisfaction and lower churn rate due to improved user experience
  • Reduced cloud compute costs for the same workflow and capacity.

Why Romexsoft

Modernize Software with Decoupled Architecture

As an AWS managed services provider with proven experience in the education technology market, we specialize in building scalable, reliable, and cost-efficient EdTech solutions, especially using decoupled architecture. This approach ensures possible fault isolation, more efficient resource usage, and easier maintenance of your software over time.

We drive flexibility and agility for your SaaS through decoupled architecture, delivering:

  • Well-thought-out software architecture with no high-cost bottlenecks
  • Improved infrastructure scalability with independently scaling services
  • Reduced compute costs of your app by up to 75%
  • Minimum system downtime during application modernization.

Decoupling Architecture on AWS FAQ

When should I not decouple my architecture on AWS?

Avoid decoupling if:

- Your product is small or in an early stage and handled by one team.
- You rely on strict ACID transactions or real-time data consistency.
- Latency must stay extremely low and network hops would slow performance.
- Your workloads are predictable and adding queues or event systems adds cost.
- Your team lacks mature DevOps, observability, or IaC practices.
- Compliance or audit complexity would rise with more services.

Can I gradually transition to a decoupled architecture on AWS?

Yes. You can transition gradually to a decoupled architecture on AWS. Start by stabilizing your monolith using IaC, monitoring, and clear module boundaries. Then, decouple one part at a time: begin with low-risk components like notifications or reporting. Introduce event-driven elements (SQS, SNS, or EventBridge) only when needed, verify stability and cost, then move to the next service.

If I want to modernize our legacy system without rewriting everything, what’s a safe first step?

A safe first step is to add a strangler façade in front of the legacy app (use an ALB or API Gateway) and add observability with CloudWatch logs/metrics and X-Ray to capture a performance baseline. Set up a simple CI/CD pipeline and smoke tests without changing features. Once stable, carve out a single low-risk, read-only capability (for example, notifications or reporting) as a separate service, route a small percentage of traffic to it through the façade, and keep instant rollback ready. This gives you control, visibility, and reversible cutovers without a rewrite.

How to isolate student data using a decoupled architecture?

Student data can be isolated in a decoupled architecture by separating the platform into independent services with their own data stores and controlled API access. Sensitive records stay within dedicated services, and each request is validated with tenant and user context to prevent cross-tenant visibility. Data is encrypted, permissions are tightly scoped, and workloads like video processing run in separate pipelines with tenant-scoped storage.

Related Success Stories

Unveil how we transformed the application with a AWS-based multi-tenant architecture, thereby enhancing its scalability, security, and deployment.
  • Application Modernization
  • BioTech
  • USA
Redesigning web application architecture and implementing advanced features for managing 100k daily users.
  • Cloud Development
  • Media
  • Ukraine

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

    Contact Romexsoft
    Get in touch with AWS certified experts!