4 ms·
With the machine she used, there are dozens of options. Node, go, Java, rust, crystal, h2o, will all easily outperform those numbers while offering a ton of fea
by jiofih 7y ago
With the machine she used, there are dozens of options. Node, go, Java, rust, crystal, h2o, will all easily outperform those numbers while offering a ton of features and robust ecosystems.
Anyone can cook up a plain http server, making a real application out of it is the other 98% of the work.
- derwiki 7y agoI tried running as simple an HTTP server as possible with go: package main import ( "fmt" "net/http" ) func main() { http.HandleFunc("/", func (w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Foo") }) http.ListenAndServe(":8088", nil) } and when I run it with `ab -c 100 -n 100000`, it falls over before 10k requests: $ ab -c 100 -n 100000 http://127.0.0.1:8088/ This is ApacheBench, Version 2.3 <$Revision: 1843412 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) apr_socket_recv: Operation timed out (60) Total of 6388 requests completed I'm extremely new to go so maybe I'm doing something wrong. Could someone help me understand?
- jiofih 7y agoYou probably need to increase max open sockets using `ulimit`. Plus ab kinda sucks, use wrk instead.
- derwiki 7y agoAhh this explains it: https://danielmendel.github.io/blog/2013/04/07/benchmarkers-beware-the-ephemeral-port-limit/ https://danielmendel.github.io/blog/2013/04/07/benchmarkers-...