Skip to content

[Docker-outside-of-docker] Increase backlog depth for socat proxy (#789) - #790

Merged
Eljo George (eljog) merged 3 commits into
devcontainers:mainfrom
groner:docker-outside-of-docker-socat-proxy-backlog-bump
Jan 19, 2024
Merged

[Docker-outside-of-docker] Increase backlog depth for socat proxy (#789)#790
Eljo George (eljog) merged 3 commits into
devcontainers:mainfrom
groner:docker-outside-of-docker-socat-proxy-backlog-bump

Conversation

@groner

@groner Kai Groner (groner) commented Jan 3, 2024

Copy link
Copy Markdown
Contributor

The underlying problem described in #789 is that the main accept(2) loop in socat is single threaded and is easily overwhelmed by docker compose, which can create connection attempts in multiple cores.

Fortunately the listening socket already has a backlog which we can increase from socat's default of 5.

In this PR I have chosen a depth of 128 as probably high enough for most devcontainer needs. If it isn't high enough this could be made tunable, but reevaluating the proxy implementation might be in order also.

@groner
Kai Groner (groner) requested a review from a team as a code owner January 3, 2024 22:35
@eljog

Eljo George (eljog) commented Jan 6, 2024

Copy link
Copy Markdown
Member

Thank you for the contribution.
I can approve to run the pipeline checks once the CLA has been accepted

Also, please consider adding more context and details to the PR description

@groner

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@groner

Copy link
Copy Markdown
Contributor Author

Eljo George (@eljog) Thanks for looking at this.

I've added some details to the description, but refer to #789 for context. I hope that's alright.

@eljog

Copy link
Copy Markdown
Member

I have approved to run the workflow checks

Comment thread src/docker-outside-of-docker/install.sh
@eljog
Eljo George (eljog) merged commit 65fb90b into devcontainers:main Jan 19, 2024
@groner
Kai Groner (groner) deleted the docker-outside-of-docker-socat-proxy-backlog-bump branch January 19, 2024 14:43
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.

3 participants