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

137
Visualizações
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 Respostas
Responde à pergunta

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 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