Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

136
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!