Multiple connections to site allowing only 1 connection through proxy?(SOLVED)



  • Hi,

    I'm completely inexperienced with proxies and it's a bit difficult to find answers for this scenario as I have no clue which keywords to use.

    I'm load balancing 2 internet lines via 2 openvpn connections to a remote server in a datacenter.
    This server has a much higher bandwidth of course.
    To benefit from this setup I obviously need to make more than 1 connection to the destination.

    But I need to connect (http) frequently to a server that only allows 1 connection at a time.
    Obviously 1 connection from the high bandwidth server to the destination is much faster than 1 connection from my location so it wouldn't be that much of a loss if I just could connect multiple times to the server with the proxy to load balance this traffic.

    Is it possible to setup something like a transparent proxy at the remote server (with the vpn endpoints) that allows a http client to open multiple connections at once even if the destination allows just 1?

    I've tried squid with pretty much default settings, but it wouldn't let me connect multiple times in such cases.
    Of course I don't even know if squid is the answer for this or if there's anything at all that would make this possible.

    Thank you very much!


  • Netgate Administrator

    Not using http, it doesn't work like that. Http uses a single connection.
    What are you connecting to the required a high speed http connection? If you are downloading large files can you use some other protocol?

    Steve



  • Hi Steve,

    thank you for your answer!
    Those are multi-threaded downloads via http in split parts like with aria2c -x16 <http: ….="">So this is impossible to achieve?</http:>


  • Netgate Administrator

    if this is something you're doing sufficiently regularly to warrant some time setting up I would try some scripting maybe.
    You could download the file to the remote box over the fast connection using wget and then serve it up from there. Use http if thats easy for you or some other multi-connection protocol. A script on your local machine could pass the command to the remote box over ssh to fetch the file with the appropriate URL then check the remote download location until it is complete and initiate the transfer.
    I don't think there's any way of proxying the connection to combine multiple http connections into one large one.

    Steve



  • Thanks for your help and clearing this up :)