Apache Benchmark cache buster
Allows ab to bypass or invalidate cdn/web cache by passing random parameters
Shortcut using docker
https://github.com/j3ffrw/httpd/tree/cache_buster/2.4/alpine
Details of building Apache Benchmarch(httpd) from source
Linux Mint 19.1
- Build openssl
wget https://www.openssl.org/source/old/1.1.1/openssl-1.1.1e.tar.gz
tar xvzf openssl-1.1.1e.tar.gz
cd openssl-1.1.1e
mkdir /opt/ssl
./config --prefix=/opt/ssl --openssldir=/opt/ssl no-ssl2 shared zlib
make -j4
make install
- Test openssl
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ssl/lib /opt/ssl/bin/openssl version -a
echo "" | LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ssl/lib /opt/ssl/bin/openssl s_client -connect www.google.com:443
- Build httpd 2.4.43
wget https://downloads.apache.org//httpd/httpd-2.4.43.tar.gz
tar xvzf httpd-2.4.43.tar.gz
cd httpd-2.4.43/srclib
wget https://downloads.apache.org//apr/apr-1.7.0.tar.gz
tar xvzf apr-1.7.0.tar.gz
ln -s apr-1.7.0 apr
wget https://downloads.apache.org//apr/apr-util-1.6.1.tar.gz
tar xvzf apr-util-1.6.1.tar.gz
ln -s apr-util-1.6.1 apr-util
cd ..
# Apply ab.c.patch if desired
# https://github.com/j3ffrw/httpd/blob/cache_buster/2.4/alpine/ab.c.patch
./configure --with-included-apr --enable-static-ab --with-ssl=/opt/ssl/ --enable-ssl-staticlib-deps --enable-mods-static=ssl --enable-ssl
make -j4
- Test ab
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/ssl/lib ./support/ab -V
References: https://chrismiles.livejournal.com/21720.html https://rainbow.chard.org/2012/09/14/using-ab-to-benchmark-with-different-or-random-requests/
No comment
Say something
Thank you
Your post has been submitted and will be published once it has been approved.
OK
OOPS!
Your post has not been submitted. Please return to the page and try again. Thank You!
If this error persists, please open an issue by clicking here.
OK