Skip to content

Concurrent load test benchmark: Web Forms vs Blazor under pressure #465

@csharpfritz

Description

@csharpfritz

Summary

The sequential benchmarks from #424 (PR #464) show Blazor is 1.0x-2.7x faster for single-request response times. However, the real performance story -- especially for database-bound pages like ContosoUniversity Students -- requires concurrent load testing to capture throughput, latency under pressure, and resource utilization differences.

Motivation

Current benchmark results (single sequential requests):

App Page Framework Blazor Speedup
WingtipToys Home 6.4ms 2.4ms 2.7x
WingtipToys ProductList 8.3ms 3.6ms 2.3x
ContosoUniversity Home 2.2ms 1.6ms 1.4x
ContosoUniversity Students 6.5ms 6.3ms ~1.0x

The ContosoUniversity Students page shows almost no improvement because:

  1. DB is the bottleneck -- both EF6 and EF Core hit the same LocalDB; framework overhead is negligible vs query time
  2. Sequential requests don't stress the pipeline -- Web Forms' synchronous page lifecycle and ViewState serialization overhead only manifest under concurrent load
  3. Blazor's async pipeline advantage is invisible -- async/await throughout the Blazor stack should handle concurrent requests more efficiently, but you can't see that with one request at a time

Proposed Work

1. Load test tooling

Use bombardier or similar HTTP load testing tool to run concurrent benchmarks:

  • 10, 25, 50, 100 concurrent connections
  • 30-second test duration per configuration
  • Measure: requests/sec, avg latency, p50/p95/p99 latency, error rate

2. Test matrix

Same 4 apps and page sets as #424:

  • WingtipToys (Framework) -- Home, ProductList, About
  • AfterWingtipToys (Blazor) -- Home, ProductList, About
  • ContosoUniversity (Framework) -- Home.aspx, Students.aspx, About.aspx
  • AfterContosoUniversity (Blazor) -- Home, Students, About

3. Metrics to capture

  • Throughput (req/sec) at each concurrency level
  • Latency distribution (p50, p95, p99) under load
  • Error rate under pressure
  • Memory usage (process working set) during load test
  • Thread pool saturation indicators

4. Expected findings

  • Blazor should show significantly better throughput scaling due to async pipeline
  • Web Forms thread-per-request model should saturate earlier
  • Database-bound pages (Students) should show divergence at higher concurrency as framework overhead compounds
  • ViewState serialization overhead in WingtipToys ProductList should amplify under load

5. Deliverables

  • scripts/Run-LoadTests.ps1 -- orchestrator script
  • Updated dev-docs/benchmarks/ with load test results, charts, and analysis
  • Performance benchmark skill update with load test patterns

Acceptance Criteria

  • All 4 apps benchmarked at 10/25/50/100 concurrent connections
  • Results include throughput, latency percentiles, and error rates
  • Report with comparison charts (throughput scaling curves, latency distributions)
  • Analysis explaining where and why Blazor outperforms under load
  • Skill updated with load test execution patterns

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions