Low Latency Runtime (LLRT): A New Star in Serverless JavaScript

  • Tue Feb 20 2024
  • Jazim Abbas

In the world of JavaScript, new libraries and frameworks are released almost daily. Now, there's a new runtime appearing every month! This blog post will discuss Amazon's latest offering, Low Latency Runtime (LLRT).

What is LLRT?

LLRT is a lightweight runtime designed specifically for serverless applications. It's meant to address the cold start problem that plagues many serverless functions, making them slow to start up. Amazon claims that LLRT offers up to 10x faster startup times and 2x lower costs compared to other JavaScript runtimes on AWS Lambda.

Why was LLRT created?

Traditional JavaScript runtimes, like Node.js, are not ideal for serverless functions. They are designed for long-running tasks and can take a long time to start up, which can lead to poor performance for serverless applications. LLRT is designed specifically for serverless functions and avoids this problem.

Lets take a look at HTTP benchmarks measured in round trip time for a cold start

LLRT - DynamoDB Put, ARM, 128MB:

Node.js 20 - DynamoDB Put, ARM, 128MB:

Benefits

  • Faster startup times: LLRT can start up in milliseconds, compared to seconds for traditional runtimes.
  • Lower costs: LLRT can save you up to 50% on costs compared to other runtimes.
  • Improved performance: LLRT can improve the performance of your serverless applications.
  • Easier to use: LLRT is designed to be easy to use and integrate with your existing AWS infrastructure.

Limitations

  • Performance Drawbacks of LLRT Compared to JIT-Powered Runtimes:
    • LLRT exhibits notable performance drawbacks in various scenarios, particularly in:
      • Large data processing tasks
      • Monte Carlo simulations
      • Tasks involving hundreds of thousands or millions of iterations
  • Effectiveness of LLRT:
    • LLRT demonstrates its effectiveness in smaller Serverless functions dedicated to specific tasks, including:
      • Data transformation
      • Real-time processing
      • AWS Service integrations
      • Authorization
      • Validation
  • Complementary Nature of LLRT:
    • LLRT is designed to complement existing components rather than serving as a comprehensive replacement for all functionalities.
  • Ease of Transitioning:
    • Transitioning back to alternative solutions from LLRT is facilitated by minimal code adjustments, thanks to its supported APIs based on the Node.js specification.

Who should use LLRT?

LLRT is a good option for anyone who is developing serverless applications on AWS Lambda. It is especially beneficial for applications that are sensitive to startup time and cost.

How to get started with LLRT

LLRT is currently in beta, but you can sign up for the waitlist to try it out. Once you have access, you can use the AWS CLI or SDK to create and deploy your serverless functions using LLRT.

Conclusion

LLRT is a promising new runtime that can help you improve the performance and cost of your serverless applications. If you are developing serverless applications on AWS Lambda, I encourage you to try out LLRT and see if it can benefit you.