Convex Self-Hosted vs Cloud Free Tier: Performance Benchmarks

Real-world performance benchmarks comparing Convex self-hosted deployment vs cloud free tier. Test results with oha load testing tool showing response times, throughput, and CDN impact.

Convex Self-Hosted vs Cloud Free Tier: Performance Benchmarks
Community & Learning

Join BitBuddies

Level up your DevOps skills with hands-on courses on CloudPanel and Dockploy. Join our community of developers and get expert workshops to accelerate your online journey.

Expert-led Courses
Live Workshops
Supportive Community
Practical Projects
Explore BitBuddies

Start your journey to DevOps mastery today! 🚀

If you’re considering Convex for your real-time application backend, you might be wondering how the self-hosted option compares to the cloud-hosted free tier in terms of performance. I ran comprehensive load tests on both deployments to give you real numbers to work with.

In this article, I’ll share detailed benchmark results comparing self-hosted Convex (with various CDN configurations) against the cloud-hosted version. These tests were conducted on a live application to give you realistic performance expectations.

Test Setup and Methodology

What We’re Testing

I used oha, a modern HTTP load testing tool written in Rust, to benchmark the performance of different Convex deployment configurations. The tests measure how well each setup handles concurrent requests under load.

Test Parameters

All tests were run with the following parameters:

ParameterValueDescription
Total Requests1,000Number of HTTP requests to send
Concurrent Connections500Simulated users accessing simultaneously
Rate Limit50 req/secControlled request rate for consistency

The command used:

oha -n 1000 -c 500 -q 50 https://target-url/

What oha Measures

The oha load testing tool provides several key metrics:

  • Success Rate: Percentage of requests that completed successfully (HTTP 200)
  • Average Response Time: Mean time from request to response
  • Response Time Distribution: Percentile breakdown showing consistency
  • Throughput (Requests/sec): How many requests the server handles per second
  • DNS+dialup Time: Connection establishment overhead

These metrics help understand both the raw performance and reliability under load.

Test Configurations

I tested four different configurations:

  1. Self-Hosted (No CDN): Convex backend running on VPS, accessed directly
  2. Self-Hosted (Full CDN): CloudFlare CDN active for both website and Convex endpoints
  3. Self-Hosted (Site CDN Only): CloudFlare CDN for website, direct access to Convex
  4. Cloud Convex Free Tier: Standard cloud-hosted Convex with CloudFlare on frontend

Self-Hosting Guide

If you want to deploy your own Convex instance, check out my comprehensive guide on How to Self-Host Convex with Dokploy or Docker Compose.

Benchmark Results

Visual Comparison

Convex Performance Benchmark Graph

Summary Table

ConfigurationAvg ResponseFastestSlowestReq/secSuccess Rate
Self-Hosted (Full CDN)0.16s0.08s0.37s49.65100%
Self-Hosted (Site CDN)0.63s0.17s2.57s47.74100%
Self-Hosted (No CDN)0.98s0.28s2.88s47.22100%
Cloud Convex1.88s0.21s4.53s44.42100%

Detailed Results

Self-Hosted with No CDN

Direct access to self-hosted Convex without any CDN layer.

oha -n 1000 -c 500 -q 50 https://sh-convex.bitbuddies.me/
Summary:
  Success rate: 100.00%
  Total:        21.1762 secs
  Slowest:      2.8789 secs
  Fastest:      0.2811 secs
  Average:      0.9796 secs
  Requests/sec: 47.2227

  Total data:   125.04 MiB
  Size/request: 128.05 KiB
  Size/sec:     5.90 MiB

Response time histogram:
  0.281 [1]   |
  0.541 [65]  |■■■■
  0.801 [196] |■■■■■■■■■■■■
  1.060 [507] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  1.320 [114] |■■■■■■■
  1.580 [43]  |■■
  1.840 [39]  |■■
  2.100 [17]  |
  2.359 [7]   |
  2.619 [3]   |
  2.879 [8]   |

Response time distribution:
  10.00% in 0.5999 secs
  25.00% in 0.7839 secs
  50.00% in 0.9395 secs
  75.00% in 1.0484 secs
  90.00% in 1.3932 secs
  95.00% in 1.6885 secs
  99.00% in 2.5827 secs
  99.90% in 2.8789 secs
  99.99% in 2.8789 secs

Details (average, fastest, slowest):
  DNS+dialup:   0.1573 secs, 0.1193 secs, 0.2184 secs
  DNS-lookup:   0.0001 secs, 0.0000 secs, 0.0010 secs

Status code distribution:
  [200] 1000 responses

Key Observations:

  • Consistent performance around 1 second average
  • Higher DNS+dialup overhead (0.16s average)
  • Good baseline for raw server performance
  • Most requests (507) clustered around 0.8-1.0s range

Self-Hosted with Full CloudFlare CDN (Best Performance)

This configuration had CloudFlare CDN active for both the main website and all Convex API endpoints.

oha -n 1000 -c 500 -q 50 https://sh-convex.bitbuddies.me/
Summary:
  Success rate: 100.00%
  Total:        20.1391 secs
  Slowest:      0.3701 secs
  Fastest:      0.0803 secs
  Average:      0.1592 secs
  Requests/sec: 49.6546

  Total data:   14.49 MiB
  Size/request: 14.83 KiB
  Size/sec:     736.54 KiB

Response time histogram:
  0.080 [1]   |
  0.109 [97]  |■■■■■■■■■
  0.138 [219] |■■■■■■■■■■■■■■■■■■■■■
  0.167 [324] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.196 [194] |■■■■■■■■■■■■■■■■■■■
  0.225 [96]  |■■■■■■■■■
  0.254 [44]  |■■■■
  0.283 [15]  |
  0.312 [6]   |
  0.341 [3]   |
  0.370 [1]   |

Response time distribution:
  10.00% in 0.1096 secs
  25.00% in 0.1302 secs
  50.00% in 0.1541 secs
  75.00% in 0.1812 secs
  90.00% in 0.2119 secs
  95.00% in 0.2340 secs
  99.00% in 0.2845 secs
  99.90% in 0.3701 secs
  99.99% in 0.3701 secs

Details (average, fastest, slowest):
  DNS+dialup:   0.0371 secs, 0.0230 secs, 0.0795 secs
  DNS-lookup:   0.0001 secs, 0.0000 secs, 0.0007 secs

Status code distribution:
  [200] 1000 responses

Key Observations:

  • Extremely consistent response times (0.08s - 0.37s range)
  • Lowest average at 0.16 seconds
  • Highest throughput at 49.65 req/sec
  • Very tight distribution with 99th percentile under 0.3s
  • CDN compression reduces data transfer from 128 KiB to 14.8 KiB per request

Self-Hosted with Site CDN Only

CloudFlare CDN active only for the website, with direct access to Convex endpoints.

oha -n 1000 -c 500 -q 50 https://sh-convex.bitbuddies.me/
Summary:
  Success rate: 100.00%
  Total:        20.9452 secs
  Slowest:      2.5710 secs
  Fastest:      0.1678 secs
  Average:      0.6271 secs
  Requests/sec: 47.7436

  Total data:   17.21 MiB
  Size/request: 17.62 KiB
  Size/sec:     841.16 KiB

Response time histogram:
  0.168 [1]   |
  0.408 [246] |■■■■■■■■■■■■■■■■■■■■■
  0.648 [374] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.889 [251] |■■■■■■■■■■■■■■■■■■■■■
  1.129 [81]  |■■■■■■
  1.369 [10]  |
  1.610 [14]  |
  1.850 [10]  |
  2.090 [1]   |
  2.331 [9]   |
  2.571 [3]   |

Response time distribution:
  10.00% in 0.3242 secs
  25.00% in 0.4105 secs
  50.00% in 0.5658 secs
  75.00% in 0.7757 secs
  90.00% in 0.9235 secs
  95.00% in 1.1089 secs
  99.00% in 2.2318 secs
  99.90% in 2.5710 secs
  99.99% in 2.5710 secs

Details (average, fastest, slowest):
  DNS+dialup:   0.0362 secs, 0.0247 secs, 0.0669 secs
  DNS-lookup:   0.0001 secs, 0.0000 secs, 0.0026 secs

Status code distribution:
  [200] 1000 responses

Key Observations:

  • Good performance but more variance than full CDN
  • Most requests (374) complete in 0.4-0.6s range
  • Occasional spikes at 99th percentile (2.2s)
  • DNS+dialup improved by CDN for site (0.04s vs 0.16s without CDN)

Cloud Convex Free Tier

Standard cloud-hosted Convex with the application frontend using CloudFlare.

oha -n 1000 -c 500 -q 50 https://bitbuddies.me/
Summary:
  Success rate: 100.00%
  Total:        22.5101 secs
  Slowest:      4.5336 secs
  Fastest:      0.2140 secs
  Average:      1.8782 secs
  Requests/sec: 44.4246

  Total data:   17.23 MiB
  Size/request: 17.64 KiB
  Size/sec:     783.66 KiB

Response time histogram:
  0.214 [1]   |
  0.646 [34]  |■■■■■
  1.078 [171] |■■■■■■■■■■■■■■■■■■■■■■■■■■
  1.510 [209] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  1.942 [108] |■■■■■■■■■■■■■■■■
  2.374 [192] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  2.806 [147] |■■■■■■■■■■■■■■■■■■■■■■
  3.238 [77]  |■■■■■■■■■■■
  3.670 [48]  |■■■■■■■
  4.102 [4]   |
  4.534 [9]   |

Response time distribution:
  10.00% in 0.8744 secs
  25.00% in 1.1786 secs
  50.00% in 1.8554 secs
  75.00% in 2.4471 secs
  90.00% in 3.0030 secs
  95.00% in 3.3444 secs
  99.00% in 3.8191 secs
  99.90% in 4.5336 secs
  99.99% in 4.5336 secs

Details (average, fastest, slowest):
  DNS+dialup:   0.0399 secs, 0.0244 secs, 0.1982 secs
  DNS-lookup:   0.0001 secs, 0.0000 secs, 0.0141 secs

Status code distribution:
  [200] 1000 responses

Key Observations:

  • Slowest average response time at 1.88 seconds
  • Wide distribution from 0.21s to 4.53s
  • Lower throughput at 44.42 req/sec
  • Response times spread across multiple buckets (less consistent)
  • Likely affected by geographic distance to Convex cloud servers

Analysis and Insights

Performance Comparison

The benchmark results reveal significant performance differences:

MetricWinnerImprovement vs Cloud
Average Response TimeSelf-Hosted + Full CDN11.75x faster
Fastest ResponseSelf-Hosted + Full CDN2.6x faster
Consistency (99th percentile)Self-Hosted + Full CDN13.4x better
ThroughputSelf-Hosted + Full CDN12% higher

Why Self-Hosted Performs Better

Several factors contribute to the performance advantage:

  • Geographic Proximity: Self-hosted server can be placed closer to your users
  • CDN Caching: CloudFlare caches static assets and can optimize API responses
  • Dedicated Resources: No shared infrastructure with other tenants
  • Network Path: Shorter network hops when CDN is properly configured
  • SSL Termination: CDN handles SSL at edge, reducing backend load

The CDN Impact

The data clearly shows the impact of proper CDN configuration:

ConfigurationAvg Responsevs No CDN
Full CDN (Site + API)0.16s6.1x faster
Site CDN Only0.63s1.6x faster
No CDN0.98sbaseline

CDN Configuration Matters

Simply having a CDN isn’t enough. The dramatic performance improvement comes from routing Convex API endpoints through the CDN as well, not just the static website assets.

Data Transfer Comparison

ConfigurationSize/RequestData/sec
Self-Hosted (No CDN)128 KiB5.90 MiB
Self-Hosted (Full CDN)14.8 KiB736 KiB
Self-Hosted (Site CDN)17.6 KiB841 KiB
Cloud Convex17.6 KiB784 KiB

The CDN configurations show compression benefits, reducing data transfer by ~88% compared to uncompressed responses.

When to Choose Each Option

Choose Self-Hosted + Full CDN When:

  • Performance is critical for your application
  • You have users in specific geographic regions
  • You want predictable, consistent response times
  • You’re comfortable managing infrastructure
  • You need to optimize for sub-200ms response times

Choose Cloud Convex Free Tier When:

  • You’re prototyping or in development phase
  • Your application has low traffic requirements
  • You want zero infrastructure management
  • Geographic distribution isn’t a concern
  • 1-2 second response times are acceptable

Recommendations

Based on these benchmarks, here are my recommendations:

For Production Applications

  1. Self-host Convex on a VPS in the same region as your target users
  2. Use CloudFlare (or similar CDN) for both website AND Convex endpoints
  3. Configure caching rules appropriately for your API responses
  4. Monitor performance regularly with tools like oha

For Development/Staging

  1. Cloud Convex free tier is perfectly adequate
  2. Use self-hosted for performance testing before production
  3. Keep development and production configurations similar

Optimal Infrastructure Setup

ComponentRecommendation
VPS ProviderHetzner, DigitalOcean, or AWS in user’s region
VPS Specs4GB RAM minimum for PostgreSQL
CDNCloudFlare (free tier works well)
DatabasePostgreSQL for production, SQLite for development
SSLLet CDN handle SSL termination

Conclusion

The benchmark results clearly demonstrate that self-hosted Convex with proper CDN configuration significantly outperforms the cloud-hosted free tier in terms of response time and consistency. The self-hosted setup with full CDN achieved response times nearly 12x faster than the cloud version.

However, performance isn’t everything. The cloud-hosted option offers simplicity and zero maintenance overhead that may be more valuable during early development stages or for applications where sub-second response times aren’t critical.

For production applications where performance matters, investing time in setting up self-hosted Convex with a proper CDN configuration will deliver substantial improvements in user experience.

Get Started with Convex

FAQ

Install oha on your system:

  • Mac: brew install oha
  • Linux: cargo install oha
  • Windows: winget install hatoo.oha

Then run:

oha -n 1000 -c 500 -q 50 https://your-convex-app-url/

Adjust the parameters based on your testing needs:

  • -n: Total number of requests
  • -c: Concurrent connections
  • -q: Rate limit (requests per second)

Results will vary based on:

  • Geographic distance between you, CDN edges, and servers
  • Server specifications (CPU, RAM, network)
  • Database choice (PostgreSQL vs SQLite)
  • CDN configuration and caching rules
  • Application complexity and data being fetched

Run your own benchmarks to get accurate numbers for your specific setup.

While CloudFlare isn’t strictly necessary, a CDN provides significant benefits:

  • SSL termination at edge locations
  • Geographic distribution of content
  • DDoS protection
  • Compression and optimization

CloudFlare’s free tier is sufficient for most self-hosted Convex deployments. Alternatives like Fastly, AWS CloudFront, or Bunny.net work equally well.

Cloud Convex Free Tier:

  • Free for up to 1M function calls/month
  • 1GB storage included
  • No infrastructure costs

Self-Hosted Convex:

  • VPS: ~$8-20/month (Hetzner, DigitalOcean)
  • Domain: ~$1/month
  • CloudFlare: Free tier sufficient
  • Total: ~$10-25/month

Self-hosting becomes cost-effective when you exceed the free tier limits or need better performance.

Real-time synchronization works identically in both deployments. The benchmark tests measure HTTP request/response performance, which affects:

  • Initial page loads
  • Data fetching
  • Function calls

WebSocket-based real-time updates have different characteristics and weren’t specifically tested here, though they benefit from the same geographic proximity advantages.

Related Posts