In my application; users can upload videos, and I want to save them to the file system, not the database. If I use Amazon Web Services (AWS) and use only one instance of EC2 with EBS (for storage), that's fine. But if I use autoscaling or multiple instances of EC2; then, if the user uploads the video, he will be saved on one of EC2 (associated with one of the EBS). Next time, if the user logs in (or if the session identity does not exist, and then if the next user request goes to another instance of EC2), how will he access his video?
What is the best solution for this problem? I use S3 the only solution, but for this I canβt just make java.io.File .. I think then I will have to use the AWS SDK api to access the downloaded videos. But won't it be slower?
Is there a better solution?
source
share