AWS Lambda Web Functions keep billing memory ~7 minutes after the last request

news

When AWS revealed Lambda Web Functions in October, I was thrilled.

At Easelwe ‘d invested months developing facilities to run web applications effectively on conventional Lambda. Native HTTP servers, concurrent demands, and active CPU billing seemed like precisely what we had actually been looking for.

If Web Functions worked the method we hoped, we might possibly change a significant quantity of our custom-made facilities.

We chose to put them to the test.

A couple of weeks later on, we ‘d chosen to run our own calculate rather. And as it ends up, our own facilities was much faster, too.
The five-minute issue
Our preliminary experiments were appealing. Web Functions dealt with 300 concurrent demands without mistakes, and a brand-new function was serving demands in under 9 seconds.

We rapidly ran into something that didn’t work for us.

Execution environments continued running and accumulating memory charges for 5– 7 minutes after their last demand.

Web Functions expense CPU just while it’s actively utilized, however memory is billed for the whole life time of an execution environment, even when no demands are running.

AWS files this habitsWhat stunned us was for how long those environments stayed alive.

Throughout 6 representative environments, we observed idle durations varying from 313 to 411 seconds. The procedures stayed active throughout, and there was no configurable idle timeout to reduce their life time.

5– 7 minutesof memory billed after the last demand

Last demandIdle, memory billedLower is much better
6 environments after their last finished demand, us-east-1, October 26.
For a 200ms demand followed by 345 seconds of lack of exercise, that’s approximately 1,700 times the demand period in metered memory time

We examined the economics versus CloudWatch and AWS Cost Explorer. Throughout our experiment, memory represented around 88% of the calculated calculate and ask for expenses at released market price, despite the fact that our application just utilized around 160– 210 MB.

The whole experiment totaled up to about 2 cents at market price. Barely worrying on its own.

Easel requires to support thousands of applications with unforeseeable traffic. Some get continual traffic, while others may get just a couple of demands daily. At that scale, the expense of keeping individually metered environments alive starts to matter.

We even attempted ending environments ourselves after 10 seconds of lack of exercise. That minimized metered environment time by approximately 20 ×, however AWS tape-recorded every deliberate exit as a runtime failure.

It wasn’t something we wished to depend on in production.

What if we ran the calculate ourselves?
Instead of embrace Web Functions, we chose to move application execution onto servers we run ourselves, keeping conventional Lambda offered for overflow.

This provides us control over scheduling and resource allowance. We can share capability throughout applications without paying AWS for each idle environment, and scale beyond our own facilities when need needs it.

Easel.sh edge

ServingIdle

Demands get in the Easel.sh edge, which routes them to our own calculate, where numerous apps share one device. Lambda takes just the overflow.

Our very first self-operated calculate host went reside in United States East on November 2, serving applications consisting of Easel’s own site.

Taking ownership of the calculate raised another concern: How would our efficiency compare to AWS?

We released the very same Next.js 16 application to both platforms and ran a series of standards from a customer in Ashburn, Virginia.

The outcomes amazed us.

1.5– 3 ×quicker warm demands on the very same Next.js app

Easel.shAWS Lambda Web FunctionsTypical ms · lower is much better

Server-side rendering2.1 ×

Streaming (very first piece)2.0 ×

Average time to very first byte (very first portion for streaming ), leaving out the TLS handshake. 100 demands per path per platform from Ashburn, Virginia.

Our host provided 1.5– 3 × much faster average warm-request times throughout all 4 work.

The distinction wasn’t restricted to network or routing overhead. Running the exact same 20,000 chained SHA-256 operations took 29.2 ms on our host versus 43.8 ms on Web Functions, about 1.5 × faster.

And cold starts informed a comparable story.

After leaving both applications idle for 12 minutes, we set off fresh execution environments on each platform.

3.5 ×quicker cold starts after 12 minutes idle

Fastest to slowest of 2 trialsLower is much better

Easel.sh: 216– 250 ms

AWS Lambda Web Functions: 810– 854 ms

Demand after 12 minutes idle, sent out to both platforms at the exact same minute. Time to very first byte, leaving out the TLS handshake. 2 paired trials just.

In both trials, Easel began serving demands about 3.5 × faster

We likewise saw an intriguing distinction after a much shorter idle duration. Following one five-minute space, Web Functions had actually currently ended its environment and required 908ms to react. Easel resumed its stopped briefly environment and reacted in simply 14ms.

These are early arise from a single area and a little application, not a thorough efficiency research study. The cold-start contrast has just 2 paired samples, and we have not benchmarked continual throughput.

Still, seeing our own facilities outperform AWS throughout these preliminary work was motivating.
Taking ownership of the facilities
Running our own calculate includes extra obligations. We need to handle capability, deal with failures, and make certain resources are dispersed effectively throughout applications.

It likewise provides us the liberty to enhance the whole execution course, rather than working around the restrictions of another platform.

Web Functions might be an excellent suitable for applications with continual traffic, where idle memory expenses are less considerable. For Easel, the economics of running great deals of independent applications led us in a various instructions.

And our preliminary standards recommend that the choice does not need to come at the cost of efficiency.

We’re handling more facilities intricacy so designers utilizing Easel do not have to.

How we determined
Dates
Standards ran November 11– 12, 2026 (UTC). Idle-memory measurements are from October 26, 2026.
Setup
The exact same Next.js 16 application on Easel’s self-operated United States East host and on AWS Lambda Web Functions in us-east-1.
Customer
One customer in Ashburn, Virginia.
Timing
Time to very first byte, omitting TLS connection setup however consisting of network transit and platform routing.
Samples
About 100 demands per path per platform for warm demands. 2 paired trials for cold starts.
Hardware
The platforms worked on various hardware and resource setups, so these compare releases, not stabilized hardware.
Prices
AWS expenses utilize released sticker price.

Discover more from PMN S.P.O.R.T.S - A PRIME MEDIA NETWORK BRAND

Subscribe to get the latest posts sent to your email.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Captcha verification failed!
CAPTCHA user score failed. Please contact us!

spot_imgspot_imgspot_imgspot_img