0

I am trying to build the following infrastructure.

  • Server 1 - DB Server
  • 2 - Web server to host the web app itself Server
  • 3 - Web server for serving web app static files (like product images, css, js etc) to relieve Server 2 load for static content and let it only process the dynamic part.

I am trying to avoid an object storage like AWS S3 or DO Spaces as I am not really interested into that so what kind of server software shall I use on Server 3 to fulfill its purpose in a good manner in terms of performance?

Thanks

Thomas Ward
  • 72,494
  • 30
  • 173
  • 237
Adrian George
  • 3,391
  • 7
  • 23
  • 29
  • Software recommendation is typically offtopic because it's highly opinion driven. I have some ideas on this, but if you're going to be doing dynamic content you really need a full blown caching CDN, not just another 'server' for the static assets. Because otherwise you'll need to configure your site with *multiple* domain interactions on the website code side of things - static assets in one domain, the rest in the normal domain. – Thomas Ward Jun 28 '21 at 14:33
  • @ThomasWard Yes. I can easily configure the ADMIN part of the website to handle files management on a remote server (Server 3), and the CLIENT part to serve the files from a subdomain like assets.domain.com . I am not really interested in a CDN because the website users are located in one single country. But on the top of the assets.domain.com, I would use a CDN like Cloudflare . – Adrian George Jun 28 '21 at 14:40
  • Then ignoring points 1 and 2, because you seem to have that figured out, how does your *site* want you to handle static assets? S3-style integration? (hint: there are self-hosted S3-style storage solutions out there that're free!) Direct SFTP/FTP/SSH? How you set up *that* static assets server is going to be entirely dependent on your site and what it can accept and handle. – Thomas Ward Jun 28 '21 at 14:42
  • @ThomasWard I was not interested in S3-style storage. The ADMIN (Server 4) File Manager would be programmed to upload / manage files directly on Server 3 which is solely responsible for files storage and serving them. The idea is that the web servers must be Apache due to some specific things the application requires (Server 2 and 4, admin and client). But the files servers I was opting for NGINX as it seems to serve files much better than Apache, and here I am stuck on this decision. And I was curios if there are any other alternatives of Nginx / Apache (except Lightspeed) – Adrian George Jun 28 '21 at 14:48
  • Apache and NGINX are the two main ones. There's lighttpd and others, but APache and NGINX own the market shares. – Thomas Ward Jun 28 '21 at 14:54
  • @ThomasWard that clear. But in terms of architecture and choosing to store the static files under a subdomain on a different server, do you think is a good practice and helpful in terms of perfomance overall? Secondly, I think this would help me to easily load balance the client app by instantinting multiple web server behing a load balancer, without the need to replicate all static files using a NFS server/client – Adrian George Jun 28 '21 at 15:04

0 Answers0