
Foreword#
Overview of this book#
This book is called āEnvoy Proxy Insiderā. It is a book in progress, now in draft stage. Itās a book that dives deep into the mechanisms and implementations of Envoy Proxy. Much of its content comes from my previous book āIstio & Envoy Insiderā, from which Iāve extracted the Envoy part and reorganized it into a standalone book. The purpose is to help readers focus solely on Envoy without distraction from Istio. Some content is irrelevant or inapplicable to Istio, so it makes sense to split them. Moving forward, āIstio & Envoy Insiderā will only update Istio-related content, while this new book will carry all updates related to Envoy.
Some readers may wonder why split Envoy into a separate book. Recently, Iāve noticed that Envoy is used far beyond Istio. It has become a standalone and widely adopted programmable proxy, used across various cloud-native architectures, AI gateways, edge computing, and many non-Istio projects. Itās now infrastructure for infrastructures. Thatās why I believe a dedicated book is necessary to help non-Istio readers understand its design and implementation.
What this book is about#
This book includes: Envoy source code deep dive, in-depth Envoy fundamentals analysis. But itās not a traditional ādeep dive xyz source codeā type of book. on the contrary, I have done my best not to directly paste source code in the book. Reading source code is a necessary step to grasp the details of the implementation, but browsing source code in a book is generally a very bad experience. So, this book uses source code navigation diagrams to let readers understand the full picture of the implementation, rather than getting lost in the details of fragmented source code snippets and forgetting the whole picture.
In this book, Iāve tried to think as systematically as possible from a design and implementation perspective:
The reasons behind the design decisions and history of evolution.
Deep dive into the high level concept and implementation details of Envoy.
The book is just a collection of thoughts and notes after Iāve been researching and using Istio for a while. Iāve just been troubleshooting some Istio/Envoy related functionality and performance issues, and browsing and debugging some Istio/Envoy code.
While diving into Istio. I found that there is a lot of valuable information on the Internet. However, either it is mainly from the userās point of view, but does not talk about the implementation mechanism; or it does talk about the mechanism, but the content lacks systematization and consistency.
What this book is not#
This book is not a userās manual. It does not teach how to learn Envoy from a userās point of view, it does not preach how powerful Envoy is, and it does not teach how to use Envoy, there are too many excellent books, articles, and documents on this topic.
𤷠: Yet, another Envoy User Guide?
š : No!
Target Audience#
This book focuses on the design and implementation mechanism of Envoy. It is assumed that the reader already has some experience in using Envoy and is interested in further studying its implementation mechanism.
Book access address#
Participate in writing#
If you are also interested in writing this book, feel free to contact me.
Thanks to the fellow who suggested the Issue š»#
tanjunchen: lots of very good comments on the reading experience and typography.
Dedication š#
First, to my dear parents, for showing me how to live a happy and productive life. To my dear wife and our amazing kid - thanks for all your love and patience.
Copyleft Disclaimer#
If you reproduce or modify any text or image, please give credit to the original source.
Feedback#
As this is an open source interactive book, feedback from readers is of course very important. If you find a mistake in the book, or have a better suggestion, you may want to submit an Issue: labilezhu/envoy-insider-en#issues
Chinese version#
There is a Chinese version: äøęē .


Catalog#
Catalog
- Interactive Book
- Programmable
- Configuration Example under Istio
- Main process and concepts
- Architecture
- Source code design
- Event-driven
- Thread model
- Listener
- Network Filter
- http connection manager
- Router
- HTTP/1.1 Stream (draft)
- Buffer
- Flow Control
- Request and response scheduling
- HTTP Connection Lifecycle Management
- Envoy Metrics
- Upstream
- Socket
- Socket Options
- TCP statistics
- Performance
- Disruptions and Recover
- Observability
- Troubleshooting
- Decrypt and Dump TLS Traffic
- TCP Proxy half-closed connection leak for 1 hour in some scenarios
- App outbound connecting timed out because App selected a ephemeral port which collisions with the existing socket on 15001(outbound) listener
- Preserving HTTP/1 header case across Envoy accidentally disabled HTTP/2 on a Istio mesh mixing HTTP1 and HTTP2
- Developing Envoy Proxy