<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Michael Gfeller on Medium]]></title>
        <description><![CDATA[Stories by Michael Gfeller on Medium]]></description>
        <link>https://medium.com/@michugfeuer?source=rss-f2d627dd50ed------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8CEF_vJpw-y0oFpPsmRD6Q.jpeg</url>
            <title>Stories by Michael Gfeller on Medium</title>
            <link>https://medium.com/@michugfeuer?source=rss-f2d627dd50ed------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 08:59:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@michugfeuer/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[File Based Dynamic Configuration of Routes in Envoy Proxy]]></title>
            <link>https://medium.com/compendium/file-based-dynamic-configuration-of-routes-in-envoy-proxy-6234dae968d2?source=rss-f2d627dd50ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/6234dae968d2</guid>
            <category><![CDATA[teknologi]]></category>
            <category><![CDATA[envoy-proxy]]></category>
            <dc:creator><![CDATA[Michael Gfeller]]></dc:creator>
            <pubDate>Tue, 12 Mar 2019 19:10:25 GMT</pubDate>
            <atom:updated>2019-03-16T09:42:58.778Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p9qGkbrBiGNPv4Y9yexi5w.jpeg" /></figure><p>As developers are increasingly involved in the configuration of edge proxies, like <a href="https://www.envoyproxy.io/">Envoy</a>, it is important that these appliances provide a developer experience that supports the modern developers’ workflow. With the dynamic service discovery capabilities, Envoy makes this possible. All aspects of the proxy except a static bootstrap configuration can be <a href="https://www.envoyproxy.io/docs/envoy/v1.9.0/intro/arch_overview/dynamic_configuration">dynamically configured</a>. This means that the configuration of an Envoy proxy can be updated without cold or hot restart. This is in many cases the preferred and easiest method of handling frequent configuration changes.</p><p>The configuration can either be provided by a configuration server, or by files. There are some open source and commercial implementations of such servers. If desired, projects can implement their own, based on available libraries, implementations and examples (<a href="https://github.com/envoyproxy">envoyproxy</a>/<a href="https://github.com/envoyproxy/go-control-plane">go-control-plane</a>, <a href="https://github.com/envoyproxy">envoyproxy</a>/<a href="https://github.com/envoyproxy/java-control-plane">java-control-plane</a>). If the requirements do not necessitate a server based solution, a simple file based approach might be sufficient. A file with the new configuration is created, and in a file system move operation the current file is overwritten with the new configuration. Using inotify to monitor the file for changes, Envoy will load the new configuration, and apply it if it is valid. If it is not valid, the previous state will remain active, and a corresponding message will be written to the log.</p><p>The whole family of discovery services is designated as xDS. This post shows how the route discovery service (RDS) can be implemented using files as configuration source instead of servers.</p><p>The code accompanying this post is available on <a href="https://github.com/mgfeller/xds-envoy">GitHub</a>. It is based on the front proxy example code from the <a href="https://github.com/envoyproxy/envoy">Envoy proxy repository</a>, documented in the<br> <a href="https://www.envoyproxy.io/docs/envoy/v1.9.0/start/sandboxes/front_proxy.html">envoy docs</a>.</p><p>In the Envoy configuration file, find the field route_config the envoy.http_connection_manager filter that you would like to replace by a dynamic configuration:</p><pre>- name: envoy.http_connection_manager<br>  config:<br>    codec_type: auto<br>    stat_prefix: ingress_http<br>    route_config:<br>      name: local_route<br>      virtual_hosts:<br>      - name: backend<br>        domains:<br>        - &quot;*&quot;<br>        routes:<br>        - match:<br>            prefix: &quot;/service/1&quot;<br>          route:<br>            cluster: service1<br>        - match:<br>            prefix: &quot;/service/2&quot;<br>          route:<br>            cluster: service2<br>    http_filters:<br>    - name: envoy.router<br>      config: {}</pre><p>Replace this field with a field called <a href="https://www.envoyproxy.io/docs/envoy/v1.9.0/api-v2/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#envoy-api-msg-config-filter-network-http-connection-manager-v2-rds">rds</a> that points to the file containing the corresponding configuration:</p><pre>- name: envoy.http_connection_manager<br>  config:<br>    codec_type: auto<br>    stat_prefix: ingress_http<br>    rds:<br>      route_config_name: local_route<br>      config_source:<br>        path: /etc/rds/rds.yaml<br>    http_filters:<br>    - name: envoy.router<br>      config: {}</pre><p>The contents of the file rds.yaml is</p><pre>version_info: &quot;0&quot;<br>resources:<br>- &quot;<a href="http://twitter.com/type">@type</a>&quot;: type.googleapis.com/envoy.api.v2.RouteConfiguration<br>  name: local_route<br>  virtual_hosts:<br>  - name: backend<br>    domains:<br>    - &quot;*&quot;<br>    routes:<br>    - match:<br>        prefix: &quot;/service/1&quot;<br>      route:<br>        cluster: service1<br>    - match:<br>        prefix: &quot;/service/2&quot;<br>      route:<br>        cluster: service2</pre><p>Now, if the configuration needs to be changed, a file with a new configuration can be created, say rds-new.yaml, and then moved over the existing file:</p><pre>mv rds-new.yaml rds.yaml</pre><p>Envoy will pick up the change, validate and activate the new configuration.</p><p><strong>Further reading and resources:</strong></p><ul><li><a href="https://www.envoyproxy.io/docs/envoy/v1.9.0/intro/arch_overview/dynamic_configuration">Envoy proxy: Dynamic configuration</a></li><li><a href="https://blog.envoyproxy.io/the-universal-data-plane-api-d15cec7a">Envoy proxy: The universal data plane API</a></li><li><a href="https://github.com/envoyproxy/data-plane-api/blob/master/XDS_PROTOCOL.md">Envoy proxy: xDS REST and gRPC protocol</a></li><li><a href="https://www.katacoda.com/envoyproxy/scenarios/file-based-dynamic-routing-configuration">Katacoda: envoyproxy — File Based Dynamic Routing Configuration (EDS)</a></li><li><a href="https://thenewstack.io/envoy-and-the-programmable-edge-edge-proxies-and-the-developer-experience/">Envoy and the Programmable Edge: Edge Proxies and the Developer Experience</a></li></ul><p><em>Originally published at </em><a href="https://medium.com/p/5ec5998f7902/"><em>medium.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6234dae968d2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/compendium/file-based-dynamic-configuration-of-routes-in-envoy-proxy-6234dae968d2">File Based Dynamic Configuration of Routes in Envoy Proxy</a> was originally published in <a href="https://medium.com/compendium">Compendium</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>