i am working on a website which deploy on web farms to serve high traffic. where should i store user uploaded files? is it wise to store uploaded files in the file system of the same website and synchronize these files in all web servers(web farm)? or should i use another server to store all uploaded files in this server to store files in a central location? if separate file server will be a better choice, than how can i pass files from web server to that file server efficiently? or should i upload files directly to that file server?
How and where to store user uploaded files in high traffic web farm scenario website?
3k views Asked by Inam Jameel At
3
There are 3 answers
1
Matthew
On
Have you considered using Amazon S3 to store and serve user-uploaded files?
Otherwise, a central file server in your data center makes sense. You could mount the storage locally on each of your web servers using NFS or similar.
However you choose to store these files, you should always serve user-provided files from a different domain to avoid cross-domain exploits.
0
Joneph O.
On
You asked about how Facebook stores photos. You might want to read the following article:
Needle in a haystack: efficient storage of billions of photos
Related Questions in SYNCHRONIZATION
- How to avoid concurrent access to a resource?
- Multiple jQuery slideshows won't stay in sync
- How to ensure data synchronization across threads within a "safe" area (e.g not in a critical section) without locking everything
- Multiple locks of one method from multiple objects
- laravel sync() equivalent for OneToMany relation
- git - Why reset --hard seems to be always needed
- LDAP Directory Synchronization Tools
- Migrating Nexus repository manager
- Implement two way syncing with Mysql In Iphone
- spin_lock before writing status register
- What's the best way to implement a single consumer, multiple producer scenario using Python?
- Why only mark() and reset() method are synchronized in java.io.InputStream?
- Any tools available for auto syncing the .js files
- Order of execution of Threads waiting for a synchronised block
- No Synchronize Model with Database in Mysql Workbench
Related Questions in FILE-UPLOAD
- iOS 8.3 Safari crashes on input type=file
- Joomla backend component file upload for custom component
- Android progress bar for file upload is showing only 0 and 100
- page.FindControl returns Null when looking for FileUpload Control
- Express - Multiparty/Formidable unable to parse files greater than 100kb on Ubuntu. Callback of Parse is not called at all
- React-native upload image to amazons s3
- Restart uploading at another page by jQuery/javascript?
- File upload web api 2.0 error after deployment on IIS 8.5
- Accessing Images outside of meteor project
- How to upload a photo in Meteor to S3 and have it sync to database item?
- How to create file upload like gmail?
- File upload via h:inputfile (prettyfaces) does not work
- Upload file with Spring MVC
- S3 direct bucket upload: success but file not there
- Can the uploadcare widget be used without the uploadcare service?
Related Questions in FILESYSTEMS
- What kernel level functions are called when we perform write in ext3 file system?
- How to save a file to desired location in c++?
- MongoDB over Traditional File Based System
- How to reliably detect that an atomic move of a directory failed because the target already exists
- Meteor - Create a new folder in the public directory on account creation
- Storing images in MSSQL vs Disk
- Why segment files into chunks for HTTP streaming?
- Difference between stdout and /dev/stdout
- find and remove all closed files that are not modified in some-time
- TypeScript + Node.js FileSystem issue
- Scan folders with non English letters in a given directory
- unknown field 'ioctl' specified in initializer
- how can i encrypt every file with a different key using encFS
- How is a file loaded in the FAT file system?
- Ext.device.filesystem.FileEntry.read() - type: "text" returns blank file
Related Questions in WEB-FARM
- Web farm vs Clustering vs Load balancing IIS
- How to know whether the file has been changed on same server or has transferred from another server in asp.net
- What is a farm, as opposed to a grid or a cluster?
- Authentication with a Web farm
- SessionID changing across different instances in Azure (and probably in a web farm)
- is there an imagehandler in blogengine.net that will store the images in the database?
- How to scale Node.js application in standard way locally and between servers (cluster API is still experimental)?
- Webfarm authentication
- asp.net mvc and web farm
- ASP.NET Identity Core: invalid token for password reset on web farm
- ASP.NET MS Chart can I use Http Handler to Read and Write the Tempory Image from a web service
- MVC 3 tempdata container disadvantages
- Load balancing Vs MyMethod
- Set the default focus of an aspx page onto a button
- Web Farm with IIS10 Servers | Content Server: HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process)
Related Questions in HIGH-TRAFFIC
- Create a Linux packet splitter
- PHP MongoDB driver opens many connections on slow query
- Dealing with huge traffic - online ticket website
- I need suggestions for large-scale web site
- How to serve cached ruby apps from nginx rather than unicorn?
- High Speed Internter can fight against Ddos Attack
- Hosting questions for a "high" traffic rails application
- How not to be labelled as a spammer by Google when using GMail as a mail server?
- Apache 2.4 php 7.2 Apache ( php module) increase max connections to handle 10000
- High traffic - Multiple requests to set same memcached key?
- Handle concurrent requests to update the resources
- PHP JpGraph -- dynamic image creation in same directory for multiple users
- Why always "Invalid argument supplied for foreach"
- High traffic spikes on certain images, serve these from Amazon S3?
- How to architect a video site, from a performance point of view
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
For security reasons you want to serve the files from a different sub-domain anyways. This is easier by dedicating one server for these files, if the traffic for these files warrants it, but that also creates a single point of failure and bottleneck which you probably want to avoid.
You can have all web servers serve the files from a central file server or local cached copies. This depends a lot on if the files ever change.