cloudflare / pingora

A library for building fast, reliable and evolvable network services.
Apache License 2.0
21.42k stars 1.18k forks source link

monoio for pingora #94

Open loongs-zhang opened 7 months ago

loongs-zhang commented 7 months ago

What is the problem your feature solves, or the need it fulfills?

I saw pingora use tokio, so I guess the low-level is epoll ?

When facing a large number of connections, io_uring is a better choice, monoio is a Rust async runtime based on io_uring.

Describe the solution you'd like

Using monoio as an optional alternative to tokio.

Describe alternatives you've considered

What other solutions, features, or workarounds have you considered that might also solve the issue? What are the tradeoffs for these alternatives compared to what you're proposing?

Additional context

This could include references to documentation or papers, prior art, screenshots, or benchmark results.

budswa commented 5 months ago

Make a PR.

loongs-zhang commented 5 months ago

Make a PR.

Sorry, I don't have time to do this, @ihciah are you interested?

cih-y2k commented 4 months ago

Is it make sense? @loongs-zhang :

Monoio limitations:

  1. Monoio can not solve all problems. If the workload is very unbalanced, it may cause performance degradation than Tokio since CPU cores may not be fully utilized.
loongs-zhang commented 4 months ago

Is it make sense? @loongs-zhang :

Monoio limitations:

  1. Monoio can not solve all problems. If the workload is very unbalanced, it may cause performance degradation than Tokio since CPU cores may not be fully utilized.

Isn't pingora thread-per-core?