Technolila Webtools
5 views

Computed Truth

Doubling your serverless memory (e.g., 128MB to 256MB) doubles the cost per second, but often halves the execution time. For CPU-bound tasks, this results in **zero net cost increase** with 2x performance gains. Always benchmark your function; paying for 1024MB might actually be cheaper than 128MB if it runs 10x faster.

Serverless Execution Cost Estimator

Calculate Monthly Bill

Comparing AWS Lambda vs Google Cloud Functions vs Azure Functions
Total invocations per month

The Technical Proof

Serverless billing is derived from GB-seconds:

$$ GB_{sec} = Requests \times \frac{Duration_{ms}}{1000} \times \frac{Memory_{MB}}{1024} $$

$$ Cost = (GB_{sec} - FreeTier) \times Price_{per\_GB\_sec} + (Requests - FreeRequests) \times Price_{per\_req} $$

  • AWS/GCP Free Tier: 400,000 GB-seconds per month.
  • Azure Free Tier: 400,000 GB-seconds per month.
  • Request costs are typically $0.20 per million, often negligible compared to compute time.

Step-by-Step Logic

  1. Normalize Units: Convert Memory to GB (e.g., 512MB = 0.5GB) and Duration to Seconds.
  2. Calculate Volume: Multiply by total monthly requests to get total Compute Seconds.
  3. Calculate Capacity: Multiply Compute Seconds by Memory (GB) to get GB-seconds.
  4. Apply pricing: Subtract Free Tier (if enabled) and multiply by provider execution rates. Add request fees ($0.20/1M).