Neoncube
MediaTECH
Handling live-events traffic with AWS infrastructure
Published on 13/09/2024

Faced with the growing needs of our customers, I was faced with a challenge: how do we provide reliable support for live-events traffic, where every millisecond matters? Traditional approaches are not enough in this case - we needed a solution that could not only cope with dynamic workloads, but also be flexible and cost-effective. The answer to these requirements is the AWS infrastructure, and in particular AWS Lambda.

This tool, with its auto-scaling capability and serverless architecture, seemed ideal for the task. However, it was not without its challenges. This is the story of how we combined technology with our experience to create a solution that works reliably even under the most demanding conditions.

When every second counts...

Handling live-events traffic is one of the most demanding tasks, especially in the Mediatech industry, where every second of delay can affect the quality of the user experience. When data has to be processed in real time, numerous challenges arise.

Closed
live-events traffic handling
M
Mediamax10 days ago

Prerequisites

✅ We are preparing for a live broadcast, which will bring increased traffic to the platform. We are planning an additional advertising campaign to redirect users to the site at a specific time.

✅ The traffic could reach up to one million users, which has not been the case so far.

Description of the problem

We need to prepare a system to handle live-events traffic. We want both a scalable and cost-effective solution. Do you have experience with such solutions?

R
Ryan10 days ago

It all depends on what type of system the tool has to handle. Is it a more complex system? You also need to analyse the limits and restrictions.

S
Skyc10 days ago

AWS Fargate, EC2, ELB, AWS Lambda - one of these solutions will definitely work

M
Mediamax9 days ago

We want to handle live-events traffic through an infrastructure that will scale automatically - minimising manual operations. We only want to pay for the resources we use - traffic will record peaks.

Neoncube9 days ago

We carried out a similar project and used the AWS Lambda solution.

AWS Lambda only runs on a specific event (e.g. http request), if the system has no traffic e.g. 0 active users then no Lambda is run. You pay for what you use i.e. CPU/memory allocated and execution time. Are you working on a cloud infrastructure?

M
Mediamax9 days ago

Yes, we are also keen on easy integration and adaptation to an event-driven architecture.

Neoncube9 days ago

We used this tool in the cloud. AWS Lambda is a serverless solution, so the added problems of devops fall away.

The key questions we need to ask ourselves are: how do we ensure scalability so that the system can automatically adapt to changing loads? How do we guarantee reliability in processing thousands and sometimes millions of events per second?

Any delay or system downtime can lead to a loss of user engagement and real financial losses. In addition, managing an infrastructure that has to react dynamically to changing conditions poses enormous challenges for system architects.

The need to monitor and optimise resources in real time, while ensuring that the system is cost-effective, requires not only advanced technology, but also knowledge and experience.

It is in these situations that the need arises for solutions that not only cope with such requirements, but also facilitate the management of the entire infrastructure.

Will AWS Lambda help support live-events traffic?

As part of a serverless infrastructure, AWS Lambda offers a range of capabilities that can significantly support live-events traffic. Through automatic scaling, Lambda is able to dynamically adapt to changing workloads - running functions in response to specific events such as HTTP requests, database changes or data streams.

This flexibility makes Lambda ideally suited to environments where traffic is difficult to predict and resource requirements can change dramatically at short notice.

One of the key elements to consider when using AWS Lambda to handle live-events traffic is concurrency limits. This solution allows you to set up reserved concurrency, which ensures that a certain number of functions can run concurrently regardless of other restrictions in the AWS region.

This allows us to ensure that key operations can always execute, even in the event of a traffic surge. This is particularly important in the context of handling live-events traffic, where every millisecond of delay can make a difference.

On the other hand, AWS Lambda also introduces limits that can affect system performance. The maximum execution time for a single function is 15 minutes, which can be a limitation for more complex operations.

In addition, there are limits on the amount of memory (maximum 10 GB) and the size of the temporary disk (512 MB), which means that we need to plan and optimise our functions carefully to avoid unforeseen problems.

AWS Lambda can be a powerful tool for handling live-events traffic, but it requires conscious planning and an understanding of its limitations.

The role of scalability in handling live-events traffic

Scalability is a key factor in the success of a system that supports live-events traffic. AWS Lambda enables functions to scale automatically in response to demand. This means that the number of concurrently running feature instances can grow with the system load, without the need for manual intervention or advance infrastructure planning.

In practice, this means that AWS Lambda can handle thousands of concurrent calls in real time, which is invaluable in the context of live-events handling, where a sudden spike in traffic can occur at any time. AWS Lambda's scalability is based on two main mechanisms:

  • Automatic scaling in response to events - AWS Lambda automatically launches new function instances when there is a new event to handle. In this way, whether the system is processing a few or several thousand events per second, AWS Lambda adapts to the current needs.
  • Reserved concurrency - AWS Lambda allows you to set up reserved concurrency for critical functions. This is a mechanism that ensures that critical functions are able to run even when there is a significant increase in traffic in other parts of the system, which is extremely important to ensure uninterrupted live-events handling.

In addition, AWS Lambda offers tools for monitoring and managing scalability, such as Amazon CloudWatch. It allows you to keep track of performance metrics such as function execution time, number of concurrently running instances or latency.

Is AWS Lambda the best solution for handling live-events traffic?

AWS Lambda is undoubtedly a powerful tool for handling live-events traffic. However, other solutions such as: Elastic Load Balancer (ELB), AWS Fargate or traditional EC2 instances. Each of these solutions has its own unique features that can better address specific project requirements.

M
Mediamax9 days ago

How does AWS Lambda compare to the other solutions you mentioned?

Neoncube8 days ago

AWS Lambda is an excellent choice for handling live-events traffic - especially those that require automatic scaling and minimal infrastructure management.

AWS Fargate may be better for longer running container processes, ELB for load balancing and EC2 for full control of the environment.

It all depends on the detailed requirements of the system, including scalability needs, infrastructure management and the specifics of the events being handled.

M
Mediamax8 days ago

Thank you. I will take advantage!

  • AWS Lambda is distinguished by its serverless model and automatic scaling. Resources are only used when they are needed and unused functions do not generate costs. Automatic scaling allows the solution to handle sudden increases in traffic without the need for manual infrastructure management. However, the solution does have some limitations, such as a maximum function execution time (15 minutes) and concurrency limits.
  • Elastic Load Balancer (ELB) offers excellent scaling capabilities, but in the context of distributing traffic between multiple EC2 instances or containers. ELB automatically adapts to changing traffic. It is a good solution for applications that need to maintain stable performance in the face of fluctuating loads. However, ELB requires infrastructure management, which can increase operational complexity.
  • AWS Fargate is a serverless solution for containers that automatically scales resources as needed. It allows you to run more complex containerised applications that require flexibility and scalability. It requires slightly more control over the runtime environment than AWS Lambda offers.
  • Traditional EC2 instances offer the greatest flexibility as they can be freely configured and scaled based on application requirements. Scaling can be managed manually or automatically using autoscaling. EC2 is suitable for complex applications that require a permanently available environment, but involves maintaining and managing a server infrastructure.

Completed: AWS Lambda to handle live-events traffic

AWS Lambda offers many benefits, but its effective use requires thoughtful architecture and in-depth technical knowledge. Properly applied, it can significantly simplify infrastructure management and provide scalability in dynamic environments.

  • Serverless - eliminates the need to maintain a server infrastructure and solves the problems associated with managing a DevOps environment
  • Scalability - AWS Lambda only runs functions when needed, meaning there is no need to allocate resources when the system is not processing any events
  • Integrations - AWS Lambda is also seamlessly integrated with other AWS services such as CloudWatch, API Gateway and various metrics, allowing for seamless monitoring and management of applications
  • Payment model - the user only pays for actual resource consumption, which includes CPU, memory and function execution time. This makes Lambda a cost-effective solution, especially in cases where the load is variable
  • AWS Lambda meets the requirements necessary for use in an event-driven architeture.

However, like any tool, it has its limitations, which should be carefully considered before deciding to implement it.

  • AWS Lambda in large projects can present a greater architectural challenge, requiring detailed planning and adaptation of
  • Without an in-depth knowledge of the technicalities involved in Lambda, you may encounter problems related to execution limits and unexpected costs
  • AWS Lambda requires more documentation and monitoring work, which can add complexity to application management
  • AWS Lambda is also not suitable for all solutions, especially those that are not cloud-based
  • The nature of the infrastructure means that it can be more difficult to test compared to more traditional approaches, which can affect the application development process

Why did we choose AWS at Neoncube?

Due to our expertise, experience and area of interest, we decided, when building the company, to choose AWS because it has the largest market share. We are successively developing projects based on AWS and building business relationships by providing paid support. To date, we have not experienced a cardinal problem that would force us to change cloud provider.

If you are looking for a solution to suit your system, talk to us!

Ok, let’s talk business

Contact us and we will schedule a call to discuss your project scope, timeline and pricing.