Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's it like to use a compiled language for a web server?


It's really nice. You can build your Go program, deploy it as a single binary and it just runs. No need to hide it behind nginx or some other dedicated web server. The Go http package is DoS hardened and very fast. It's refreshing how little mechanism there is.


How are the database libraries (postgres/mysql) these days? Last time I poked around (been a while) it seemed like most of them were pretty beta yet.


There's the new database/sql library (http://weekly.golang.org/database/sql), which is a general SQL interface backed by various driver implementations (http://code.google.com/p/go-wiki/wiki/SQLDrivers).


Good to see that has improved quite a bit. Thanks!


Well, even if I like go, I would not run a go program as root to listen on port 80.

Can you drop the privileges from within go like apache or nginx are doing it?



No need to hide it behind nginx or some other dedicated web server.

A contributor to Go says otherwise if SSL is involved: https://groups.google.com/d/msg/golang-nuts/yohrNK8lFhc/L1d6...


No need to hide it behind nginx or some other dedicated web server.

So, how do you serve static files?


> So, how do you serve static files?

http://weekly.golang.org/pkg/net/http/#FileServer


Because the Go compiler and linker are so darn fast, the extra compilation step is just a blip. It's not like working with Java or C++.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: