Hacker News new | ask | show | jobs
by SnowProblem 1035 days ago
Async is a bit trendy right now and in my experience has a way of infecting a codebase. That said, I like the way it reads for server code. In a project I'm working on, we use both: explicit threads and channels the CPU-bound work and an async REST server on a single thread for handing requests and reading the database. It works nicely. But we do have a clear separation boundary between the two. Also, here's a related post that surprised me. Poster says spawning a thread per connection works fine for their server at 50K+ connections. Context switching and spawns not a problem? Maybe not always. https://stackoverflow.com/questions/17593699/tcp-ip-solving-...
1 comments

50K is not really very many connections. How about 1M?
True, and C10M is the new C10K. I was just surprised it works well using that many OS threads rather than needing green threads or async.