Show HN: Open-source non-blocking NIO Java HTTP Server

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • java-http

    A full featured, stand-alone, high-performance HTTP server and client written entirely in plain Java

  • Thanks for the feedback. Full disclosure, I work for the company which open sourced this project.

    I haven't been following loom closely, but it appears there are still pieces being put in the Java SE for it and it hasn't been fully delivered.

    For instance, in java 19, virtual threads are still in preview[0].

    If you wanted to build a web server running on a LTS of Java with loom, you'd have to wait until Sep 2023[1] (though of course you could write code against versions 19+ too).

    I think it'd be great to file a feature asking for loom support[2], but do you really think loom is ready to be the foundation of a prod ready web server right now?

    Sorry if that sounds like FUD, but I truly don't know. the two projects[3][4] linked in the infoq article are explicitly experimental or demo apps.

    That said, I did find this thread of projects that support loom now[5].

    0: https://www.infoq.com/news/2022/09/java19-released/

    1: https://www.oracle.com/java/technologies/java-se-support-roa...

    2: https://github.com/FusionAuth/java-http/issues

    3: https://github.com/rokon12/project-loom-slides-and-demo-code

    4: https://github.com/nipafx/loom-lab

    5: https://twitter.com/nipafx/status/1567448335367151616

  • Apache Tomcat

    Apache Tomcat

  • Regarding the venerable Tomcat, they [somewhat] recently added support for Unix domain sockets.

    * https://github.com/apache/tomcat/pull/402

    * https://github.com/apache/tomcat/pull/532

    We fronted the server with haproxy LTS. Our initial testing showed roughly and order of magnitude [10x] increase in the number of requests the server could handle.

    It's not completely plug-and-play; we still had a write a custom valve to set the request remote ip address and some other TCPish stuff, but nevertheless the capacity far outstripped our need for the technology.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • Thanks for the feedback. Full disclosure, I work for the company which open sourced this project.

    I haven't been following loom closely, but it appears there are still pieces being put in the Java SE for it and it hasn't been fully delivered.

    For instance, in java 19, virtual threads are still in preview[0].

    If you wanted to build a web server running on a LTS of Java with loom, you'd have to wait until Sep 2023[1] (though of course you could write code against versions 19+ too).

    I think it'd be great to file a feature asking for loom support[2], but do you really think loom is ready to be the foundation of a prod ready web server right now?

    Sorry if that sounds like FUD, but I truly don't know. the two projects[3][4] linked in the infoq article are explicitly experimental or demo apps.

    That said, I did find this thread of projects that support loom now[5].

    0: https://www.infoq.com/news/2022/09/java19-released/

    1: https://www.oracle.com/java/technologies/java-se-support-roa...

    2: https://github.com/FusionAuth/java-http/issues

    3: https://github.com/rokon12/project-loom-slides-and-demo-code

    4: https://github.com/nipafx/loom-lab

    5: https://twitter.com/nipafx/status/1567448335367151616

  • loom-lab

    Experimenting with Project Loom

  • Thanks for the feedback. Full disclosure, I work for the company which open sourced this project.

    I haven't been following loom closely, but it appears there are still pieces being put in the Java SE for it and it hasn't been fully delivered.

    For instance, in java 19, virtual threads are still in preview[0].

    If you wanted to build a web server running on a LTS of Java with loom, you'd have to wait until Sep 2023[1] (though of course you could write code against versions 19+ too).

    I think it'd be great to file a feature asking for loom support[2], but do you really think loom is ready to be the foundation of a prod ready web server right now?

    Sorry if that sounds like FUD, but I truly don't know. the two projects[3][4] linked in the infoq article are explicitly experimental or demo apps.

    That said, I did find this thread of projects that support loom now[5].

    0: https://www.infoq.com/news/2022/09/java19-released/

    1: https://www.oracle.com/java/technologies/java-se-support-roa...

    2: https://github.com/FusionAuth/java-http/issues

    3: https://github.com/rokon12/project-loom-slides-and-demo-code

    4: https://github.com/nipafx/loom-lab

    5: https://twitter.com/nipafx/status/1567448335367151616

  • zio-http

    A next-generation Scala framework for building scalable, correct, and efficient HTTP clients and servers

  • What's the hardware being used for your test? I get 55k RPS with a basic 200 responder with zio-http[0] (which uses Netty) on my i5-6600K, and over 20k RPS for an e2e POST endpoint that does write batching to postgres (committing the insert before responding with the db generated id). Postgres, client (vegeta[1]), and the app all on the same machine. I think that was with keep-alive, I think like 256 clients for the basic responder and 1024 for the one that writes to the db. There's a recently merged PR for zio-http that does 1M req/s on whatever machine they test on[2] so Netty can absolutely scale to high RPS.

    [0] https://github.com/zio/zio-http

    [1] https://github.com/tsenart/vegeta

    [2] https://github.com/zio/zio-http/pull/1659

  • Vegeta

    HTTP load testing tool and library. It's over 9000!

  • What's the hardware being used for your test? I get 55k RPS with a basic 200 responder with zio-http[0] (which uses Netty) on my i5-6600K, and over 20k RPS for an e2e POST endpoint that does write batching to postgres (committing the insert before responding with the db generated id). Postgres, client (vegeta[1]), and the app all on the same machine. I think that was with keep-alive, I think like 256 clients for the basic responder and 1024 for the one that writes to the db. There's a recently merged PR for zio-http that does 1M req/s on whatever machine they test on[2] so Netty can absolutely scale to high RPS.

    [0] https://github.com/zio/zio-http

    [1] https://github.com/tsenart/vegeta

    [2] https://github.com/zio/zio-http/pull/1659

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts