sozu icon indicating copy to clipboard operation
sozu copied to clipboard

Windows Compatibility for Sozu

Open varshith257 opened this issue 11 months ago • 4 comments

We currently use Sozu in our project as a proxy solution to unify routing for a single executable setup. However, we have encountered a significant blocker due to Sozu's lack of Windows support, which prevents us from deploying the solution across all required platforms.

Problem

  1. Windows Compatibility: Sozu does not currently support Windows, creating a major limitation for projects requiring cross-platform compatibility. This prevents us from using it in scenarios where Windows is a required platform.

  2. The lack of Windows support stems from dependency on the poule crate, which does not support Windows. It seems it's only used for buffer management in command/buffer.rs.

Proposed Solution

Introduce Windows support to Sozu starting by identifying and addressing platform-specific limitations in the codebase particularly poule

I am open to contributing to this effort by assessing the required changes and providing patches to make the required modifications to support Windows which also benefits to Sozu Community for Windows Compat.

I am looking forward to guidance from the Sozu/poule maintainers regarding:

  • The feasibility of introducing Windows support.
  • Any other specific considerations or known challenges for implementing this feature?

Other:

As far I have debugged and know the poule is the major blocker for this We mainly work with sozu-command-lib

varshith257 avatar Dec 26 '24 12:12 varshith257

@FlorentinDUBOIS @Wonshtrum @Keksoj I greatly appreciate your time and feedback on this

varshith257 avatar Dec 26 '24 12:12 varshith257

Hello @varshith257,

I am glad to see you there and discover that you are using Sōzu!

First of all (for the context), Sōzu has been design to work closely with the linux operating system and unix at the edge. We are using the mio crate that theoretically support windows, but we have never tried to used on such an operating system. Poule crate seems to be a blocker as well, but we never take a look at it, as we do not have such needs at Clever Cloud (FTR: Sōzu has been built by and for Clever Cloud needs at the foundation and we are welcoming every contributors since the open-sourcing). I haven't test, but I am pretty sure, that we will have issues with the way that we handle socket and file descriptors when trying to run Sōzu on windows, as we are using the crate nix (which works only on linux/unix operating systems) to set custom flags on file descriptor to be non-blocking, etc.

I will ask @Wonshtrum to take a look at it, if we can do it quickly but we will not put a lot of effort right now as we are planning to rewrite a huge part of Sōzu next year to be able to provide more functionalities.

FlorentinDUBOIS avatar Dec 26 '24 13:12 FlorentinDUBOIS

@FlorentinDUBOIS I updated the poule for windows support, at least. It works from my testing and the tests files that are already in poule. https://github.com/sozu-proxy/poule/pull/4

zelosleone avatar Dec 29 '24 20:12 zelosleone

Thank you @zelosleone for the update on poule, I asked for @Wonshtrum to review it as well.

FlorentinDUBOIS avatar Feb 11 '25 09:02 FlorentinDUBOIS