We will use Apache and Redis containers to test our eBPF tools.
docker run -dit --name tecmint-web -p 80:80 -v /home/user/website/:/usr/local/apache2/htdocs/ httpd:2.4
vim /home/user/website/docker.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>A HTML file in Apache server</title>
</head>
<body>
<h1>A test HTML file for Apache</h1>
</body>
</html>
docker run --rm jordi/ab -k -c 10 -n 1000 http://x.x.x.x:80/docker.html
x.x.x.x is the IP of the host (VM or PM) in which the benchmark container is running.
We can run Redis server container and its benchmark container in two modes: intra-host mode and inter-host mode. In intra-host mode, the two containers are running in the same host, while in inter-host mode, they are running in different hosts.
docker run —name redis -d redis
docker run -it --rm --link redis:redis clue/redis-benchmark —n 10 -c 1
docker run -p 6379:6379 —name redis -d redis
docker run -it --rm --link redis:redis clue/redis-benchmark -h x.x.x.x -p 6379 —n 10 -c 1
x.x.x.x is the IP of the host in which the Redis server container is running.