Hacker News new | past | comments | ask | show | jobs | submit login

> there's 1 mutex to read the channel, not 1 per backend

Fewer mutexes isn't necessarily an advantage, there will be far higher contention on that single mutex. Channel writes also require a lock.




One to read, and a single reader thread. That's no contention.

One to write, that's used for writing only, not both read/write as in the published design.

Edit: it's a variation on the following, but for ReverseProxies, not worker goroutines http://marcio.io/2015/07/handling-1-million-requests-per-min...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: