Hey everyone,
I’m trying to set up HAProxy for a specific use case and I’m wondering if it’s doable. Here’s the thing:
I want to use HAProxy just for URL redirects. No actual backend servers involved. Is this even possible? Will HAProxy throw a fit if I don’t give it any backend to work with?
I’m kinda new to this whole load balancing thing, so I’m not sure if HAProxy needs a backend to function properly. Any insights or tips would be super helpful!
Thanks in advance for your help. Really appreciate it!
yep, HAProxy can do redirects w/out backends. i’ve set up my frontend with acl and redirect rules. works great for simple redricts and offloading server load. just make sure your config’s ok and monitor it.
hey there! curious about ur redirect setup. have u considered using nginx for this instead? it’s pretty good at url rewrites too. what made u choose haproxy specifically? btw, any cool use cases ur working on with these redirects? sounds intriguing!
Absolutely, HAProxy can function without a backend server for URL redirects. I’ve implemented this in a few projects. You can use HAProxy’s built-in ACL (Access Control List) and redirect capabilities to handle URL redirects without any backend servers. In your frontend configuration, define rules using ‘http-request redirect’ directives. This approach is efficient for simple redirects or when you need to offload this task from your application servers. Remember to properly configure your HAProxy to handle these redirects, including setting up appropriate logging and monitoring. While it’s not HAProxy’s primary use case, it’s a powerful feature that can simplify your infrastructure setup for certain scenarios.