Skip to content

Conversation

@AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Oct 16, 2025

This new default forwarder uses SSH for TCP, as SSH now outperforms GRPC when VSOCK is available.
GRPC is used for UDP, as SSH does not support UDP.

Fix #4074


Doc preview: https://deploy-preview-4210--lima-vm.netlify.app/docs/config/port/

@AkihiroSuda AkihiroSuda force-pushed the fix-4074 branch 6 times, most recently from 58c6249 to 545d4a2 Compare October 17, 2025 12:24
} else {
break
}
portForwardTypes, err := resolvePortForwardTypes(inst.Config.PortForwardTypes, inst.Config.PortForwards)
Copy link
Contributor

@norio-nomura norio-nomura Oct 21, 2025

Choose a reason for hiding this comment

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

About the bool variables *FwdIgnore* created based on this portForwardTypes.

They are only used to suppress log messages (logrus.Infof("Not forwarding ...) when Forwarder decides not to forward by applying rules.

And they are not involved in the forwarder applying/not applying the rules.

Therefore, the current implementation is not related to the newly introduced settings, first the SSH Forwarder binds the local port, then the gRPC Forwarder fails to bind, and the gRPC Forwarder only runs on the rules that the SSH Forwarder does not support.

Copy link
Member Author

@AkihiroSuda AkihiroSuda Oct 21, 2025

Choose a reason for hiding this comment

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

Thanks, fixed (EDIT: reverted due to CI failures on Windows)

@AkihiroSuda
Copy link
Member Author

Windows CI seems now failing

@AkihiroSuda AkihiroSuda marked this pull request as draft October 21, 2025 12:01
@AkihiroSuda AkihiroSuda force-pushed the fix-4074 branch 3 times, most recently from 8bd3636 to 72db344 Compare October 21, 2025 14:42
This new default forwarder uses SSH for TCP, as SSH now outperforms
GRPC when VSOCK is available.
GRPC is used for UDP, as SSH does not support UDP.

Fix issue 4074

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@balajiv113
Copy link
Member

@AkihiroSuda

SSH outperforming GRPC

We can bridge that gap with improved GRPC configs.

If this PR is mostly because SSH with vsock outperforming grpc should we rethink ? Atleast initial idea behind bringing GRPC is to reduce too many different protocols which will reduce confusions in terms of vm and driver level and intern reduces maintenance as well.

@AkihiroSuda AkihiroSuda removed this from the v2.0.0 milestone Oct 23, 2025
@AkihiroSuda
Copy link
Member Author

Closing, as the throughput of the gRPC forwarder was improved in:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revisit the default port forwarder for Lima v2.0

4 participants