Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Serving static content from another server. Reverse proxy or remote mount?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Serving static content from another server. Reverse proxy or remote mount?

HakimHakim Member

Hi,
Here is my use case: Server A which store all static contents. Server B which will server the contents from the server A. Server B is only public facing.

Here's my current implementation: Server A serving static contents over HTTP protocol. Web server here is nginx and only server B is allowed through firewall. Server B is running as nginx reserve proxy for server A.

Now is this the ideal solution for this use case? Or should I mount the server A's directory into server B & server content from there? If so, nfs, sftp, ftp, samba, s3 etc. which one is better for this?

Latency between this two server is withing 10ms.

Thanks

Comments

  • 6 of one and half a dozen of the other, really.

    Thanked by 1Hakim
  • @dahartigan said:
    6 of one and half a dozen of the other, really.

    ^this.

    Makes no difference, just matters what you prefer to manage.

    Thanked by 1Hakim
  • rm_rm_ IPv6 Advocate, Veteran
    edited August 2021

    Reverse proxy is the more straightforward solution.

    For a remote mount, you could gain the benefit of file-based caching, but it's not guaranteed and depends on the mount options, server settings and such. More concerning, the mount seems more brittle, as if the storage server goes down, you could face long hangs of accessing processes on the frontend server, until the timeout is exceeded. Or then need to tune the timeouts to a lower value... Also if they reboot at the same time, if the storage server takes longer to boot, the mount might not succeed, and you need to plan for that as well. So you get the point.

    If you want to have some caching on the frontend server, could just set up local caching of reverse-proxied content in nginx.

Sign In or Register to comment.