dotnet / dotnet/aspnetcore

Design Proposal: #5981 Performance of Rewrite Middleware

Open
#68,952 2 comments 0 reactions 0 assignees View on GitHub
area-middleware design-proposal performance
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

## Summary

Design proposal for https://github.com/dotnet/aspnetcore/issues/5981. Adding benchmarks for Rewrite Middleware project in [aspnet/benchmarks](https://github.com/aspnet/Benchmarks).

## Motivation and goals

- Seeing how the increased number of Rewrite rules effects the performance.
- Gauge how these effected by changes to Rewrite middleware in general.
- Close [5981](https://github.com/dotnet/aspnetcore/issues/5981) it appears to be the oldest help-wanted labelled issue.

## In scope

Using [5981](https://github.com/dotnet/aspnetcore/issues/5981) as a starting point. Single rule, thousand rules and ten thousand rules will be added from database.

## Out of scope

None.

## Risks / unknowns

None.

## Examples

Because task is focused on benchmarking a feature rather than fixing a bug or adding a feature. Currently I can't add any examples to this section.

However I found a previous PR [2233](https://github.com/aspnet/Benchmarks/pull/2033) that have a familiar subject to [5981](https://github.com/dotnet/aspnetcore/issues/5981) . In the below draft PR, I tried to show what I kind of imagine doing if this design approval goes ahead.

**Disclaimer: I read through the contributor guidelines, that's why I opened this Design Proposal in the first place. Without getting approval from the team, there is no point to writing code. I did the PR below because, it's much easier to demonstrate a point like this. So if it's something team can use, great. If they can't, it's completely fine.**

[2209](https://github.com/aspnet/Benchmarks/pull/2209)

There are multiple things that won't be the same but done so I can just get something working.
Some of them are below.

1-Editing postgres-techempower docker file.
2-Using the same SQL script for postgres-techempower.
3-Using that docker container for the scenario.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the aspnet/Benchmarks project and the referenced PR 2209, then inspect the postgres-techempower Docker file and SQL script described in the proposal. Confirm the approved benchmark design for Rewrite Middleware with single, 1,000, and 10,000 rules loaded from a database, and compare the results against the goals before considering the work complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, docker, postgresql
Domain
backend, databases, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.