Skip to content

Add download speed limit configuration option.#209

Merged
Bastian-Krause merged 5 commits into
rauc:masterfrom
benprisby:download-limit
May 19, 2026
Merged

Add download speed limit configuration option.#209
Bastian-Krause merged 5 commits into
rauc:masterfrom
benprisby:download-limit

Conversation

@benprisby

Copy link
Copy Markdown
Contributor

For rate-limited environments, it would be convenient to have the ability to cap the download speed for updates at the client side. While most use cases may prefer the client to download as fast as possible, I have ran into cases in embedded systems where it is desirable to impose speed limits on network activity. Being able to do this at an application level rather than interface-wide offers more system configuration flexibility.

This change plumbs through cURL's CURLOPT_MAX_RECV_SPEED_LARGE option as a configuration property, where the speed limit is imposed as an average for the transfer. The default is to not impose any speed limit (current behavior).

@jluebbe

jluebbe commented Feb 25, 2026

Copy link
Copy Markdown
Member

We'd prefer to move away from full bundle downloads towards RAUC's native streaming support, as that's a requirement to benefit from adaptive updates. See stream_bundle=<boolean> in the reference.

Is there a reason why you need to use the non-streaming case?

@benprisby

Copy link
Copy Markdown
Contributor Author

@jluebbe Thanks for the response. I don't have any opposition to switching to streaming, though it doesn't seem to be enabled by default. Are there plans to change that in a future release?

For users that still opt for the non-streaming (current default) case, are you opposed to adopting this additional configuration option? If you'd like, I'm happy to explicitly note in the reference that it does not apply when stream_bundle is true since you hand the process off to RAUC for that.

Let me know how you'd like to proceed.

@jluebbe

jluebbe commented Feb 26, 2026

Copy link
Copy Markdown
Member

@jluebbe Thanks for the response. I don't have any opposition to switching to streaming, though it doesn't seem to be enabled by default. Are there plans to change that in a future release?

Changing the default might be too surprising for existing users, but perhaps we should warn if the stream_bundle option not set explicitly. That should be a different PR, though.

For users that still opt for the non-streaming (current default) case, are you opposed to adopting this additional configuration option? If you'd like, I'm happy to explicitly note in the reference that it does not apply when stream_bundle is true since you hand the process off to RAUC for that.

Yes, please add a note in the reference and also in the example conf comment.

@benprisby

Copy link
Copy Markdown
Contributor Author

I've added the note. Likely outside the scope of this PR, but some other options have a similar note in the reference, but not the example configuration file:

  • low_speed_time
  • low_speed_rate
  • resume_downloads (missing from config.conf.example entirely)

Just noting for sake of completeness, but not something that needs to be done here.

@Bastian-Krause Bastian-Krause left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Some comments, though. Also, please add your "Signed-off-by".

Comment thread include/config-file.h Outdated
Comment thread src/config-file.c Outdated
Comment thread src/hawkbit-client.c Outdated
Comment thread test/test_download.py Outdated
@benprisby

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback. I've addressed those comments and cleaned up the earlier commit messages to be more consistent with the rest of the repo.

benprisby added 5 commits May 19, 2026 15:23
Signed-off-by: Ben Prisby <ben@prisby.com>
…when stream_bundle is true

Signed-off-by: Ben Prisby <ben@prisby.com>
Signed-off-by: Ben Prisby <ben@prisby.com>
Signed-off-by: Ben Prisby <ben@prisby.com>
Signed-off-by: Ben Prisby <ben@prisby.com>

@Bastian-Krause Bastian-Krause left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased. Thanks for addressing the feedback!

@Bastian-Krause
Bastian-Krause merged commit 227a2f3 into rauc:master May 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants