By teckwei914
First off, I’ll explain my situation to you. I’m new to Nginx.What I know point of using load balancing/reverse proxy is to improve performance and reliability by distributing the workload across multiple servers. It work fine with dynamic/static content. But i’m not understand while it working with image/video file. Let say below is mine Nginx config file
upstream backend {
server backend1.example.com;
server backend2.example.com;
server backend3.example.com;
}
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://backend;
}
}
I’m building android/ios application which will request image by the url. Example i will request example.com/picture/image.jpg but i’m not quite understand what should i do when i request image,
I have few question here.
First while i request an image/video file, did i need to save all image into those 3 backend server?
Second if I just save it to a seperate server which only store image then what is the point of load balancing with image/video file since reverse proxy is to improve performance and reliability by distributing the workload across multiple servers?
Any help will be my life saver please help me getting out of this struggle.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Yes. When using this type of setup the content returned from all three backend servers should be identical so you would have to host the content in all three places. This can be accomplished either by having three servers that keep in sync with all your content, or three worker nodes that process requests but use a shared data store (NFS, object store, etc) to host the actual content. If you use a shared central location for your files the individual nodes would handle the workload of processing the request and delivering the file to the end user.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.