envoy icon indicating copy to clipboard operation
envoy copied to clipboard

NT support

Open mattklein123 opened this issue 10 years ago • 63 comments

Get Envoy working on NT. This will require OS shim layer most/all POSIX operations, all Linux specific operations, and especially a new hot restart implementation.

mattklein123 avatar Oct 07 '16 15:10 mattklein123

Are there any plans for adding Windows support? If yes, any timeline..

kavyako avatar Jun 07 '17 17:06 kavyako

@kavyako no one is working on this. If we can find resources would love to do it. Happy to chat offline if MSFT is interested.

mattklein123 avatar Jun 07 '17 18:06 mattklein123

@mattklein123 yeah we'd be interested to see what's possible. Send me your contact info and I'll set up some time to chat. My email is [email protected]. Cheers!

vturecek avatar Jun 08 '17 21:06 vturecek

@vturecek sweet. Will send email. FYI all Lyft people working on Envoy are based in Seattle so we can meet in person if needed.

mattklein123 avatar Jun 08 '17 22:06 mattklein123

Hey @vturecek, @mattklein123. Has anyone started work on Windows support? We're looking to use Envoy in Cloud Foundry to resolve the issue of Route Integrity, and my team in particular is concerned with how we'll do this on Windows. The Linux proposal involves Envoy, and we'd love to use the same solution on Windows, if possible.

We'd be interesting in collaborating in whatever way makes sense. If email communication is preferred, I can be reached at [email protected].

mhoran avatar Jul 26 '17 18:07 mhoran

@mhoran I will start a mail thread with MSFT folks to determine status.

mattklein123 avatar Jul 26 '17 19:07 mattklein123

Thanks @mattklein123. Just in case there's more interest from others, yes Windows work is underway on our end. @mhoran - I'll follow up with more details over email.

vturecek avatar Jul 26 '17 19:07 vturecek

@vturecek Any status from a MS point of view. We are running a mixed cluster (linux pool - linux nodes and windows pool - windows nodes) and would like holistic support for this environment.

campbelldgunn avatar Jan 19 '18 21:01 campbelldgunn

@mhoran Just discovered this fork and thinks it might work https://github.com/microsoft/envoy/tree/sridhar/win32_port

but it appears there is still work necessary to get it working with the required build system... https://github.com/Microsoft/envoy/tree/sridhar/win32_port/win32_build

shalako avatar Feb 15 '18 22:02 shalako

@sridmad : for more details about the windows port.

kavyako avatar Feb 16 '18 00:02 kavyako

@campbelldgunn sorry for the late response - Windows support work is underway in our fork here: https://github.com/microsoft/envoy/

@sridmad has a branch with what I believe is a functional build at this point but I'll defer to him for the status on that: https://github.com/microsoft/envoy/tree/sridhar/win32_port

vturecek avatar Feb 24 '18 00:02 vturecek

Great to see work being done towards adding windows support to envoy. I am curious to understand how traffic redirection is handled on windows platform... basically windows equivalent for linux iptables.

vinayatgit avatar Apr 17 '18 06:04 vinayatgit

@vinayatgit we've come up with a proof of concept that leverages Windows proxy settings to force application egress through an Envoy proxy. Our investigation was successful, though we encountered issues with the documented APIs for configuring proxy settings in Windows Server 1803. More details here: https://www.pivotaltracker.com/story/show/158328675.

Of course, this only works for HTTP (and potentially HTTPS) traffic. There's still a question around how to handle TCP traffic, but that's something we can certainly add later.

mhoran avatar Jun 15 '18 13:06 mhoran

We have been able to successfully compile envoy on Windows using Bazel. A branch with code changes + build system changes can be found here: https://github.com/greenhouse-org/envoy/tree/windows-linux-build

The necessary C++ changes were mostly pulled over from the work @sridmad has done in the Microsoft fork.

We discussed with @mattklein123 last week what the strategy should be to start getting these changes back upstream. The first step we will make is to PR just the build changes (i.e *.bzl, BUILD files etc.) and go from there to get the correct C++ changes in

sesmith177 avatar Jul 02 '18 19:07 sesmith177

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 01 '18 19:08 stale[bot]

@mattklein123 should we keep this issue open to track porting efforts? If so, is there an appropriate tag?

Maybe simply commenting is sufficient...

mhoran avatar Aug 01 '18 19:08 mhoran

@mhoran yeah if you could update w/ current status that would be cool.

mattklein123 avatar Aug 01 '18 20:08 mattklein123

Preliminary Bazel build support for Windows has been merged into Envoy master. We're currently working to get lyft/protoc-gen-validate working on Windows, which is a blocker to Envoy support for Windows.

We have been maintaining a branch based off the initial work from the team at Microsoft which builds a working executable via Bazel. However, the produced binary isn't too useful because we must disable all Envoy extensions at the moment due to a Bazel bug.

We'll likely need to get this bug resolved before PR-ing our branch. Also, there's likely a good deal of cleanup that will need to be done to the branch before it's ready to be merged.

mhoran avatar Aug 01 '18 20:08 mhoran

We are now hitting the command line length limit when compiling even with all extensions turned off. So it's now become a hard blocker for us to keep our fork up to date (let alone actually making the PR)

sesmith177 avatar Aug 10 '18 16:08 sesmith177

We've started porting the unit tests to get them running on Windows on our branch. It's set up in our CI, which should be visible here: https://garden-windows.ci.cf-app.com/teams/main/pipelines/envoy/jobs/envoy-windows/builds/45

While porting the tests, we've noticed 2 real issues, both with libevent. First, libevent does not support edge triggering (EV_ET) on Windows -- it just falls back to level triggering. This results in the onWriteReady() callback constantly firing. This is probably not great from a performance standpoint, but does not appear to do anything actively wrong.

The second is that libevent does not support EV_CLOSED on Windows, and so a connection will never get an early close notification.

Our current blockers are: https://github.com/lyft/protoc-gen-validate/issues/89 (blocking us from getting PGV Windows support into Envoy) and https://github.com/bazelbuild/bazel/issues/5163 (blocking us from building Envoy on Windows)

To work around the second issue, we are currently using a fork of Bazel with a hacky change that shortens the include directories passed to cl.exe

sesmith177 avatar Aug 31 '18 19:08 sesmith177