Using Speedus with Docker<

In this guide you will learn how to use Speedus acceleration software to enhance communications in Docker environments.

Accelerating intra-container data transfers<

In order to use Speedus to communicate applications or services running inside the same docker container, you just have to follow the default steps in the quickstart guide, no further steps are required.

Note

Running more than one application within a container is not a common scenario, so probably this is not your use case.

Accelerating inter-container data transfers<

In order to use Speedus to communicate applications running on different docker containers, two requisites have to be fulfilled for the Speedus protocols to work:

Once these prerequisites are met, you can use Speedus as you will do on every other scenario. Here you have an example using the official Speedus Docker image on Ubuntu, running the NetPipe benchmark:

# Run NPtcp server
docker run --rm --name speedus-ubuntu -v /dev/shm:/dev/shm \
    torusware/speedus-ubuntu speedus NPtcp &
# Run NPtcp client
docker run --rm --net=container:speedus-ubuntu -v /dev/shm:/dev/shm \
    torusware/speedus-ubuntu speedus NPtcp -h localhost

If you don't want to use the same network stack for both containers, you can just connect them using the IP address of the server container in the Docker bridge:

# Run NPtcp server
docker run --rm --name speedus-ubuntu -v /dev/shm:/dev/shm \
    torusware/speedus-ubuntu speedus NPtcp &
# Extract the container IP
SERVERIP=$(docker inspect -f {{.NetworkSettings.IPAddress}} speedus-ubuntu)
# Run NPtcp client
docker run --rm -e SERVERIP=$SERVERIP -v /dev/shm:/dev/shm \
    torusware/speedus-ubuntu speedus NPtcp -h $SERVERIP