Envoy Chinese Guide Series: Introduction to Envoy


Original link: https://fuckcloudnative.io/envoy-handbook/docs/overview/overview/

foreword

EnvoyIt is an L7 proxy and communication bus designed for large modern SOA (Service Oriented Architecture) architectures, with small size and high performance. It was born from the following ideas:

The network should be transparent to the application. When networks and applications fail, it should be easy to determine the source of the problem.

Core functions

In practice, it is very difficult to achieve the above goals. To do this, Envoy provides the following high-level features:

  • Non-intrusive architecture : Envoyis an independent process designed to run alongside each application service. All Envoyform a transparent communication grid, each application sends a message to the local host or receives a message from the local host, does not need to know the network topology, and is completely unaware of the implementation language of the service. This mode is also called Sidecar.

  • Implemented by C++the language, it has strong customization capabilities and excellent performance.

  • L3/L4/L7 architecture : Traditional network proxies either HTTPwork at the layer or at TCPthe layer. At HTTPthe layer, you'll read the entire HTTPrequest data off the wire, parse it, look at HTTPthe headers and URL, and decide what to do next. Then, you'll read the entire response data from the backend and send it to the client. But the disadvantage of this approach is that it is very complicated and slow. A better option is to sink to TCPthe layer operation: only read and write bytes, and use IPthe address, TCPport number, etc. to decide how to process the transaction, but it cannot be based on different URLProxy to a different backend. EnvoySimultaneous operation at layers 3/4 and 7 is supported to address the reality that both approaches have their own practical limitations.

  • Top-level HTTP/2 support : it HTTP/2treats as a first-class citizen, and can convert between HTTP/2and HTTP/1.1(both ways), recommended HTTP/2.

  • Service discovery and dynamic configuration : NginxUnlike the hot loading of proxies such as , the control plane Envoycan be APIrealized through , the control plane can centralize service discovery, and APIdynamically update the configuration of the data plane through the interface, without restarting the proxy of the data plane. Not only that, the control plane can also layer the configuration through the API, and then update layer by layer, for example: virtual hosts, HTTProutes, listening sockets, etc. in the upstream cluster.

  • gRPC support : gRPC [1] is a framework from , which uses gRPC Googleas the underlying multiplexed transport protocol. Envoy supports HTTP/2 perfectly, and can also support it very conveniently .RPCHTTP/2gRPC

  • Special protocol support : Envoy supports sniffing and statistics on special protocols at L7, including: MongoDB [2] , DynamoDB [3] , etc.

  • Observability : EnvoyThe main goal of Observability is to make the network transparent, which can generate many traffic statistics, which is difficult for other proxy software to replace. The built-in statsmodule can integrate prometheus/statsdmonitoring solutions such as . A distributed tracking system can also be integrated to track requests.

Design goals

Envoy's official design goals say this:

Envoy isn't slow (we've spent a considerable amount of time optimizing the critical path). Based on modular coding, easy to test, not optimal for performance. Our view is that deploying and using Envoy in other languages ​​or systems with much lower operating efficiency can bring good operating efficiency.

Although Envoythe pursuit of the ultimate performance is not the primary goal, it does not mean that Envoythere is no pursuit, but the scalability is prioritized, and the performance is slightly sidelined. Like Envoy Nginx, it also adopts a multi-threaded + non-blocking + asynchronous IO (Libevent) architecture, and its performance is still very strong.

References

  • What is Envoy? [4]

  • Lyft Envoy Getting Started Tutorial [5]

footnote

[1]

gRPC: http://www.grpc.io/

[2]

MongoDB: https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/network_filters/mongo_proxy_filter#

[3]

DynamoDB: https://www.servicemesher.com/envoy/intro/arch_overview/dynamo.html#arch-overview-dynamo

[4]

What is Envoy? : https://www.servicemesher.com/envoy/intro/what_is_envoy.html

[5]

Lyft Envoy Getting Started Tutorial: http://dockone.io/article/8212


You might also like

Click on the image below to read

Pseudo-official announcement: Envoy Chinese guide is freshly released

Cloud native is a belief ????

Scan the QR code to follow the official account

Background reply ◉k8s◉ Get the most convenient and fast Kubernetes high-availability deployment tool in history, just one command, not even ssh!

Click "Read the original text" for a better reading experience!

❤️给个「在看」,是对我最大的支持❤️

Guess you like

Origin blog.csdn.net/alex_yangchuansheng/article/details/106610463