D
D
Denis2018-12-29 05:42:14
Nginx
Denis, 2018-12-29 05:42:14

How to set up a file server on the nginx balancer?

At the moment, this named infrastructure in the project:
5c26dcfcc26b1695933562.jpeg
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:
5c26dc7c6f98e394161019.jpeg
How to implement it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Syomov, 2018-12-29
@kotomyava

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 question

Ask a Question

731 491 924 answers to any question