Skip to content
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

set socket buffer when proxy request #1892

Merged
merged 1 commit into from
Nov 28, 2023
Merged

Conversation

drawing
Copy link
Collaborator

@drawing drawing commented Nov 15, 2023

Add proxy_sndbuf_size and proxy_rcvbuf_size command to set the socket buffer when proxy request.

@lhanjian
Copy link
Collaborator

lhanjian commented Nov 16, 2023

good idea!
But maybe we should put this configuration variable in the upstream-related module?
Otherwise, it will be difficult to maintain too many proxy modules.

in nginx core module,
it use

listen 12345 sndbuf=XXX

May we design a sndbuf setup that looks more like the nginx community?

​upstream {
server a sndbuf=XXX;
}

or

upstream {
sndbuf 1024k;
server a;
}

It's interesting. Nginx never set rcvbuf to other value……

@lianglli
Copy link
Member

The recv and snd parameter for setting the socket buffer of ngx_http_fastcgi_module and ngx_http_proxy_module

@lianglli lianglli merged commit 12a0cd0 into alibaba:master Nov 28, 2023
9 checks passed
@harry-xm
Copy link
Contributor

harry-xm commented Dec 8, 2023

Is SO_RCVBUF set on the socket? I can't find the corresponding setsockopt() call in the patch.

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

Successfully merging this pull request may close these issues.

4 participants