Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

456
Vistas
GridFS with location-based sharding

Is there any way to shard the gridFS files and chunks based on a location information ?

I want to setup a mongo configuration with sharding and replication for handling multi-sites and guaranteeing that the data produced on one site remains accessible even if the sites are isolated.

I followed the following documentation from mongo and it works just perfectly for the standard collections but not for GridFS.

https://docs.mongodb.com/v3.2/tutorial/sharding-segmenting-data-by-location/

All I found for GridFS was _id based or file_id based sharding. By now the only solution I have would be to use different GridFS prefixes which means different collections and to shard them each on a given site.

I'm using :

  • mogodb 3.2
  • Java driver
  • Python driver

Thanks for any advice.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I found an answer on StackExchange : How to define shardKey on GridFS collections to achieve Location/Data Centre affinity (MongoDB)

Given that the only possibility is to shard the chunks on the ID, the idea is to use MongoGridFSCreateOptions to force a location-based ID to the chunks.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda