nginx + Go - fcgi vs http

722 views
Skip to first unread message

Jose

unread,
Mar 13, 2014, 6:35:51 PM3/13/14
to golang-nuts
What do you recommend for a nginx + Go server configuration:

fcgi or http proxy ?

thanks

Maxim Khitrov

unread,
Mar 13, 2014, 6:42:00 PM3/13/14
to Jose, golang-nuts
net/http and net/http/fcgi have identical Serve functions, so it's
very easy to implement both. I have an app that runs its own http
server for debugging locally, but uses fcgi behind nginx in
production. The latter should be more efficient.

Jose

unread,
Mar 13, 2014, 7:06:08 PM3/13/14
to Maxim Khitrov, golang-nuts
thanks

Matt Silverlock

unread,
Mar 13, 2014, 7:21:21 PM3/13/14
to golan...@googlegroups.com
There are some benchmarks here with Go + nginx HTTP and Go + nginx FCGI: https://gist.github.com/hgfischer/7965620

FCGI, even via a unix socket, seems to be substantially slower. Of course, remember to take benchmarks with a grain of salt, but it's still worth considering (and perhaps bench on your own system).

Brad Fitzpatrick

unread,
Mar 13, 2014, 7:40:46 PM3/13/14
to Matt Silverlock, golang-nuts
Go's FCGI hasn't been heavily used or optimized.  Its HTTP server has.



--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages