Reverse proxy reduces download speed

88 Views Asked by At

There are two servers: alpha and beta. Alpha is publicly accessible with the address alpha.com, and beta is in the local network of alpha at address 192.168.0.1, not publicly accessible. And let's call my computer home, which is not in the local network of alpha.

I am launching Jupyter Notebook servers on:

  • alpha at address alpha.com:2001
  • beta at address 192.168.0.1:2002
  • beta at address localhost:2003

additionally, I am setting up a nginx reverse proxy on alpha that links 192.168.0.1:2002 and alpha.com:2002. Also, I use ssh tunnel between localhost:2003 and alpha.com:2003 using the command ssh -fNT -L 0.0.0.0:2003:localhost:2003 beta

There are copies of a large fie (~20GB) on both servers; A.dat on alpha and B.dat on beta.

Below is the illustration of the setup:

         ______nginx________
        /                   \
    beta                    alpha ----------- home
     |  \______ssh__________/ |
     |                        |  
  "B.dat"                   "A.dat"
     |                        |
     |                   alpha.com:2001
192.168.0.1:2002  ---->  alpha.com:2002
localhost:2003    ---->  alpha.com:2003

I am putting a large file (~20GB) on both servers. I am loging in to each of the computers (by remote desktop) and downloading the file.

On the computer alpha:

  • downloading A.dat from alpha.com:2001: 130 MByte/sec
  • downloading B.dat from alpha.com:2002: 80 MByte/sec
  • downloading B.dat from alpha.com:2003: 90 MByte/sec
  • downloading B.dat from 192.168.0.1:2002 to alpha: 90 MByte/sec

On the computer beta:

  • downloading A.dat from alpha.com:2001: 80 MByte/sec

  • downloading B.dat from alpha.com:2002: 50 MByte/sec

  • downloading B.dat from alpha.com:2003: 50 MByte/sec

  • downloading B.dat from 192.168.0.1:2002: 60 MByte/sec

  • downloading B.dat from localhost:2003: 60 MByte/sec

On the computer home:

  • downloading A.dat from alpha.com:2001: 30 MByte/sec
  • downloading B.dat from alpha.com:2002: 5 MByte/sec
  • downloading B.dat from alpha.com:2003: 6 MByte/sec

We can see that there is high bandwidth between alpha and beta, and sufficiently high bandwidth between alpha and home (~30 MB/sec).

I cannot understand why the bandwidth is so low between home and beta through alpha. How can I fix this? Please let me know if more information is needed about the setup. Thanks in advance.

0

There are 0 best solutions below