scuffle icon indicating copy to clipboard operation
scuffle copied to clipboard

http: Implement callbacks to configure the sockets used as listeners

Open DrSloth opened this issue 8 months ago • 19 comments

Hello, i have recently come across a situation where i wanted to use SO_REUSEPORT on the HttpServers. I added options to the HttpServerBuilder that can be set to callbacks which can configure socket2::Socket instances that will then be used as listeners.

DrSloth avatar Mar 13 '25 16:03 DrSloth

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 13 '25 16:03 CLAassistant

If you can format your code using just fmt I can run the windows tests to see if the socket2 bind with non-blocking actually works on windows environments.

TroyKomodo avatar Mar 13 '25 17:03 TroyKomodo

?brawl try

philipch07 avatar Mar 14 '25 12:03 philipch07

⌛ Trying commit https://github.com/ScuffleCloud/scuffle/commit/04a569d71c1fc4b0c7a88f5f50ac822034a7c6e5 with merge https://github.com/ScuffleCloud/scuffle/commit/59891e2187d76c53d505e2edd8039c89b7e6d9f2...

scuffle-brawl[bot] avatar Mar 14 '25 12:03 scuffle-brawl[bot]

💔 Test failed - brawl-done

scuffle-brawl[bot] avatar Mar 14 '25 12:03 scuffle-brawl[bot]

Oh I missed some files when reviewing since I'm currently on mobile.

When you get the chance, please run just workspace-hack so it will pass the hakari stage.

philipch07 avatar Mar 14 '25 12:03 philipch07

?brawl try

ah no permissions D:

DrSloth avatar Mar 14 '25 12:03 DrSloth

?brawl try

lennartkloock avatar Mar 14 '25 12:03 lennartkloock

⌛ Trying commit https://github.com/ScuffleCloud/scuffle/commit/8cf83cec39a427f07c8fecf24e5e1cab47a70d65 with merge https://github.com/ScuffleCloud/scuffle/commit/47ac6af9fac8fc252715670362e8915de91e627c...

scuffle-brawl[bot] avatar Mar 14 '25 12:03 scuffle-brawl[bot]

💔 Test failed - brawl-done

scuffle-brawl[bot] avatar Mar 14 '25 12:03 scuffle-brawl[bot]

?brawl try

lennartkloock avatar Mar 19 '25 11:03 lennartkloock

⌛ Trying commit https://github.com/ScuffleCloud/scuffle/commit/091d548aa9b0c149caa164a4a8481a4e386cb9d0 with merge https://github.com/ScuffleCloud/scuffle/commit/6359e6843ab25b741b6f9bccf73e033397881589...

scuffle-brawl[bot] avatar Mar 19 '25 11:03 scuffle-brawl[bot]

💔 Test failed - brawl-done

scuffle-brawl[bot] avatar Mar 19 '25 11:03 scuffle-brawl[bot]

?brawl try

TroyKomodo avatar Mar 19 '25 20:03 TroyKomodo

⌛ Trying commit https://github.com/ScuffleCloud/scuffle/commit/f6cd7056fbfbabd989b6790c35afddce77695134 with merge https://github.com/ScuffleCloud/scuffle/commit/a3acc500ad42fd9a9383c64ec181745a88d413f4...

scuffle-brawl[bot] avatar Mar 19 '25 20:03 scuffle-brawl[bot]

Codecov Report

Attention: Patch coverage is 35.71429% with 9 lines in your changes missing coverage. Please review.

Project coverage is 84.17%. Comparing base (dcf42f2) to head (f6cd705). Report is 329 commits behind head on main.

:exclamation: Current head f6cd705 differs from pull request most recent head 08559d9

Please upload reports for the commit 08559d9 to get more accurate results.

Files with missing lines Patch % Lines
crates/http/src/server.rs 35.71% 9 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #407      +/-   ##
==========================================
- Coverage   84.23%   84.17%   -0.07%     
==========================================
  Files         215      215              
  Lines       14902    14844      -58     
==========================================
- Hits        12553    12495      -58     
  Misses       2349     2349              
Files with missing lines Coverage Δ
crates/http/src/backend/h3/mod.rs 87.50% <ø> (ø)
crates/http/src/backend/hyper/mod.rs 75.38% <ø> (ø)
crates/http/src/server.rs 92.08% <35.71%> (-6.32%) :arrow_down:

... and 7 files with indirect coverage changes

Components Coverage Δ
scuffle-aac 89.65% <ø> (ø)
scuffle-amf0 100.00% <ø> (ø)
scuffle-av1 98.66% <ø> (ø)
scuffle-batching 100.00% <ø> (ø)
scuffle-bootstrap 86.01% <ø> (ø)
scuffle-bytes-util 100.00% <ø> (ø)
scuffle-context 100.00% <ø> (ø)
scuffle-expgolomb 100.00% <ø> (ø)
scuffle-ffmpeg 91.13% <ø> (-0.12%) :arrow_down:
scuffle-flv 96.11% <ø> (ø)
scuffle-future-ext 50.00% <ø> (ø)
nutype-enum 71.87% <ø> (ø)
scuffle-h264 100.00% <ø> (ø)
scuffle-http 85.53% <35.71%> (-1.13%) :arrow_down:
scuffle-metrics 87.82% <ø> (ø)
postcompile 79.45% <ø> (-0.55%) :arrow_down:
scuffle-pprof 100.00% <ø> (ø)
scuffle-settings 93.66% <ø> (ø)
scuffle-signal 95.68% <ø> (+10.89%) :arrow_up:

codecov[bot] avatar Mar 19 '25 20:03 codecov[bot]

🎉 Try build successful! Completed in 15:16

Requested by: @TroyKomodo Build commit: https://github.com/ScuffleCloud/scuffle/commit/a3acc500ad42fd9a9383c64ec181745a88d413f4 (a3acc500ad42fd9a9383c64ec181745a88d413f4)

scuffle-brawl[bot] avatar Mar 19 '25 20:03 scuffle-brawl[bot]

@DrSloth did you still plan to do this pr?

TroyKomodo avatar Apr 27 '25 04:04 TroyKomodo

@DrSloth did you still plan to do this pr?

Yes, i am very sorry. Some other projects came up that i need to attend right now. Only unit tests are missing. I am currently hunting for some error that prevents me from writing a unit test that expects failure. Binding twice to the same udp port for http3 fails with a aws-lc error.

DrSloth avatar Apr 28 '25 07:04 DrSloth