[GH-ISSUE #463] [FEATURE REQUEST] Support compress task payload #2237

Closed
opened 2026-03-15 19:48:29 +03:00 by kerem · 3 comments
Owner

Originally created by @linhbkhn95 on GitHub (May 13, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/463

Originally assigned to: @hibiken on GitHub.

Is your feature request related to a problem? Please describe.

  • Currently, I use some data as a task asynq, but it's payload size is big. So, I think whether asynq should support compress task payload when marshal task to save to redis.

Describe the solution you'd like

  • use gzip... to compress task before storing to redis

Describe alternatives you've considered
No
Additional context
Screen Shot 2022-05-13 at 10 57 30

Redis memory usage always be high

Originally created by @linhbkhn95 on GitHub (May 13, 2022). Original GitHub issue: https://github.com/hibiken/asynq/issues/463 Originally assigned to: @hibiken on GitHub. **Is your feature request related to a problem? Please describe.** - Currently, I use some data as a task `asynq`, but it's payload size is big. So, I think whether `asynq` should support compress task payload when marshal task to save to redis. **Describe the solution you'd like** - use `gzip`... to compress task before storing to redis **Describe alternatives you've considered** No **Additional context** <img width="904" alt="Screen Shot 2022-05-13 at 10 57 30" src="https://user-images.githubusercontent.com/21085454/168208371-9386b9cf-f039-4347-a713-5c186751f427.png"> Redis memory usage always be high
kerem 2026-03-15 19:48:29 +03:00
Author
Owner

@hibiken commented on GitHub (May 15, 2022):

@linhbkhn95 Thank you for creating an issue!

In general, we recommend that you keep the memory footprint of each task small (e.g. payload contains IDs to various data).
Is it possible to store the data elsewhere and refer to it via IDs?

<!-- gh-comment-id:1126955179 --> @hibiken commented on GitHub (May 15, 2022): @linhbkhn95 Thank you for creating an issue! In general, we recommend that you keep the memory footprint of each task small (e.g. payload contains IDs to various data). Is it possible to store the data elsewhere and refer to it via IDs?
Author
Owner

@linhbkhn95 commented on GitHub (May 16, 2022):

yeah, I think so. Currently, I also choose a solution like your choice.
many thanks.

<!-- gh-comment-id:1127158974 --> @linhbkhn95 commented on GitHub (May 16, 2022): yeah, I think so. Currently, I also choose a solution like your choice. many thanks.
Author
Owner

@linhbkhn95 commented on GitHub (May 16, 2022):

So I will close this issue

<!-- gh-comment-id:1127159085 --> @linhbkhn95 commented on GitHub (May 16, 2022): So I will close this issue
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#2237
No description provided.