Hello, I'm writing to add more information.
I've done a few test to compare ssh -L and stunnel4 with spiped.
In 5 seconds, the server could run 50 queries with spiped. With ssh -L, the server ran 2700 queries. And with stunnel4, it ran 3000 queries.
Always testing with the same hardware and same network.
Am I missing something? I've used wireshark to capture traffic and noticed big gaps between packets in Spiped (I'm not expert at all regarding TCP). Instead with, ssh -L there are no gaps.
Is there any kind of buffering in spiped?
I guess the problem is the latency added in every query. This shouldn't be a problem regarding bandwith.
Thanks!