Go语言的Web框架设计是基于线程的。

huangapple go评论69阅读模式
英文:

go language web framework design thread wise

问题

GO net/http库的线程设计是什么样的?
几天前我听说了这个演讲,我对GO开发人员如何实现他们的Web框架设计在线程方面非常好奇。
我知道node.js使用一个计算线程读取事件和一个I/O线程池。ASP.NET使用一个线程来处理每个调用...GO是如何处理C10K问题的?

英文:

What is the threading design of GO net/http library?
I heard this talk a few days ago and I was really curious about how GO developers implemented their web framework design, thread wise.
I know node.js uses 1 Computational thread reading events and a pool of I/O threads. ASP.NET uses a thread per call... how does GO handle the C10K problem?

答案1

得分: 2

net/http服务器根据文档的说明,每个连接使用一个goroutine。

英文:

The net/http server uses one goroutine per connection as stated in the documentation.

huangapple
  • 本文由 发表于 2015年3月30日 02:32:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/29333132.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定