就长期稳定性而言,相比Tomcat,Apache,去Web服务器的性能稳定性如何? [关闭]

I have been thinking instead of using:

  • Tomcat
  • Apache
  • Lightweight webserver
  • PHP
  • Ruby
  • JSP

Why not switch my projects to Go language. Because there i have:

  • webserver built in
  • i do not even need to depend on PHP, Ruby, JSP
  • Go solves cross-platform such as: runs on FreeBSD, Linux, Solaris (Windows, Mac, Android, Tizen)
  • nor Apache nor Tomcat nor other webserver maintainence
  • speed of browser would be extreamly faster then other web server scripting languages.

But one thing i am worried about, which is the stablity of Go webserver compared to other webservers.

Has anyone done this before or am i alone building such projects for production releases?

There are no stability problem.

I have a few webservers 100% in go that run for months, serving about a million queries per month without any problem (mostly json, through GET, POST, and websockets).

They're on 64 bits ubuntu servers but I guess you would have difficulties producing the so much gossiped about 32 bits bug, especially with a web server.

Don't use a front-end if you have no specific reason : It's easy to make a complete web application just using Go.

You will be far from alone. In my opinion Go is especially well suited to build long running servers. Goroutines and channels makes it really easy to handle both user requests and long term tasks (or, for example, do the postreatment of user queries after you answered the http query, which isn't so easy in php and is too many LOC in java if you want to do it properly).

Use Nginx as the front-end and make sure that you are using the 64bit version of Go. The 32bit version has severe stability problems which are a show stopper for any long-running processes.

Why not using the Build in Webserver and set up a Reverse Proxy like Varnish, or let Nginx act as Proxy?

http://wiki.nginx.org/ReverseProxyCachingExample