Reverse Proxy with per-upstream configuration

Hi Caddy Community!

I’m currently using haproxy as a egress proxy to load balance between multiple external web services. I’m experimenting with Caddy, and have a general question I’d like to get some perspective on.

In my use case, I load balance between multiple upstream servers. The challenge is, each upstream server requires unique configuration to authenticate (some use JWT headers, others url parameters, etc).

After authenticating, the servers can be treated as identical. (They all serve the same content / respond to requests in a uniform way).

I get the sense this is a atypical use case for proxies in general. For haproxy I was able to accomplish this setup as follows:

 [haproxy] -- unix socket --> [haproxy] -- https --> [upstream svc], 

This works, and I think I could accomplish the same with Caddy…but in my experience it’s a bit cumbersome to manage the configuration, tracing, logging, etc.

Ideally I’d like way to accomplish per-upstream server configuration for a reverse proxy, without a double-proxy setup.

Before I go much further experimenting, I thought it was worth asking a question just-in-case I’m missing a completely obvious solution (wouldn’t be the first time! :slight_smile: )

Thanks in advance!
-Mike

1 Like

Hi Mike, welcome!

What do your haproxy configs look like? More specifically, why do you have the double proxy setup? Let’s see if we can get you going on a single Caddy instance.

This topic was automatically closed after 30 days. New replies are no longer allowed.