Today I just wanted to know which of these options is faster:
- Go HTTP standalone
- Nginx proxy to Go HTTP
- Nginx fastcgi to Go TCP FastCGI
- Nginx fastcgi to Go Unix Socket FastCGI
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "os" | |
| "time" | |
| ) | |
| const numWorkers = 3 |
| package main | |
| import ( | |
| "code.google.com/p/go.net/websocket" | |
| ) | |
| type connection struct { | |
| // The websocket connection. | |
| ws *websocket.Conn |
| package main | |
| import ( | |
| "container/list" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "log" | |
| "net/http" |
| eventsource | |
| go-eventsource | |
| client/client |
| package main | |
| import ( | |
| "bytes" | |
| "code.google.com/p/go.crypto/ssh" | |
| "fmt" | |
| "log" | |
| "net" | |
| "os" | |
| ) |
| package main | |
| import ( | |
| "bytes" | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "fmt" | |
| "github.com/icub3d/wrapio" | |
| "io" |
curl localhost:3000/hello
{"hello": "world"}
| <?php | |
| /** | |
| * Array to Text Table Generation Class | |
| * | |
| * @author Tony Landis <[email protected]> | |
| * @link http://www.tonylandis.com/ | |
| * @copyright Copyright (C) 2006-2009 Tony Landis | |
| * @license http://www.opensource.org/licenses/bsd-license.php | |
| */ | |
| class ArrayToTextTable |
| package main | |
| import ( | |
| "code.google.com/p/go.net/websocket" | |
| "net/http" | |
| "log" | |
| ) | |
| // all code is in an init function to avoid any name collisions |