Original link: https://fuckcloudnative.io/envoy-handbook/docs/overview/overview/
foreword
Envoy
It 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 :
Envoy
is an independent process designed to run alongside each application service. AllEnvoy
form 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 calledSidecar
.Implemented by
C++
the language, it has strong customization capabilities and excellent performance.L3/L4/L7 architecture : Traditional network proxies either
HTTP
work at the layer or atTCP
the layer. AtHTTP
the layer, you'll read the entireHTTP
request data off the wire, parse it, look atHTTP
the headers andURL
, 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 toTCP
the layer operation: only read and write bytes, and useIP
the address,TCP
port number, etc. to decide how to process the transaction, but it cannot be based on differentURL
Proxy to a different backend.Envoy
Simultaneous 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/2
treats as a first-class citizen, and can convert betweenHTTP/2
andHTTP/1.1
(both ways), recommendedHTTP/2
.Service discovery and dynamic configuration :
Nginx
Unlike the hot loading of proxies such as , the control planeEnvoy
can beAPI
realized through , the control plane can centralize service discovery, andAPI
dynamically 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,HTTP
routes, listening sockets, etc. in the upstream cluster.gRPC support : gRPC [1] is a framework from , which uses gRPC
Google
as the underlying multiplexed transport protocol. Envoy supports HTTP/2 perfectly, and can also support it very conveniently .RPC
HTTP/2
gRPC
Special protocol support : Envoy supports sniffing and statistics on special protocols at L7, including: MongoDB [2] , DynamoDB [3] , etc.
Observability :
Envoy
The 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-instats
module can integrateprometheus/statsd
monitoring 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 Envoy
the pursuit of the ultimate performance is not the primary goal, it does not mean that Envoy
there 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
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!
❤️给个「在看」,是对我最大的支持❤️