AlexanderThaller / prometheus_exporter

Helper libary to export prometheus metrics using tiny_http and rust-prometheus.
MIT License
28 stars 10 forks source link

Switch to tokio/hyper with a single thread to conserve resources #29

Open AlexanderThaller opened 2 years ago

AlexanderThaller commented 2 years ago

To use less threads and therefore less resources we could switch to tokio/hyper with a single thread instead of using tiny-http which will spawn many threads https://github.com/tiny-http/tiny-http/issues/205.

The biggest problem would be how to make this work with the existing interface and how to make it as ergonomic as possible.

Could just be behind a feature flag so it can be used and improved for now. It would also make it easier to use this crate with applications that already use a async framework.