Answer the question
In order to leave comments, you need to log in
How to set up a file server on the nginx balancer?
At the moment, this named infrastructure in the project:
1. Load Balancer - balances the load between two servers + gives static files
2. Web Server 1,2 - backend (php scripts)
Task: Remove the load from the backend servers by attaching a file server to the balancer , which will distribute files from the main domain, according to the following scheme:
How to implement it?
Answer the question
In order to leave comments, you need to log in
Judging by the diagram, you need to create one or more locations that will describe your static files, and proxy them to the File server. Perhaps with a fallback to the web server*.
You may also need to configure proxy_cache* if the balancer is not only a balancer, but also a cache. Or, perhaps, you don’t need a separate file server at all, but caching statics is enough.
In general terms, without knowing the intricacies of your project, it is not realistic to give a specific answer on how you can properly rebuild your infrastructure, in fact.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question