Skip to content

nikhil-bora/dropwizard-loom

 
 

Repository files navigation

dropwizard-loom

A quick and dirty experiment running Dropwizard on an early-access build of Project Loom.

This is incomplete and not a representative test at present.

Key points:

  • Dropwizard, as a framework built atop Jetty, can be trivially made to use Fibers instead of Threads for servicing requests. See FiberServerFactory and FiberBackedThreadPool. The latter is almost entirely lifted from this mailing list post.
  • Fibers seem to give significant performance improvements (especially tail latency).
  • As expected, Loom is early access and some crashes have been observed.

Building

Build inside a Docker image that includes the Loom variant of JDK14:

$ docker build -t dropwizard-loom .

Running

$ docker run -p 8080:8080 dropwizard-loom

Testing performance

Configuration

Whether or not we're using Fibers or Threads depends upon configuration. To switch, edit config.yml.

Set server.type to default to use Threads, or fiber to use Fibers.

After changing configuration, the image should be rebuilt.

Testing performance

Use slow-cooker to generate load, e.g.:

$ docker run --net host -it buoyantio/slow_cooker -qps 10 -concurrency 100 http://localhost:8080/

Slow cooker does not ramp up traffic slowly, so it is advised not to start with high (e.g. 1000+) concurrency and instead increase concurrency in steps.

TODOs

  • Switch away from using gradle run to run the service, as this is not a realistic way to run a service
  • Set up repeatable test harness for running performance trials and measuring JVM stats
  • Set up more representative tests than just current ping-pong endpoint
  • Write up observed behaviour - including performance improvements and crashes

About

Super-experimental deployment of Dropwizard on Project Loom Early Access JDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 51.5%
  • Kotlin 35.6%
  • Dockerfile 12.9%