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

141
Vistas
node js elasticsearch requests with compression headers are rejected

I'm using node js elasticsearch library and I'm indexing items. I'm trying to compress the traffic to Elasticsearch by adding a gzip header like so:

    elasticClient.index({
        body: body,
        index: index,
        type: type,
        id: id,
        headers: {
            'Content-Encoding': 'gzip'
        }
    }, function (err, resp) {

    });

Without the gzip header the request works fine, but when I include it I get a socket hang up. I've read that there is an elasticsearch configuration http.compression: true, but if I understood correctly, it refers to compression of ES responses and not to requests. Is there anything I can do to compress my requests? Thanks.

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

0

The elasticsearch module internally manages the requests properly and takes care of issues like compression, connection pooling, persisting connections etc. So you don't have to think about these issues. You can verify it from their codebase if you wish

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