Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracking issue: axum migration #1900

Closed
28 tasks done
syphar opened this issue Nov 10, 2022 · 6 comments
Closed
28 tasks done

tracking issue: axum migration #1900

syphar opened this issue Nov 10, 2022 · 6 comments
Assignees

Comments

@syphar
Copy link
Member

syphar commented Nov 10, 2022

Current design idea:

  • axum is the main entrypoint for requests
  • when the route is already migrated to axum, we use it,
  • as an axum fallback we call the old iron server for the rest

details

  • database / storage access will stay sync for now, via spawn_blocking (which is the recommended way)
  • template engine can stay the same
  • preferably we don't have to change tests so it's easier to see if behaviour changed.

handler migration status

  • sitemap::sitemapindex_handler
  • sitemap::sitemap_handler
  • sitemap::about_builds_handler
  • statics::static_handler
  • rustdoc::static_asset_handler
  • storage_change_detection
  • build_details::build_details_handler
  • builds::build_list_handler
  • crate_details::crate_details_handler
  • features::build_features_handler
  • metrics::metrics_handler
  • releases::activity_handler
  • releases::build_queue_handler
  • releases::home_page
  • releases::owner_handler
  • releases::recent_releases_handler
  • releases::releases_by_stars_handler
  • releases::releases_failures_by_stars_handler
  • releases::releases_feed_handler
  • releases::releases_recent_failures_handler
  • releases::search_handler
  • rustdoc::badge_handler
  • rustdoc::download_handler
  • rustdoc::rustdoc_html_server_handler
  • rustdoc::rustdoc_redirector_handler
  • rustdoc::target_redirect_handler
  • sitemap::about_handler
  • source::source_browser_handler

links

issues resolved when finished:

issues that we can work on when this is finished:

@syphar
Copy link
Member Author

syphar commented Nov 10, 2022

strangler performance tests (local), simple static handler:

old iron server

Running 1m test @ http://localhost:3000/-/static/opensearch.xml
  12 threads and 12 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     3.89ms   14.51ms 250.11ms   94.31%
    Req/Sec     3.90k     2.00k    8.94k    61.25%
  2790043 requests in 1.00m, 1.80GB read
Requests/sec:  46420.74
Transfer/sec:     30.59MB

simple strangler server, fallback to old iron

Running 1m test @ http://localhost:4000/-/static/opensearch.xml
  12 threads and 12 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     4.38ms   15.27ms 249.66ms   93.93%
    Req/Sec     2.81k     0.88k    7.73k    76.24%
  2004515 requests in 1.00m, 1.29GB read
Requests/sec:  33354.03
Transfer/sec:     21.98MB

new axum server (not optimized yet)

Running 1m test @ http://localhost:3333/-/static/opensearch.xml
  12 threads and 12 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     4.14ms   15.78ms 250.24ms   94.27%
    Req/Sec     3.43k     1.04k    6.90k    74.32%
  2447013 requests in 1.00m, 1.59GB read
Requests/sec:  40726.37
Transfer/sec:     27.15MB

@syphar
Copy link
Member Author

syphar commented Nov 10, 2022

strangler performance tests (local), simple database handler

old iron server

Running 1m test @ http://localhost:3000/crate/sconectl/0.2.13
  12 threads and 12 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    11.04ms   22.53ms 233.01ms   89.95%
    Req/Sec   265.99    106.13   520.00     66.53%
  189059 requests in 1.00m, 8.41GB read
Requests/sec:   3145.60
Transfer/sec:    143.27MB

simple strangler server, fallback to old iron

Running 1m test @ http://localhost:4000/crate/sconectl/0.2.13
  12 threads and 12 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    11.44ms   24.04ms 310.05ms   90.19%
    Req/Sec   255.41     99.95   464.00     66.64%
  181229 requests in 1.00m, 8.06GB read
Requests/sec:   3015.47
Transfer/sec:    137.34MB

new axum server (not optimized yet)

Running 1m test @ http://localhost:3333/crate/sconectl/0.2.13
  12 threads and 12 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     8.82ms   18.88ms 251.45ms   92.04%
    Req/Sec   272.72     82.96   434.00     71.63%
  194548 requests in 1.00m, 7.80GB read
Requests/sec:   3237.54
Transfer/sec:    132.98MB

@syphar
Copy link
Member Author

syphar commented Nov 10, 2022

strangler performance tests (local), simple static handler, more concurrency:

old iron server

Running 1m test @ http://localhost:3000/-/static/opensearch.xml
  24 threads and 24 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    18.24ms   39.54ms 375.22ms   88.67%
    Req/Sec     1.77k     1.77k   11.14k    83.34%
  2415682 requests in 1.00m, 1.55GB read
Requests/sec:  40196.01
Transfer/sec:     26.49MB

simple strangler server, fallback to old iron

Running 1m test @ http://localhost:4000/-/static/opensearch.xml
  24 threads and 24 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     5.78ms   16.89ms 342.13ms   92.88%
    Req/Sec     1.46k   574.29     4.37k    69.29%
  2086407 requests in 1.00m, 1.34GB read
Requests/sec:  34738.31
Transfer/sec:     22.89MB

new axum server (not optimized yet)

Running 1m test @ http://localhost:3333/-/static/opensearch.xml
  24 threads and 24 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.39ms    5.13ms 128.88ms   97.20%
    Req/Sec     1.43k   220.83     3.33k    75.20%
  2043705 requests in 1.00m, 1.33GB read
Requests/sec:  34030.80
Transfer/sec:     22.69MB

@syphar
Copy link
Member Author

syphar commented Nov 10, 2022

@jyn514 so this looks like axum-strangler makes it slower, but not to an extend that should worry us. The peaks I sometimes see in grafana are perhaps 10k RPM, so around 166 RPS. Normal load is far, far less.

@jyn514
Copy link
Member

jyn514 commented Nov 10, 2022

@syphar looks great! Thanks for testing :)

@syphar syphar self-assigned this Dec 16, 2022
@syphar
Copy link
Member Author

syphar commented Dec 25, 2022

#1963 is merged, closing this issue

🎉

@syphar syphar closed this as completed Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants