Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

280
Visualizações
Best way to store files on social network

Im using Mongo database , PHP , Nodes.js and have a problem with saving files .

since : Files size may be more than 1PB (1000 TB) .

In my mind two ways to do it :

  1. Save files on server as file ( jpg , mp3 , mp4 , ... )
  2. Save files on Mongo Database on post ( bit , ... )

Witch is better ?

If you have other solution please let me know about that .

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

For large data storage, you usually don't want to store the giant data files (like images, music files, video files) itself in a database.

Instead, store the large files in the file system (probably across multiple drives/servers) and you can store a filename/volume reference in the database along with any other relevant meta data.

This will also allow you to stream these files directly from the file system to the user (upon browser request) more efficiently rather than having to translate them from database format into what you would send the user.

And, if you're going to have a ton of storage, you should probably design your system from the beginning to be able to easily use cloud storage services like AWS. I know some of the people behind a popular photo sharing service and they switched over to using AWS for image storage, saved a lot of money and got better performance and easier redundancy. If you aren't already planning to start with a hosting service, you should be thinking about how you would move at least part of your service to one over time.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda