Skip to content

using a precursor to lwt_direct for an async backend #96

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

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

c-cube
Copy link
Owner

@c-cube c-cube commented Jul 10, 2025

this uses a tiny effect-based task scheduler that lives inside of Lwt_main/Lwt_engine (see lwt_direct for the real deal).

A basic benchmark on the trivial /hello endpoint:

$ wrk -c 40 -t 4 -d 15 http://127.0.0.1:8085/hello/world --latency
Running 15s test @ http://127.0.0.1:8085/hello/world
  4 threads and 40 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   205.31us   40.66us   4.32ms   97.55%
    Req/Sec    48.87k     1.17k   51.20k    86.92%
  Latency Distribution
     50%  200.00us
     75%  206.00us
     90%  219.00us
     99%  270.00us
  2936034 requests in 15.10s, 145.60MB read
Requests/sec: 194445.49
Transfer/sec:      9.64MB

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.

1 participant