ktorio / ktor

Framework for quickly creating connected applications in Kotlin with minimal effort
https://ktor.io
Apache License 2.0
13.09k stars 1.07k forks source link

Chunk size should be configurable #1558

Open degroves opened 4 years ago

degroves commented 4 years ago

Subsystem ktor-http

Is your feature request related to a problem? Please describe. ChunkedTransferEncoding.kt uses a fixed chunk size of 4088 bytes.

Describe the solution you'd like The chunk size should be configurable.

Motivation to include to ktor Small chunk sizes can result in a lot of network overhead when transferring a large file. If a server serves up mainly large files, having a tunable chunk size can cut down on the overhead thus speeding up large file transfers.

oleg-larshin commented 4 years ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.