Live data from Hacker News

600K concurrent HTTP connections with Clojure and http-kit

http-kit.org

11–20 of 28 posts

Re: 600K concurrent HTTP connections with Clojure and http-kit

#11
post #8
post #5

Earlier quoted context omitted.

Its based on netty which surpassed c10k long ago. More generally modern socket concurrency is pretty high using epoll

It's not based on netty: > {:dependencies [[org.clojure/clojure "1.5.1"]]} netty is in the dev dependencies, but for benchmarking only I would guess. [edit] This project is one of the best thing that happened in the web area in clojure recently imho. Not only it is a game changer in performance/resource use, but it makes websocket and async in general trivial to use and actually production ready (same goes for its cl…

Ah, interesting, I should have looked deeper. Well they're both almost certainly based on java NIO then, which once again leads us to epoll and friends.

Re: 600K concurrent HTTP connections with Clojure and http-kit

#15

Y'know... that little "K" abbreviation on the end is a pretty important detail. I skimmed the article about three times, thinking to myself: "600 users... Really? Big deal." It wouldn't hurt to actually emphasize "600,000" by explicitly expressing all of the zeroes.

"That little K abbreviation" is kind of a common thing... I'm not sure what your experience is, but in order to understand a lot of what gets discussed on the web in terms of performance, you'll need to improve your attention to detail.

Re: 600K concurrent HTTP connections with Clojure and http-kit

#17
This does not measure 600k concurrent active connections because each client only sends a request once every 5-45s. To see how many concurrent active connections you can support you need to understand how much RAM each connection consumes and how much RAM is available to your application.

Re: 600K concurrent HTTP connections with Clojure and http-kit

#19

So? Not really impressed. WhatsApp are getting over 2M concurrent HTTP connections with Erlang in a production system. And this was 1 year ago. http://blog.whatsapp.com/index.php/2012/01/1-million-is-so-2...

The Whatsapp 2 million connection result was on a 24 core box with a ton of RAM. The Clojure benchmark was pulled off on a 4-core desktop. Also, Whatsapp connections are mostly idle, only a small fraction of users would be sending a message in any given second.

Edit: It looks like the test was run only on localhost, which also means that it artificially removes much of the processing and actual network I/O factors from the equation.

Re: 600K concurrent HTTP connections with Clojure and http-kit

#20
post #18

Java NIO has amazing performance. I'm surprised not more JVM languages taking advantage of it.

Netty has become the standard library for NIO on the JVM and is used widely by programmers in various JVM languages. It's also refreshing to see high performance NIO systems written without using Netty for a change.
Post reply on HN