Not strictly related to C programming, hence my post here. I'm currently writing a simple proxy server. Basically with my model so far, I spawn a thread per connection (there is a user-defined limit). However, I don't think that would scale too well. Plus most OSes I target only support ~100 threads per process.
At the moment all my proxy server does is read and forward data to another socket. So my question is, would I see an advantage switching to a library such as libevent? It should make thread issues disappear, and if I needed to work with the data I could always create a worker thread.
Just trying to get some feedback whether switching to an event driven loop with libevent is a better way to go.
If it matters, I'm targeting both Linux and Windows. Research shows MySQL has a connection to thread ratio of 1:1 (same as my program). However my requests would most likely take much longer to serve than MySQL requests.