Posts Tagged ‘envoy’
Debugging MQTT over websockets on Envoy 1.28.0
I have migrated our Envoy installation from Envoy 1.11.1 to 1.28.0, and am now also using SNI for selecting the correct certificate. A big part of that migration is upgrading the syntax of the configuration for Envoy from the v2 API to the v3 API. The upgrade went well, except for our websocket-based MQTT service…
Weiterlesenenvoy fix for serving big files from the backend / timeouts / aborted downloads
Customers were complaining about not being able to download big files from our websites (e.g. PiDoctor on PiCockpit.com). Initially I could not replicate the issue locally, the files seemed to be downloading fine. After further investigation I determined that the downloads were cutting out after a certain time – depending on your download speed, thus,…
WeiterlesenPaho MQTT Client (Javascript), Envoy, VerneMQ: debugging disconnects
After deploying picockpit to my server, a bug was observed: the web frontend would disconnect in very regular intervals. This had not been present on the local development environment. Users of picockpit reported the same bug. I have debugged it today, and applied a hotfix. It turns out it was a timing issue. TL;DR how…
Weiterlesenenvoy serving a static response
Besides routing and redirecting you can serve static responses with Envoy. In this case I want to serve a forbidden response (403) route_config: virtual_hosts: – name: picockpit domains: [“picockpit.local:443”, “picockpit.local”] routes: – match: { prefix: “/demo” } direct_response: status: 403 body: inline_string: “Forbidden.” – match: {prefix: “/”} route: {cluster: target_picockpit} It can also serve…
Weiterlesenenvoy not connecting to VerneMQ for MQTT over websockets, error code 503
Some quick background information for anyone running into the same issues, and how to debug them. Error code 503 This is the error code I am getting: Error during WebSocket handshake: Unexpected response code: 503. Set envoy logging to debug Here’s my docker-compose.yaml for envoy: version: ‘3.7’ services: envoy: build: context: ./ dockerfile: Dockerfile container_name:…
Weiterlesenenvoy websockets per route configuration, JavaScript test setup
In my article yesterday I discussed the configuration & test of envoy for proxying websockets at length. Today I would like to add some additional information. correct syntax for websocket upgrade per route You can enable websocket upgrade per route. No need to add it globally: – name: envoy.http_connection_manager config: #upgrade_configs: # – upgrade_type: websocket …
Weiterlesenenvoy, docker and websockets – debugging and configuration
Websockets are an exciting technology, allowing you to upgrade a HTTP connection to a long-running persistent binary connection, which you can use to send bi-directional messages. As an aside, the MQTT protocol can be transported using websockets – which is the only (?) way for a JavaScript client delivered by the website, for instance. In…
WeiterlesenRoute & Redirect with envoy
An example envoy.yaml showing how to route & redirect. There are different options, see here https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#route-redirectaction This envoy.yaml routes /taxgod and /taxgod/ (the second could probably be omitted because the first one should also match it, I think) to a new port and a different protocol. /picockpit is simply redirected to / and then finally…
WeiterlesenEnvoy routing and rewriting snippet
It is possible to rewrite URLs with Envoy for the backend. Please note that the HTML output needs to have the proper routes! (That is why I am not going to investigate further in this direction). REF: https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#route-route Also note that the string is going to be rendered literally for direct_response –> body –> inline_string,…
Weiterlesenenvoy as http 2 front proxy – enabling http 2 for envoy (aka h2)
Out of the box envoy is not configured to set up connections with clients connecting to it with the new HTTP/2. HTTP/2 is optimized for the modern web, with binary headers, etc. – higher speed. Since envoy is capable of speaking HTTP/2 to clients, it is a no-brainer to set it up. And the setup…
Weiterlesen