Pandastack Documentation
  • Welcome
  • Getting Started
    • Quickstart
      • Getting Started
    • Projects
      • Static Website
        • Configure your static website
          • Pre-defined ENV for static websites
      • Conatinered Website
        • How to configure nodejs project
        • How to Configure Python projects
        • How to Configure GO project
        • Docker runtime Projects
        • Private Connection with database.
        • Override default ENV
    • Databases
      • MySQL
      • PostgreSQL
      • Redis
      • MongoDB
      • TimeScaleDB
    • Monitoring
      • Uptime Check
      • SSL monitoring
      • Monitors pricing
    • Analytics
    • SSO
      • Google
      • Azure
    • Managed Apps
      • Wordpres
      • Directus
      • Strapi
      • Consul
      • Jenkins
    • PandaEdge
      • Deploy a nodejs function
      • Deploy a python function
      • Panda Edge pricing
Powered by GitBook
On this page
  • Memory Pricing
  • Invocation Pricing
  • Cost Calculation
  • Example Calculations
  • Example 1: Basic Function (256MB)
  • Example 2: High Volume API (256MB)
  • Example 3: High Volume Processing (512MB)
  • Example 4: Data Processing (2GB)
  • Important Notes
  • Volume-Based Cost Analysis
  • Monthly Cost Comparison (100M invocations)
  • Cost Comparison with Other Providers (100M invocations/month, 256MB, 0.1s)
  • Usage Tiers
  • Monitoring and Cost Control
  1. Getting Started
  2. PandaEdge

Panda Edge pricing

PandaEdge functions are priced based on two main components:

  1. Memory allocation and execution duration

  2. Number of invocations

Memory Pricing

Memory is priced based on GB-seconds with different tiers:

Memory Allocation
Price Multiplier
Example

≤ 256MB

1.0x (base price)

Default tier

≤ 512MB

1.2x

20% premium

≤ 1024MB

1.5x

50% premium

≤ 2048MB

2.0x

100% premium

> 2048MB

3.0x

200% premium

Base memory price: $0.0000167 per GB-second

Invocation Pricing

Each function invocation is charged at a flat rate:

  • $0.0000002 per invocation

Cost Calculation

Your hourly cost is calculated as:

Memory Cost = GB * seconds * invocations * $0.0000167 * tier_multiplier
Invocation Cost = invocations * $0.0000002
Total Cost = Memory Cost + Invocation Cost

Example Calculations

Example 1: Basic Function (256MB)

  • Memory: 256MB (0.25GB)

  • Duration: 0.012 seconds

  • Invocations: 14 per hour

Memory Cost = 0.25GB * 0.012s * 14 * $0.0000167 * 1.0
            = $0.0000007014

Invocation Cost = 14 * $0.0000002
                = $0.0000028

Total Cost = $0.0000035014 per hour

Example 2: High Volume API (256MB)

  • Memory: 256MB (0.25GB)

  • Duration: 0.1 seconds (minimum)

  • Invocations: 100,000,000 per month (~138,889 per hour)

Monthly Memory Cost = 0.25GB * 0.1s * 100,000,000 * $0.0000167 * 1.0
                   = $41.75

Monthly Invocation Cost = 100,000,000 * $0.0000002
                       = $20.00

Total Monthly Cost = $61.75

Average Hourly Cost = $61.75 / (30 * 24)
                   = $0.0858 per hour

Example 3: High Volume Processing (512MB)

  • Memory: 512MB (0.5GB)

  • Duration: 0.5 seconds

  • Invocations: 100,000,000 per month (~138,889 per hour)

Monthly Memory Cost = 0.5GB * 0.5s * 100,000,000 * $0.0000167 * 1.2
                   = $501.00

Monthly Invocation Cost = 100,000,000 * $0.0000002
                       = $20.00

Total Monthly Cost = $521.00

Average Hourly Cost = $521.00 / (30 * 24)
                   = $0.7236 per hour

Example 4: Data Processing (2GB)

  • Memory: 2048MB (2GB)

  • Duration: 2 seconds

  • Invocations: 10 per hour

Memory Cost = 2GB * 2s * 10 * $0.0000167 * 2.0
            = $0.001336

Invocation Cost = 10 * $0.0000002
                = $0.000002

Total Cost = $0.001338 per hour

Important Notes

  1. System Limits:

    • Default limit: 1000 invocations per minute

    • Maximum memory allocation: 2048MB (2GB)

    • Memory allocations beyond 2048MB are not allowed

    • Contact support for custom limits

  2. High Volume Considerations:

    • 100M invocations/month ≈ 138,889 invocations/hour

    • Memory allocation significantly impacts cost at high volumes

    • Optimize execution duration for cost efficiency

    • Consider memory tier pricing multipliers

  3. Memory Allocation:

    • Default is 256MB if not specified

    • Choose the right memory tier based on your function's needs (up to 2048MB)

    • Higher tiers cost more but might execute faster

    • At high volumes, even small memory/duration optimizations matter

  4. Cost Optimization Tips:

    • Keep functions small and focused

    • Minimize execution time

    • Choose appropriate memory allocation

    • Consider cold starts in your architecture

    • For high volume, optimize memory and duration first

  5. Billing Frequency:

    • Costs are calculated hourly

    • Each hour's metrics are collected and stored independently

    • You can monitor costs through the dashboard

Volume-Based Cost Analysis

Monthly Cost Comparison (100M invocations)

Memory
Duration
Memory Cost
Invocation Cost
Total Cost

256MB

0.1s

$41.75

$20.00

$61.75

512MB

0.1s

$50.10

$20.00

$70.10

1024MB

0.1s

$62.63

$20.00

$82.63

2048MB

0.1s

$83.50

$20.00

$103.50

Cost Comparison with Other Providers (100M invocations/month, 256MB, 0.1s)

Provider
Memory Cost
Invocation Cost
Total Cost

PandaEdge

$41.75

$20.00

$61.75

AWS Lambda

$145.00

$20.00

$165.00

Google Functions

$108.75

$40.00

$148.75

Azure Functions

$160.00

$20.00

$180.00

Usage Tiers

  1. Low Volume (1,000 invocations/month):

    • 256MB, 0.1s duration

    • Monthly cost: ~$0.0006

    • Good for development/testing

  2. Medium Volume (1,000,000 invocations/month):

    • 256MB, 0.1s duration

    • Monthly cost: ~$0.62

    • Typical for small production apps

  3. High Volume (100,000,000 invocations/month):

    • 256MB, 0.1s duration

    • Monthly cost: ~$61.75

    • Enterprise-level usage

  4. Cost Scaling:

    • Costs scale linearly with invocations

    • Memory tier multipliers apply to memory costs only

    • Duration optimization becomes critical at high volumes

Monitoring and Cost Control

  1. Real-time Metrics:

    • Function invocations

    • Execution duration

    • Memory usage

    • Hourly costs

  2. Cost Management:

    • Set budget alerts

    • Monitor usage patterns

    • Optimize based on metrics

    • Scale efficiently

  3. High Volume Tips:

    • Monitor average duration closely

    • Consider memory vs duration tradeoffs

    • Set up alerts for unusual patterns

    • Regular optimization reviews

For more information or support, please contact our team at support@pandastack.in.

PreviousDeploy a python function

Last updated 3 months ago