Skip to content

Update h2 windowing algo & Http Client benchmark #388

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

Merged
merged 59 commits into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
c28c43b
http2 stream manager canary
TingDaoK Aug 25, 2022
c0b4ce4
add an error handling to make sure no request failed in the middle
TingDaoK Aug 25, 2022
0247e69
add direct connection test
TingDaoK Aug 25, 2022
06ab9a8
add todo
TingDaoK Aug 26, 2022
def775f
nginx test
TingDaoK Aug 26, 2022
9197dc6
try to get it running from CI
TingDaoK Sep 12, 2022
4cd7338
maybe we will have canary as elasticurl in the future
TingDaoK Sep 12, 2022
f445de0
fix build
TingDaoK Sep 12, 2022
37696e2
increase timeout
TingDaoK Sep 12, 2022
f86a9f7
print out output
TingDaoK Sep 12, 2022
ca0c7c5
give me a nicer printout
TingDaoK Sep 12, 2022
53d8d43
unused arg
TingDaoK Sep 12, 2022
6f2c30a
not updating the window so frequently
TingDaoK Sep 12, 2022
2199444
my computers dead, disable it for now
TingDaoK Sep 12, 2022
2a23d4f
try to fix it
TingDaoK Sep 12, 2022
a34e410
why it's committed
TingDaoK Sep 13, 2022
8e9ffd5
update window when larger
TingDaoK Sep 13, 2022
fc4769c
format
TingDaoK Sep 13, 2022
2f0dcf4
check the number is not slower than expected
TingDaoK Sep 13, 2022
c6a1676
result mem
TingDaoK Sep 13, 2022
e4c01fe
add documentation and same thing for stream
TingDaoK Sep 13, 2022
db1a728
fix tests
TingDaoK Sep 13, 2022
9c89ade
30 secs instead
TingDaoK Sep 14, 2022
918c9ce
copy/paste fix
TingDaoK Sep 19, 2022
e4be79e
Merge branch 'main' into canary
TingDaoK Sep 19, 2022
d523095
Merge branch 'main' into canary
TingDaoK Sep 26, 2022
c72d9b0
get rid of the linux only thing
TingDaoK Sep 26, 2022
9ed287c
Merge branch 'main' into canary
TingDaoK Nov 2, 2022
19bfb86
Merge branch 'main' into canary
TingDaoK Dec 13, 2022
74c7b06
update the port
TingDaoK Dec 13, 2022
28ff84d
Merge branch 'main' into canary
TingDaoK Mar 22, 2023
56e84e3
Merge branch 'main' into canary
TingDaoK Apr 24, 2023
65c8a7f
Merge branch 'main' into canary
TingDaoK Apr 1, 2025
e112d01
trivial
TingDaoK Apr 1, 2025
9287f0b
just use 32 bit
TingDaoK Apr 1, 2025
ed923c3
things has been updated
TingDaoK Apr 1, 2025
29ec995
typo
TingDaoK Apr 1, 2025
2066110
you need venv now for new python
TingDaoK Apr 2, 2025
bd3bef5
make the flow control window wide open for server
TingDaoK Apr 2, 2025
e4e6cbe
increament once at the beginning
TingDaoK Apr 2, 2025
46445c0
get the benchmark
TingDaoK Apr 4, 2025
e6eaa1d
Cap the window to max
TingDaoK Apr 7, 2025
7779645
almost there
TingDaoK Apr 8, 2025
4c8d477
Merge branch 'main' into canary
TingDaoK Apr 17, 2025
eef6e31
a bunch of fix
TingDaoK Apr 17, 2025
a2cee45
conversion
TingDaoK Apr 18, 2025
af4c962
address comments
TingDaoK Apr 24, 2025
37adfb2
add comments
TingDaoK Apr 24, 2025
19d9439
h2: respect the initial window size setting (#514)
TingDaoK Apr 25, 2025
84d623c
WIP
TingDaoK Apr 25, 2025
ca5c938
Merge branch 'canary' of github.com:awslabs/aws-c-http into canary
TingDaoK Apr 25, 2025
c66b19f
add tests
TingDaoK Apr 29, 2025
af0a797
add one more tricky test
TingDaoK Apr 29, 2025
c19bd6f
Merge branch 'main' into canary
TingDaoK Apr 29, 2025
1e6e25e
math
TingDaoK Apr 29, 2025
3b24f4f
Merge branch 'canary' of github.com:awslabs/aws-c-http into canary
TingDaoK Apr 29, 2025
932b2a5
omg, this thing is so complicated
TingDaoK Apr 29, 2025
f5868b9
windows
TingDaoK Apr 29, 2025
196e517
adding comments to the local server impl
TingDaoK Apr 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,24 @@ jobs:
- name: gcc-8
- name: gcc-11
- name: gcc-13
# See Issue: https://github.com/llvm/llvm-project/issues/59007. Although this issue
# has been fixed in LLVM, the fix will probably not propagate to older versions of Ubuntu and GCC 13.1.
# See Issue: https://github.com/llvm/llvm-project/issues/59007. Although this issue
# has been fixed in LLVM, the fix will probably not propagate to older versions of Ubuntu and GCC 13.1.
#
# Starting with GLIBC version 2.34, the `dn_expand` function, previously found in `libresolv.so`, was moved to `libc.so`. This
# Starting with GLIBC version 2.34, the `dn_expand` function, previously found in `libresolv.so`, was moved to `libc.so`. This
# function is used internally by the `getaddrinfo()` system call.
#
# In our setup (As of December 2024), we are using an Ubuntu 18 Docker image on a newer Ubuntu host.
# In our setup (As of December 2024), we are using an Ubuntu 18 Docker image on a newer Ubuntu host.
# However, due to compatibility issues between newer libasan.so in GCC 13.1
# and the older Ubuntu image, the linker does not link with `libresolv.so`.
# and the older Ubuntu image, the linker does not link with `libresolv.so`.
# This results in crashes in `getaddrinfo()` since Ubuntu-18 GLIBC is 2.31.
#
# This problem does not occur on Ubuntu 22 and newer because GLIBC versions 2.34
# and above include `dn_expand` in `libc.so`, eliminating the dependency on
# This problem does not occur on Ubuntu 22 and newer because GLIBC versions 2.34
# and above include `dn_expand` in `libc.so`, eliminating the dependency on
# `libresolv.so`.
#
# We can bypass this problem by linking with "resolv" manually until we bump
# We can bypass this problem by linking with "resolv" manually until we bump
# our base Linux image to Ubuntu 22.
extra-build-flag: --cmake-extra=-DCMAKE_EXE_LINKER_FLAGS="-lresolv"
extra-build-flag: --cmake-extra=-DCMAKE_EXE_LINKER_FLAGS="-lresolv"
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,6 @@ if (NOT BYO_CRYPTO AND BUILD_TESTING)
add_subdirectory(tests)
if (NOT CMAKE_CROSSCOMPILING)
add_subdirectory(bin/elasticurl)
add_subdirectory(bin/h2benchmark)
endif()
endif()
22 changes: 22 additions & 0 deletions bin/h2benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
project(h2benchmark C)

file(GLOB H2BENCHMARK_SRC
"*.c"
)

set(PROJECT_NAME h2benchmark)
add_executable(${PROJECT_NAME} ${H2BENCHMARK_SRC})
aws_set_common_properties(${PROJECT_NAME})

target_link_libraries(${PROJECT_NAME} aws-c-http)

if (BUILD_SHARED_LIBS AND NOT WIN32)
message(INFO " h2benchmark will be built with shared libs, but you may need to set LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib to run the application")
endif()

install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
COMPONENT Runtime
RUNTIME
DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT Runtime)
10 changes: 10 additions & 0 deletions bin/h2benchmark/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# HTTP/2 benchmark

this is a C program mimic the API call benchmark from aws-java-sdk-v2. https://github.com/aws/aws-sdk-java-v2/tree/master/test/sdk-benchmarks/src/main/java/software/amazon/awssdk/benchmark/apicall/httpclient

It collects how many API calls finish per second. Basically how many request can made per second.

The program connects to the local host that can be found [here](../../tests/py_localhost).

To run the benchmark, build the h2benchmark with aws-c-http as dependency.
TODO: Currently the configs are all hardcoded.
Loading