Skip to content

Conversation

@Taepper
Copy link
Collaborator

@Taepper Taepper commented Feb 26, 2025

Summary

We had multiple issues with our Poco library in the past. In general, the library tries to do too much.

Explicit issues were:

  • its manual memory pooling for http buffers / connections
  • it had a bug leading to leaking connections
  • it is cumbersome to not let Poco catch exceptions itself (needed for debugging)
  • Poco's library is very heavy on using pointers and requires heap allocations for the request handlers (as Poco consists on freeing these objects itself after every request)

Crowcpp is a leaner library for an http server.

PR Checklist

  • All necessary documentation has been adapted or there is an issue to do so.
  • The implemented feature is covered by an appropriate test.

@Taepper
Copy link
Collaborator Author

Taepper commented Feb 26, 2025

Some first numbers for Poco:

ataeppe@bs-mbpas-0001 bin % bombardier localhost:8081/info        
Bombarding http://localhost:8081/info for 10s using 125 connection(s)
[==========================================================================] 10s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec      2924.88     853.31    5371.50
  Latency       43.55ms    60.68ms   326.98ms
  HTTP codes:
    1xx - 0, 2xx - 3446, 3xx - 0, 4xx - 0, 5xx - 0
    others - 25427
  Errors:
    the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection - 25427
  Throughput:     0.94MB/s
ataeppe@bs-mbpas-0001 bin % bombardier localhost:8081/doesNotExist
Bombarding http://localhost:8081/doesNotExist for 10s using 125 connection(s)
[==========================================================================] 10s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec     10281.79    2574.83   15555.77
  Latency       12.26ms     7.32ms   142.08ms
  HTTP codes:
    1xx - 0, 2xx - 0, 3xx - 0, 4xx - 99873, 5xx - 0
    others - 2094
  Errors:
    the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection - 1742
    dial tcp 127.0.0.1:8081: connect: connection reset by peer - 352
  Throughput:     3.18MB/s

vs. crowcpp:

ataeppe@bs-mbpas-0001 bin % bombardier localhost:8081/info
Bombarding http://localhost:8081/info for 10s using 125 connection(s)
[===================================================================================================================================================] 10s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec       581.37     884.82    5273.70
  Latency      211.26ms    25.39ms   294.31ms
  HTTP codes:
    1xx - 0, 2xx - 5942, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:   230.75KB/s
ataeppe@bs-mbpas-0001 bin % bombardier localhost:8081/doesNotExist
Bombarding http://localhost:8081/doesNotExist for 10s using 125 connection(s)
[===================================================================================================================================================] 10s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec     12828.63    1805.25   15920.00
  Latency        9.74ms     2.08ms    36.57ms
  HTTP codes:
    1xx - 0, 2xx - 0, 3xx - 0, 4xx - 128332, 5xx - 0
    others - 0
  Throughput:     3.27MB/s

So it appears that the throughput of Poco is actually higher. But the number of responses is higher in crow? Still needs to be investigated

@github-actions
Copy link
Contributor

This is a preview of the changelog of the next release. If this branch is not up-to-date with the current main branch, the changelog may not be accurate. Rebase your branch on the main branch to get the most accurate changelog.

Note that this might contain changes that are on main, but not yet released.

Changelog:

0.5.5 (2025-02-26)

Features

Bug Fixes

  • return proper error message when index is out of bounds for a HasMutations filter (50e9f49)

@Taepper Taepper marked this pull request as draft February 26, 2025 09:48
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

Successfully merging this pull request may close these issues.

2 participants