Live data from Hacker News

600K concurrent HTTP connections with Clojure and http-kit

http-kit.org

1–10 of 28 posts

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

#6

Does anyone know how they managed to not only bypass the C10k limit, but bypass it by a factor of 60?

From what I understand C10K was mostly a RAM limitation. As system ram got bigger the limit has naturally risen. Here are some guys hitting a million in Erlang.

http://blog.whatsapp.com/index.php/2011/09/one-million/

HN discussion for the above link. https://news.ycombinator.com/item?id=3028547

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

#8
post #5

Does anyone know how they managed to not only bypass the C10k limit, but bypass it by a factor of 60?

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 client). Some would mention Pedestal but it forces you to learn quite a few abstractions and is totally alien compared to the rest of the clojure web ecosystem and also only supports a single async "protocol" (SSE). But pedestal is about a full stack experience, integration with the client etc, so it certainly will attract other users.

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

#9
post #7

Does this process also have 600K threads?

No, it's evented, I think it's setup to use 4 worker threads by default.

[edit]

https://github.com/http-kit/http-kit/blob/master/src/org/htt...

https://github.com/http-kit/scale-clojure-web-app/blob/maste...

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

#10
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.

Post reply on HN