lacklacklack opened a new pull request, #6106:
URL: https://github.com/apache/couchdb/pull/6106

   ## Overview
   
   Adds gzip compression for outbound HTTP responses when the client sends
   `Accept-Encoding: gzip`.
   
   The replicator now sends `Accept-Encoding: gzip` on outbound requests
   (`_bulk_docs`, `_revs_diff`, `_bulk_get`) and automatically decompresses
   gzip responses received from the remote server.
   
   ## Testing recommendations
   
   Run a replication and check the stats:
   
   ```bash
   # Start CouchDB
   ./dev/run --admin=admin:admin
   
   # Create DBs, add docs, replicate
   curl -X PUT http://admin:[email protected]:15984/source_db
   curl -X PUT http://admin:[email protected]:25984/target_db
   curl -X PUT http://admin:[email protected]:15984/source_db/doc1 \
     -H "Content-Type: application/json" \
     -d '{"data":"'$(python3 -c "print('x'*2000)")'"}'
   curl -X POST http://admin:[email protected]:15984/_replicate \
     -H "Content-Type: application/json" \
     -d 
'{"source":"http://admin:[email protected]:15984/source_db","target":"http://admin:[email protected]:25984/target_db"}'
   
   # Check stats — value should be > 0
   curl -s 
http://admin:[email protected]:15984/_node/_local/_stats/couch_replicator/responses_decompressed
 | python3 -m json.tool
   ```
   
   Automated tests: `couch_replicator_compression_tests` in 
`src/couch_replicator/test/eunit/`.
   
   ## Related Issues or Pull Requests
   
   Add request compression to replicator - 
https://github.com/apache/couchdb/pull/6013
   
   ## Checklist
   
   - [x] This is my own work, I did not use AI, LLM's or similar technology
   - [x] Code is written and works correctly
   - [x] Changes are covered by tests
   - [x] Any new configurable parameters are documented in 
`rel/overlay/etc/default.ini`
   - [x] Documentation changes were made in the `src/docs` folder
   - [ ] Documentation changes were backported (separated PR) to affected 
branches
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to