Skip to content

Worker Pool Implementation with Fasthttp #1978

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
azamshaikh-ai opened this issue Mar 21, 2025 · 1 comment
Open

Worker Pool Implementation with Fasthttp #1978

azamshaikh-ai opened this issue Mar 21, 2025 · 1 comment

Comments

@azamshaikh-ai
Copy link

This is just a general question related to implementation of worker pool using fast http for handling high qps request.

Issue I came across is when the request is added to worker pool task and it goes on processing, due to ineternal reuse of ctx of fasthttp, processing task, the request body and headers are lost randomly at the time of task execution.

It would be irrelevant to share worker pool code here, but what could be solution to follow here, I could copy the body and headers to struct of task being passed but will it work or any other alternative?

thoughts?

@erikdubbelboer
Copy link
Collaborator

Anything you want to use after the handler returns will need to be copied. Reusing memory is what makes fasthttp fast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants