[Pound Mailing List] Pound inspiration to develop another asyncronous reverse proxy

Emilio Campos <[email protected]> Tue, 5 Nov 2019 13:57:46 +0100
Newsgroups gmane.comp.web.pound.general
Message-ID <[email protected]>
--0000000000003fa3580596991115
Content-Type: text/plain; charset="UTF-8"

Good day, time ago in Zevenet we decided to develop a new reverse proxy
using asynchronous model but as simple and useful as a pound, so today we
are proud to announce that pound inspired us to develop a new proxy called
zproxy, zproxy has been deployed with the idea of high performance and
offering support to many features currently not in the main branch of
pound.

Zproxy is mostly compatible with the major pound directives, including
additional features like WebSocket support, API JSON management among other
features.

More information about features and source code in the following URL:
https://github.com/zevenet/zproxy

Man is in the following URL:
https://github.com/zevenet/zproxy/tree/master/docs

Already created package for buster in the following repository:
http://repo.zevenet.com/ce/v5/pool/main/z/zproxy/zproxy_0.1.1-5.10.1_amd64.deb

The following lines give an idea about how zproxy is powerful compared with
the current pound or the very well known haproxy, so let us show you some
metrics:

Client command for stress:
./wrk -d 15 -t 10 -c 400 http://172.16.1.1:80/hello.html

Pound running as a load balancer, the used version for the test the forked
of the following GitHub: https://github.com/graygnuorg/pound based in pound
2.8a+openssl1.1 support
Result:
Running 15s test @ http://172.16.1.1:80/hello.html
  10 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     5.97ms   21.62ms 275.10ms   95.73%
    Req/Sec    11.28k     9.22k   65.39k    59.49%
  834725 requests in 15.10s, 221.31MB read
Requests/sec:  *55281.33*
Transfer/sec:     14.66MB

zproxy 0.1.2 running as a load balancer compiled from our public  GitHub:
https://github.com/zevenet/zproxy v 0.1.2
Result:
Running 15s test @ http://172.16.1.1:80/hello.html
  10 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     8.13ms   63.38ms   1.01s    98.68%
    Req/Sec    23.97k     3.25k   56.34k    94.30%
  3599282 requests in 15.10s, 0.93GB read
  Socket errors: connect 0, read 1, write 0, timeout 0
Requests/sec: *238374.98*
Transfer/sec:     63.19MB

haproxy in buster version: 1.8.19-1
Running 15s test @ http://172.16.1.1:83/hello.html
  10 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    97.55ms  235.66ms   1.24s    87.56%
    Req/Sec    14.93k     2.26k   30.92k    80.93%
  2243804 requests in 15.10s, 543.52MB read
  Socket errors: connect 0, read 0, write 0, timeout 7
Requests/sec: *148604.42*
Transfer/sec:     36.00MB

If you compare Requests/sec and latency, results are very impressive. Here
you can see how zproxy is almost 100k requests per second faster than
haproxy and almost 4,3 times faster than pound.

To be neutral, the 3 tests have been executed with the same Client, same
load balancer and receiving traffic with the same backends.
Used hardware in server: model name : Intel(R) Xeon(R) CPU E3-1245 v5 @
3.50GHz (8 cores)
Used hardware in client: model name : Intel(R) Core(TM) i5-6500 CPU @
3.20GHz (8 cores)
Used hardware in backend: model name : Intel(R) Xeon(R) CPU E3-1245 v5 @
3.50GHz (8 cores)

Configuration file for pound and zproxy as the majority of directives are
compatible:

##GLOBAL OPTIONS
User "root"
Group "root"
LogLevel 0
## check timeouts:
Timeout 45
ConnTO 20
Alive 10
Client 30
Control "/tmp/webhttp_pound.socket"

ListenHTTP
Err414 "/usr/local/zevenet/config/webhttp_Err414.html"
Err500 "/usr/local/zevenet/config/webhttp_Err500.html"
Err501 "/usr/local/zevenet/config/webhttp_Err501.html"
Err503 "/usr/local/zevenet/config/webhttp_Err503.html"
Address 172.16.1.1
Port 80
xHTTP 4
RewriteLocation 1


Service "backends"
BackEnd
Address 172.16.1.13
Port 80
End
BackEnd
Address 172.16.0.12
Port 80
End
#End
End



Configuration file for haproxy

global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd
listeners
stats timeout 30s
user haproxy
group haproxy
daemon
nbproc 8
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
#maxconn 1000000
# Default ciphers to use on SSL-enabled listening sockets.
# For more information, see ciphers(1SSL). This list is from:
#  https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
# An alternative list with additional directives can be obtained from
#
https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=haproxy

defaults
log global
mode http
option httplog
option dontlognull
        timeout connect 5000
        timeout client  50000
        timeout server  50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
frontend Local_Server
    bind 172.16.1.1:83
    mode http

      default_backend My_Web_Servers

backend My_Web_Servers
    balance roundrobin
    option forwardfor
    server web1.example.com  172.16.0.12:80
    server web2.example.com  172.16.1.13:80

Thanks and regards

--0000000000003fa3580596991115
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Good day, time ago in Zevenet we decided to develop a new =
reverse proxy using asynchronous model but as simple and useful as a pound,=
 so today we are proud to announce that pound inspired us to develop a new =
proxy called zproxy, zproxy has been deployed with the idea of high perform=
ance and offering support to many features currently not in the main branch=
 of pound.=C2=A0<div><br></div><div>Zproxy is mostly compatible with the ma=
jor pound directives, including additional features like WebSocket support,=
 API JSON management among other features.=C2=A0</div><div><br></div><div>M=
ore information about features and source code in the following URL:</div><=
div><a href=3D"https://github.com/zevenet/zproxy">https://github.com/zevene=
t/zproxy</a><br></div><div><br></div><div>Man is in the following URL:</div=
><div><a href=3D"https://github.com/zevenet/zproxy/tree/master/docs">https:=
//github.com/zevenet/zproxy/tree/master/docs</a><br></div><div><br></div><d=
iv>Already created package for buster in the following repository:=C2=A0</d=
iv><div><a href=3D"http://repo.zevenet.com/ce/v5/pool/main/z/zproxy/zproxy_=
0.1.1-5.10.1_amd64.deb">http://repo.zevenet.com/ce/v5/pool/main/z/zproxy/zp=
roxy_0.1.1-5.10.1_amd64.deb</a><br></div><div><br></div><div>The following =
lines give an idea about how zproxy is powerful compared with the current p=
ound or the very well known haproxy, so let us show you some metrics:</div>=
<div><br></div><div>Client command for stress:=C2=A0</div><div>./wrk -d 15 =
-t 10 -c 400 <a href=3D"http://172.16.1.1:80/hello.html">http://172.16.1.1:=
80/hello.html</a><br></div><div><br></div><div>Pound running as a load bala=
ncer, the used version for the test the forked of the following GitHub:=C2=
=A0<a href=3D"https://github.com/graygnuorg/pound">https://github.com/grayg=
nuorg/pound</a>=C2=A0based in pound 2.8a+openssl1.1 support</div><div>Resul=
t:</div><div>Running 15s test @ <a href=3D"http://172.16.1.1:80/hello.html"=
>http://172.16.1.1:80/hello.html</a><br>=C2=A0 10 threads and 400 connectio=
ns<br>=C2=A0 Thread Stats =C2=A0 Avg =C2=A0 =C2=A0 =C2=A0Stdev =C2=A0 =C2=
=A0 Max =C2=A0 +/- Stdev<br>=C2=A0 =C2=A0 Latency =C2=A0 =C2=A0 5.97ms =C2=
=A0 21.62ms 275.10ms =C2=A0 95.73%<br>=C2=A0 =C2=A0 Req/Sec =C2=A0 =C2=A011=
.28k =C2=A0 =C2=A0 9.22k =C2=A0 65.39k =C2=A0 =C2=A059.49%<br>=C2=A0 834725=
 requests in 15.10s, 221.31MB read<br>Requests/sec: =C2=A0<b>55281.33</b><b=
r>Transfer/sec: =C2=A0 =C2=A0 14.66MB<br></div><div><br></div><div>zproxy 0=
.1.2 running as a load balancer compiled from our public=C2=A0 GitHub:=C2=
=A0<a href=3D"https://github.com/zevenet/zproxy">https://github.com/zevenet=
/zproxy</a> v 0.1.2</div><div>Result:</div><div>Running 15s test @ <a href=
=3D"http://172.16.1.1:80/hello.html">http://172.16.1.1:80/hello.html</a><br=
>=C2=A0 10 threads and 400 connections<br>=C2=A0 Thread Stats =C2=A0 Avg =
=C2=A0 =C2=A0 =C2=A0Stdev =C2=A0 =C2=A0 Max =C2=A0 +/- Stdev<br>=C2=A0 =C2=
=A0 Latency =C2=A0 =C2=A0 8.13ms =C2=A0 63.38ms =C2=A0 1.01s =C2=A0 =C2=A09=
8.68%<br>=C2=A0 =C2=A0 Req/Sec =C2=A0 =C2=A023.97k =C2=A0 =C2=A0 3.25k =C2=
=A0 56.34k =C2=A0 =C2=A094.30%<br>=C2=A0 3599282 requests in 15.10s, 0.93GB=
 read<br>=C2=A0 Socket errors: connect 0, read 1, write 0, timeout 0<br>Req=
uests/sec: <b>238374.98</b><br>Transfer/sec: =C2=A0 =C2=A0 63.19MB<br></div=
><div><br></div><div>haproxy in buster version:=C2=A01.8.19-1</div><div>Run=
ning 15s test @ <a href=3D"http://172.16.1.1:83/hello.html">http://172.16.1=
.1:83/hello.html</a><br>=C2=A0 10 threads and 400 connections<br>=C2=A0 Thr=
ead Stats =C2=A0 Avg =C2=A0 =C2=A0 =C2=A0Stdev =C2=A0 =C2=A0 Max =C2=A0 +/-=
 Stdev<br>=C2=A0 =C2=A0 Latency =C2=A0 =C2=A097.55ms =C2=A0235.66ms =C2=A0 =
1.24s =C2=A0 =C2=A087.56%<br>=C2=A0 =C2=A0 Req/Sec =C2=A0 =C2=A014.93k =C2=
=A0 =C2=A0 2.26k =C2=A0 30.92k =C2=A0 =C2=A080.93%<br>=C2=A0 2243804 reques=
ts in 15.10s, 543.52MB read<br>=C2=A0 Socket errors: connect 0, read 0, wri=
te 0, timeout 7<br>Requests/sec: <b>148604.42</b><br>Transfer/sec: =C2=A0 =
=C2=A0 36.00MB<br></div><div><br></div><div>If you compare Requests/sec and=
 latency, results are very impressive. Here you can see how zproxy is almos=
t 100k requests per second faster than haproxy and almost 4,3 times faster =
than pound.</div><div><br></div><div>To be neutral, the 3 tests have been e=
xecuted with the same Client, same load balancer and receiving traffic with=
 the same backends.=C2=A0</div><div>Used hardware in server: model name	: I=
ntel(R) Xeon(R) CPU E3-1245 v5 @ 3.50GHz (8 cores)<br></div><div>Used hardw=
are in client: model name	: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz (8 core=
s)</div>Used hardware in backend:=C2=A0model name	: Intel(R) Xeon(R) CPU E3=
-1245 v5 @ 3.50GHz (8 cores)<div><br></div><div>Configuration file for poun=
d and zproxy as the majority of directives are compatible:=C2=A0</div><div>=
<br></div><div>##GLOBAL OPTIONS<br>User		&quot;root&quot;<br>Group		&quot;r=
oot&quot;<br>LogLevel 	0<br>## check timeouts:<br>Timeout		45<br>ConnTO		20=
<br>Alive		10<br>Client		30<br>Control 	&quot;/tmp/webhttp_pound.socket&quo=
t;<br><br>ListenHTTP <br>	Err414 &quot;/usr/local/zevenet/config/webhttp_Er=
r414.html&quot;<br>	Err500 &quot;/usr/local/zevenet/config/webhttp_Err500.h=
tml&quot;<br>	Err501 &quot;/usr/local/zevenet/config/webhttp_Err501.html&qu=
ot;<br>	Err503 &quot;/usr/local/zevenet/config/webhttp_Err503.html&quot;<br=
>	Address 172.16.1.1<br>	Port 80<br>	xHTTP 4<br>	RewriteLocation 1<br><br><=
br>	Service &quot;backends&quot;<br>		BackEnd<br>			Address 172.16.1.13<br>=
			Port 80<br>		End<br>		BackEnd<br>			Address 172.16.0.12<br>			Port 80<br=
>		End<br>		#End<br>	End<br><br><br><br>Configuration file for haproxy</div=
><div><br></div><div>global<br>	log /dev/log	local0<br>	log /dev/log	local1=
 notice<br>	chroot /var/lib/haproxy<br>	stats socket /run/haproxy/admin.soc=
k mode 660 level admin expose-fd listeners<br>	stats timeout 30s<br>	user h=
aproxy<br>	group haproxy<br>	daemon<br>	nbproc	8<br>	# Default SSL material=
 locations<br>	ca-base /etc/ssl/certs<br>	crt-base /etc/ssl/private<br>	#ma=
xconn 1000000<br>	# Default ciphers to use on SSL-enabled listening sockets=
.<br>	# For more information, see ciphers(1SSL). This list is from:<br>	# =
=C2=A0<a href=3D"https://hynek.me/articles/hardening-your-web-servers-ssl-c=
iphers/">https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/<=
/a><br>	# An alternative list with additional directives can be obtained fr=
om<br>	# =C2=A0<a href=3D"https://mozilla.github.io/server-side-tls/ssl-con=
fig-generator/?server=3Dhaproxy">https://mozilla.github.io/server-side-tls/=
ssl-config-generator/?server=3Dhaproxy</a><br><br>defaults<br>	log	global<b=
r>	mode	http<br>	option	httplog<br>	option	dontlognull<br>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 timeout connect 5000<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 timeout clie=
nt =C2=A050000<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 timeout server =C2=A050000<br=
>	errorfile 400 /etc/haproxy/errors/400.http<br>	errorfile 403 /etc/haproxy=
/errors/403.http<br>	errorfile 408 /etc/haproxy/errors/408.http<br>	errorfi=
le 500 /etc/haproxy/errors/500.http<br>	errorfile 502 /etc/haproxy/errors/5=
02.http<br>	errorfile 503 /etc/haproxy/errors/503.http<br>	errorfile 504 /e=
tc/haproxy/errors/504.http<br>frontend Local_Server<br>=C2=A0 =C2=A0 bind <=
a href=3D"http://172.16.1.1:83">172.16.1.1:83</a><br>=C2=A0 =C2=A0 mode	htt=
p<br><br>=C2=A0 =C2=A0=C2=A0 =C2=A0default_backend My_Web_Servers<br><br>ba=
ckend My_Web_Servers<br>=C2=A0 =C2=A0 balance roundrobin<br>=C2=A0 =C2=A0 o=
ption forwardfor<br>=C2=A0 =C2=A0 server <a href=3D"http://web1.example.com=
">web1.example.com</a> =C2=A0<a href=3D"http://172.16.0.12:80">172.16.0.12:=
80</a><br>=C2=A0 =C2=A0 server <a href=3D"http://web2.example.com">web2.exa=
mple.com</a> =C2=A0<a href=3D"http://172.16.1.13:80">172.16.1.13:80</a></di=
v><div><br></div><div>Thanks and regards<br><br></div></div>

--0000000000003fa3580596991115--

--
To unsubscribe send an email with subject unsubscribe to [email protected]
Please contact [email protected] for questions.