Caddy to replace Envoy for HA setup

We currently use envoy and consul with a golang backend of NATS, TiDB, Liftbridge and Minio.

  1. Grpc-web:
    We currently use grpc-web but from what I can see in the plugins there is no grpc-web plugin for Caddyv2 yet ?

  2. Let’s Encrypt and Consul
    Is there a plugin that allows us to store the. Sets in Consul ?

  3. Config driven by Consul.
    Is there a plugin to allow many Caddy Servers to be configured via Consul. Envoy can be configured via Consul.

Regards

Joe

You can see the list of known plugins here:

https://caddy.community/t/list-of-caddy-2-modules/7839

There’s a consul storage plugin that you can use.

Caddy can proxy grpc requests by specifying versions h2c on the http transport, I believe.

I’m not sure what you mean by “config driven by Consul”. I assume you mean synced config changes in a cluster? Caddy v2 provides a config API, so you can push configuration changes to all your Caddy instances at once. If that’s not enough for you, you could open up a feature request on Github to open up discussion about supporting that kind of functionality.

Isn’t grpc-web something different though?

:man_shrugging:

I don’t use grpc, just trying to point people in the a hopefully useful direction :smile:

Yes GRPC-Web is the layer that proxies to the web using http xhr under the hood.

GRPC is normal TCP

Okay - then you could just run a grpc-web instance separately from Caddy and reverse_proxy to it normally, no?

I could but it would complicate the Architecture in many ways. Also one of the reasons for trying to move away from envoy is that with CaddyV2 we can embed so much into one binary using the plugins architecture of Caddy. So yes we could but i prefer to try to get things working only with caddyv2 to gain all the benefits of that architecture.

So, I found a caddy grpc-web project on GitHub , but it looks like it only supports caddy v1.

There are many forks also: GitHub - abserari/caddy-grpc: grpc plugin for Caddy Server

All golang grpc-web proxies use the Improbable lib: GitHub - improbable-eng/grpc-web: gRPC Web implementation for Golang and TypeScript

There is a good chance someone is working on a Caddyv2 GRPC i feel.

1 Like

Here is an excellent Test Harness for GRPC-Web and GRPC with a client (Flutter) and server ( Golang). It relies on envoy to run.

  • You can run the client in Browsers where it uses GRPC-Web.
  • Or you can run the client on a mobile or desktop where it uses standard GRPC.

hopefully this makes things clearer…

The above example uses Envoy ( grpc_demo/envoy.yaml at master · dnys1/grpc_demo · GitHub ) , so the golang Server does NOT need the Improbable proxy.

If you do NOT use Envoy then you have to use the Improbable proxy. The magic keyword in that golang code is “WrappedGrpcServer”. Here is a list of Project using this technique: Sign in to GitHub · GitHub

The best way to know for sure if you can’t find one for v2, is to do it yourself! :slight_smile: and then add it to our wiki so others can find it.

It would be great to see that functionality for v2!

Agreed I should just do it.

But I am going to have to pass as working on so many other open source layers right now

My hope is that someone go gives this a try and that the info above helps with it

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.