FAQ
Go is fast - it will certainly be fast enough to do what you're asking -
but it is a little low level.

There are things that Apache and Nginx will do with a little configuration,
that you will have to write code to get from Go. For some of these, of
course, there are libraries that make it easier, but you'll still have to
do it yourself:


    - Logs. You need to configure logging on each route yourself (although
    Gorilla has some helpful functions).
    - Authentication. If you want basic auth or other types of auth, you'll
    have to code them yourself in Go.
    - Routing. Different sites off the same server (Gorilla mux makes this
    easier), or different routes to resources must all be coded.
    - FCGI. At the moment there is no fcgi server library that I know of in
    Go (net/http/fcgi is for writing clients). If you want to add some other
    applications (say in PHP), you don't have a common standard for accessing
    them.
    - Reverse Proxies. This is easy in Apache or Nginx, and in very
    sophisticated ways, but you would have to write the functions yourself in
    Go.
    - Server-Status. Both Apache and Nginx server-status integrate nicely
    with tools like collectd. You might want to write something similar to keep
    an eye on your server.

These are just off the top of my head.

At a pure performance level, I would imagine a Go webserver could be
faster, since it wouldn't have all the configurable goodness I've described
above. But both Apache and Nginx are written in C, so they aren't being
slowed down by the language: if you were to write a functionally identical
webserver in Go, I don't imagine it would be faster.

If performance is an issue, benchmark Apache, Nginx and a bare-bones Go
server. I'd love to know your results, but put benchmarks on the web with
extreme caution: you'll likely be accused of all sorts of inaccuracies and
mistakes ;-) !


All the best,C

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 10 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 17, '14 at 1:39p
activeJan 20, '14 at 1:52a
posts10
users6
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase