I have previously used HAProxy as a solution for this, and found it very simple and straightforward. Is there a similar product for windows (server 2003 or 2008) which provides similar configuration options and runs as a lightweight service?
Be careful, I've got very negative reports from people running Windows LB, which was the main reason why they switched to haproxy. If you're satisfied with haproxy, you can build it on windows using the cygwin suite. I have not tested it myself, but the user who performed the port did. He also told me that there was a limit to approximately 1600 concurrent connections per process under windows, which may or may not be enough for you.
From my understanding, the build should be as straightforward as on linux : "make". If you need more info from this user, I invite you to send a call on the haproxy mailing list. Alternatively, there are certainly people here on serverfault who can help with setting up a cygwin build environment. Please use version 1.3.22 (latest stable) for this.
I understand that the question is really old, but some people may still face the same problem. So the easiest solution is Cygwin. Example is here -haproxy-on-windows-cygwin-good-for-testing/#sthash.PhJ3odwn.dpbs
I would definitely avoid ported applications, when you can use native ones fee-free, especially when it's opensource. For example you can run haproxy on a VM inside a Windows host under Hyper-V, if you're that much into Windows. But in reality I would not either, because this makes you dependant on the Windows IP stack, and I doubt anyone would want this in a production when he has other choices, especially when said stack has bugs like this.
On the frontend haproxynode, the bind port is set to 6090, same as the ProcessRobot servers listening port picked. It is user configurable, but it is easier to refer to the same port as the ProcessRobot servers one.
On the backend backendnodes, the load is distributed using the source algorithm on the two available nodes, where the ProcessRobot servers are installed. On the source algorithm, the source IP address is hashed and divided by the total weight of the running servers to designate which server will receive the request. This ensures that the same client IP address will always reach the same server as long as no server goes down or up (session stickiness).
The latest service uses socket.io and Node.JS, I couldn't get it going because the local web server runs on a different port than the Node JS server (naturally). Due to the "Same origin policy" socket.io JS needs to run on the same port (and host). So I installed HAProxy to mimic how everything would run in Prod.
You can run the RP inside your green network, then you need to setup a port forward on the firewall to deliver the traffic from IPFire to the RP machine and from there according to the rules of the RP, to the final destination. Or, you install directly on IPFire a RP but then you need to allow access to the firewall from the red interface.
This guide is to provide an introduction on installing, configuring and utilizing HAProxy as a proxy for Mattermost. This is just the way I have HAProxy currently configured, so if there are any issues with this guide please leave a comment and I will do my best to update it.
HAProxy is configured using a file in the /etc/haproxy/ directory. You need to edit the haproxy.cfg file. When editing the file, you need the IP address of your Mattermost server and fully qualifed domain (FQDN) of your Mattermost website.
Open the file /etc/haproxy/haproxy.cfg as root in a text editor and add the following lines at the end of the file. Make sure that you use your own values for the Mattermost server IP address and FQDN for server_name.
Open the file /etc/haproxy/haproxy.cfg as root in a text editor and update the server section to incorporate the highlighted lines in the following sample. Make sure to replace domain-name with your own domain name, in 2 places.
I have tried adding user root or Administrator in the config but to no avail. The file permission according to ls -la is Administrator none. It makes me think HAProxy does not completely support windows and I wonder how does -sf/-st prefix work? (I tried in unix system and it turns out working correctly. The HAProxy config is shown below
@ndemarco - Thanks!
I worked for hours trying to get BW working on Win2019. I was able to get it installed (at least the script said it was successful) but I got a bunch of errors that certain files could not be accessed during the install so I just deleted the VM
By no means am I proficient with Linux but I have installed a few Linux distros so I will try BW on Linux. Please elaborate on why you need a reverse-proxy in front of BW and why would one need HAProxy.
The haproxy issue should be addressed but there is still a problem with downloading packages. If you already have a package downloaded then you should be ok to browse through the package and import examples. Similarly viewing content like an Academy should be fine.
I have a home-lab that i use to try new things out, alot of what I do is overkill for what I need, but it lets me learn and develop (thats what a homelab is for after all)
I have a web server with a few websites i host, i installed gitea on it on a separate port, and run it all though haproxy to allow for port remapping based on hostname (give my git server a url that isnt a custom port)
and so I can learn load-balancing later on for web and databases
I did a curl between servers, and got 200OK back for my webserver, but when i put my port in for the git it just sits there waiting
I then did a curl from my windows pc to the webserver and got 200 back from the webserver and 302 for the git server
It means apache server is not returning any response. It might be it is not listening on that port or that you block it. For first case, any other machine should get the same error including windows and when you are curling on the server machine itself.
Im trying to setup the reverse proxy
I have a HAproxy server which im trying to use to convert a hostname into host:port
But HAproxy was showing the server as offline even though i could access it fine from my windows pc via the web interface
so i did a curl from the HAproxy server to see what was going on and found that I can curl to my apache install on my webserver but not to my git install on the same webserver
(two services, same server)
Gitea is responding fine to responses from localhost and from my windows pc
Just not to the HAproxy server
I think I made a mistake. Seems like it is 100% your computer firewall in control of which ip you can reach your web server. I am pretty sure it is a misconfiguration in the firewall if your windows machine can reach it while your Linux machine can't.
Don't use haproxy then. Use your apache as the proxy instead or don't use any proxy at all and directly have gitea listening on port 3000 and Curl that port from another machine in the network. See if that helps. If everything works, you can then pinpoint the problem to the proxy.
I have HAproxy between my WAN and servers as im learning how it works and how to loadbalance various services, I have other things which run though it (plex for example)
I did have apache running as the proxy but wanted to experiment with a dedicated proxy server and try something new
Ignore the fact about HAproxy as im not touching that in any way for this test (its installed on the server im testing from, but i dont go though it for curling)
HAProxy or High Availability Proxy, is a well-known open-source TCP/HTTP load balancer and proxy solution which is able to handle a lot of traffic. HAProxy consumes a very low amount of memory, and it is commonly used to improve the performance of servers by distributing the workload across multiple servers to handle a large number of concurrent connections. If you have busy websites, you can install and configure HAProxy as the reverse proxy to your webservers.
This command puts the Personal Package Archive (PPA) into the list of apt sources. After adding the PPA to our APT source list, we can run the command below to complete the installation. You can replace the version number in the command above if you want to use another version of HAProxy.
In this post, we showed you how to install and configure the HAProxy server to distribute load across two Apache web servers. on Ubuntu 22.04. You can now implement HAProxy in the production environment to increase your web application performance and availability.
dd2b598166