Documentation | Latest releases | Get support
http-kit
Simple, high-performance event-driven HTTP client+server for Clojure
http-kit is a minimalist and highly efficient Ring-compatible HTTP client+server for Clojure.
It uses an event-driven architecture to support highly concurrent a/synchronous web applications, and features a simple unified API for WebSocket and HTTP long-polling/streaming.
Latest release/s
2023-06-30
2.7.0
: changes
See here for earlier releases.
Why http-kit?
Links below may point to the unmaintained and outdated legacy website. Efforts are underway to migrate and update info from there on the new community wiki.
-
Ring compliant: http-kit is an (almost) drop-in replacement for the standard Ring Jetty adapter. So you can use it with all your current libraries (e.g. Compojure) and middleware.
-
High performance: Using an event-driven architecture like Nginx, HTTP-kit is very, very fast. It comfortably handles tens of thousands of requests/sec on even midrange hardware. Here is another test about how it stacks up with others.
-
High concurrency: It's not only fast, but efficient! Each connection costs nothing but a few kB of memory. RAM usage grows O(n) with connections.
-
Clean, simple, small: Written from the ground-up to be lean, the entire client/server is available as a single ~90kB JAR with zero dependencies and ~3k lines of (mostly Java) code.
-
Sync or async: Synchronous is simple. Asynchronous is fast & flexible. With http-kit you get the best of both with a simple API that lets you mix & match to best fit your use case.
-
WebSockets and Comet: With great out-the-box support for both WebSockets and efficient handling of long-held HTTP requests, realtime web applications are a breeze to write.
Status
http-kit was created by @shenfeng, but is currently being maintained by its community.
A big thank-you to the current contributors for keeping the project going! Additional contributors very welcome: please ping me if you'd be interested in lending a hand.
Documentation
- Full documentation (getting started and more)
- Auto-generated API reference: Codox, clj-doc
License
Copyright © 2012-2023 Feng Shen and contributors.
Licensed under Apache 2.0.