4 ms·
I'm glad this has 2016 in the title! It's now 2017, and we have better options. Nginx has been the best routing and traffic serving system for a while now, but
by trjordan 9y ago
I'm glad this has 2016 in the title! It's now 2017, and we have better options.
Nginx has been the best routing and traffic serving system for a while now, but it's showing its age. In addition to hiding metrics, HTTP 2 support is difficult, there's no clear path to grpc, and (as mentioned in tfa) there is no way to get stats out of it.
Envoy (envoyproxy.github.io) seems like the next thing. Nginx won because of the predominant patterns at the time, and it's still totally fine for serving lots of HTTP traffic. The problem is that if you're thinking microservices or rely on metrics to do your job or have elastic infrastructure, Envoy's feature set is the only real way to handle traffic routing in that world.
Disclaimer: I work for turbinelabs.io, and we're moving from nginx to Envoy to take advantage of a lot of these features to power our product. We've put a lot of effort into that decision, and believe it's the right one.
- devmunchies 9y agoI haven't used Envoy yet, but i find it attractive that its made by a company that doesn't make money by selling enterprise features like Nginx+ does. Lyft doesn't care about that, so they have "Advanced Load Balancing" features baked in for free.
- kayoone 9y agoI thin nginx+ is handled really well, a lot of new features find their way into the open source version and for most people that version is all they ever need.
- nailer 9y agoHow can I manually switch an environment over from green to blue? I'm reading https://envoyproxy.github.io/envoy/operations/admin.html https://envoyproxy.github.io/envoy/operations/admin.html but I can't see it.
- trjordan 9y agoYou don't call Envoy to make changes. You either update the config file, or you implement an API server with a specific set of endpoints, then have it serve the updated values back. It's a bit tricky, but entirely doable. https://envoyproxy.github.io/envoy/intro/arch_overview/dynamic_configuration.html https://envoyproxy.github.io/envoy/intro/arch_overview/dynam... (You can do this in nginx, too, and it's similarly annoying. This is a big part of what we do at Turbine Labs -- a UI with a slider between blue and green, and a place to host all those stats, so you don't have to manage it!)
- nailer 9y agoI'd use Houston in a heartbeat over nginx (currently flying blind, but need it for HTTP/2) but it's hard to compete with free. It's hard to read what your licensing/support model is like without signing up. Considered a Red Hat like support model?
- dsp1234 9y agoLooks like you can use the Traffic Shifting functionality. Put the green servers in one cluster, the blue servers in another cluster. Then use the route configuration to switch between the two. https://envoyproxy.github.io/envoy/configuration/http_conn_man/route_config/traffic_splitting.html#traffic-shifting-between-two-upstreams https://envoyproxy.github.io/envoy/configuration/http_conn_m...
- bogomipz 9y agoIs turbinelabs.io relevant to the choice to move away from nginx? I am not familiar with your company. Also can you say how has the transition been?
- trjordan 9y agoturbinelabs.io is the whole of everything we're building on top of nginx/envoy. Our primary goal is to provide more powerful ways to release software like incremental blue/green deploys or canaries or production previews. That requires a solid data plane (nginx/envoy) and management plane (missing in nginx/envoy xDS APIs) underneath it to work. Nobody runs nginx because it's fun -- one of the logical use cases for a better nginx is better releases, which is what we work on. The transition has been good! There's certainly a lot more complexity to implement with the Envoy APIs, but that's because there's a lot of power. Working with Matt Klein and the rest of the community has been really positive. We're excited about all the other patterns that unlocks, like circuit breaking and tracing. Those sorts of features are on the wrong side of the cost/benefit equation for most companies, but if you get them for free because you deployed Envoy as ingress and service mesh, they're great to have.
- bogomipz 9y agoInteresting thanks for the detailed response. Can you elaborate on your comment about "xDS APIs"? I' not sure which APIs are you referring to.
- trjordan 9y agoThere are 4 Discovery Service APIs that you can implement: service (SDS), cluster (CDS), route (RDS), and listener (LDS). Colloquially called xDS for all of them. https://envoyproxy.github.io/envoy/intro/arch_overview/dynamic_configuration.html https://envoyproxy.github.io/envoy/intro/arch_overview/dynam...
- bogomipz 9y agoI see, I'm looking forward to spending some time looking at envoy. Cheers.
- Karunamon 9y agoCould you elaborate more on the HTTP2 support being difficult? Enabling it is a one liner in the relevant config file, so I'm guessing there must be some more subtle gotchas.