hjr3 / weldr

A HTTP 1.1 proxy written in Rust using tokio.
Apache License 2.0
218 stars 20 forks source link

Extract Server implementation from pool module #79

Closed hjr3 closed 7 years ago

hjr3 commented 7 years ago

In order to track stats on the Server, the pool had to stop making deep clones of the Server. The actual Server implementation is now hidden away behind Arc<RwLock>. This is similar to how the Pool works.

Fixes #66

hjr3 commented 7 years ago

It took me three attempts to get here. Not sure this will be the perfect solution for the future, but I think it moves things forward.

hjr3 commented 7 years ago

Did a large refactor in https://github.com/hjr3/weldr/pull/85 to use only a single thread. This makes stats tracking easier (per process) and also has a large performance improvement.