A simple Dockerized http server written in Akka + Spray (spray-can) framework
1.9K
Repository name in Docker Hub: williamyeh/spray-httpserver
This repository contains Dockerized spray-can simple-http-server example, published to the public Docker Hub via automated build mechanism.
The app is mainly used as a benchmark target for evaluating the performance of Akka + Spray framework.
This docker image contains the following software stack:
OS: Debian jessie.
Java: Oracle JDK 1.7.0
Scala: 2.11.4
Sbt
spray-can simple-http-server example, built on top of Akka + Spray framework.
$ docker pull williamyeh/spray-httpserver
Basic usage:
$ docker run williamyeh/spray-httpserver
Expose HTTP port:
$ docker run -p 8080:8080 williamyeh/spray-httpserver
Pass additional JVM options:
$ docker run williamyeh/spray-httpserver \
-XX:+UseG1GC -Xms8G -Xmx8G -XX:+PrintGCDetails
List all endpoints of the server:
$ curl http://CONTAINER_IP:8080/
First, start the server (preferably in daemon mode) with a name (e.g., spray):
$ docker run -d --name spray williamyeh/spray-httpserver
Next, benchmark the server with wrk (Dockerized version williamyeh/wrk).
Simple benchmark - HTML content:
$ docker run --link spray:httpserver williamyeh/wrk \
http://httpserver:8080/
Short text benchmark - test the "ping/pong" service:
$ docker run --link spray:httpserver williamyeh/wrk \
http://httpserver:8080/ping
Short text + server logging benchmark - test the "echo" service:
$ docker run --link spray:httpserver williamyeh/wrk \
http://httpserver:8080/echo/the_text_to_be_echoed
Content type
Image
Digest
sha256:76f2405b0…
Size
509.6 MB
Last updated
over 11 years ago
docker pull williamyeh/spray-httpserver