Skip to content

Commit c64276d

Browse files
JameelHaodawid-nowakgemini-code-assist[bot]
authored
docs: Add architecture diagram and reorganize README structure (#159)
* Add CODE_OF_CONDUCT.md - Follow CNCF Code of Conduct - Consistent with Kmesh community standards - Same contact email for the Kmesh ecosystem Signed-off-by: JameelHao <haoxing12311@gmail.com> * Add Orion Architecture section to README - Add comprehensive architecture diagram (ASCII art) - Document core components and their responsibilities - Explain xDS integration and data flow - Highlight key design principles (zero-copy, async, memory safety) - Follow Kmesh README style Signed-off-by: JameelHao <haoxing12311@gmail.com> * Reorganize README: move Architecture after Introduction and add professional diagram Signed-off-by: JameelHao <haoxing12311@gmail.com> * Update architecture diagram with improved layout and spacing Signed-off-by: JameelHao <haoxing12311@gmail.com> * Update architecture diagram: cleaner arrows and better text spacing Signed-off-by: JameelHao <haoxing12311@gmail.com> * Update diagram with draw.io style arrows Signed-off-by: JameelHao <haoxing12311@gmail.com> * Add detailed architecture diagrams: HTTP Connection Manager and ext_proc Signed-off-by: JameelHao <haoxing12311@gmail.com> * Update architecture diagram: fix spacing and remove Key Design Principles Signed-off-by: JameelHao <haoxing12311@gmail.com> * docs: Add performance benchmark charts to README - Add 4 benchmark charts in a 2x2 table layout - Show HTTP and HTTPS benchmark results (RPS and Latency) - Provide visual evidence of 2-4x performance improvement over Envoy Signed-off-by: JameelHao <haoxing12311@gmail.com> * docs: Remove 'Cloud & AI Native' claim from Key Design Principles Keep the documentation focused on core technical strengths. Can be added back in future releases with supporting evidence. Signed-off-by: JameelHao <haoxing12311@gmail.com> * feat: Add PR template following kmesh style - Adopt kmesh's lightweight PR template format - Use /kind labels (bug, feature, enhancement, etc.) - Add /kind performance for performance-related PRs - Include release-note section for user-facing changes Based on: https://github.com/kmesh-net/kmesh/blob/main/.github/PULL_REQUEST_TEMPLATE.md Signed-off-by: JameelHao <haoxing12311@gmail.com> * Update CODE_OF_CONDUCT.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Signed-off-by: JameelHao <haoxing12311@gmail.com> Co-authored-by: Dawid Nowak <nowakd@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 270522f commit c64276d

File tree

4 files changed

+101
-42
lines changed

4 files changed

+101
-42
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
**What type of PR is this?**
2+
3+
<!--
4+
Add one of the following kinds:
5+
6+
/kind bug
7+
/kind cleanup
8+
/kind enhancement
9+
/kind security
10+
/kind documentation
11+
/kind feature
12+
/kind performance
13+
14+
-->
15+
16+
**What this PR does / why we need it**:
17+
18+
**Which issue(s) this PR fixes**:
19+
Fixes #
20+
21+
**Special notes for your reviewer**:
22+
23+
**Does this PR introduce a user-facing change?**:
24+
<!--
25+
If no, just write "NONE" in the release-note block below.
26+
If yes, a release note is required.
27+
-->
28+
```release-note
29+
30+
```

CODE_OF_CONDUCT.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Orion Proxy Community Code of Conduct
2+
3+
Orion Proxy follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
4+
5+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at `kmesh.net@gmail.com`.

README.md

Lines changed: 66 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,65 +2,72 @@
22

33
<!--
44
[![LICENSE](https://img.shields.io/github/license/kmesh-net/orion)](/LICENSE) [![codecov](https://codecov.io/gh/kmesh-net/kmesh/graph/badge.svg?token=0EGQ84FGDU)](https://img.shields.io/github/license/kmesh-net/orion) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkmesh-net%2Forion.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkmesh-net%2Forion?ref=badge_shield)
5-
65
-->
76

87
## Introduction
98

10-
Orion Proxy is a high performance and memory safe implementation of popular [Envoy Proxy](https://www.envoyproxy.io/). Orion Proxy is implemented in Rust using high-quality open source components.
9+
Orion Proxy is a high performance and memory safe implementation of popular [Envoy Proxy](https://www.envoyproxy.io/). Orion Proxy is implemented in Rust using high-quality open source components.
1110

12-
### Key features
11+
### Key Features
1312

1413
**Memory Safety**
1514

16-
Rust programming language allows to avoid a whole lot of bugs related to memory management and data races making Orion Proxy a very robust and secure application.
17-
15+
Rust programming language allows to avoid a whole lot of bugs related to memory management and data races making Orion Proxy a very robust and secure application.
1816

1917
**Performance**
2018

21-
Orion Proxy offers 2x-4x better throughput and latency than Envoy Proxy. Refer to [Performance](docs/performance/performance.md) to see performance figures and for more details how we tested Orion Proxy .
22-
19+
Orion Proxy offers 2x-4x better throughput and latency than Envoy Proxy. Refer to [Performance](docs/performance/performance.md) to see performance figures and for more details how we tested Orion Proxy.
20+
21+
<table>
22+
<tr>
23+
<th colspan="2" align="center">HTTP Benchmark Results</th>
24+
</tr>
25+
<tr>
26+
<td width="50%"><img src="docs/pics/performance/baseline/wrk-reqsec.png" alt="HTTP Requests per Second"/><br/><p align="center"><b>Requests per Second</b></p></td>
27+
<td width="50%"><img src="docs/pics/performance/baseline/wrk-latency.png" alt="HTTP Latency"/><br/><p align="center"><b>Latency (microseconds)</b></p></td>
28+
</tr>
29+
<tr>
30+
<th colspan="2" align="center">HTTPS Benchmark Results</th>
31+
</tr>
32+
<tr>
33+
<td width="50%"><img src="docs/pics/performance/tls/wrk-reqsec.png" alt="HTTPS Requests per Second"/><br/><p align="center"><b>Requests per Second</b></p></td>
34+
<td width="50%"><img src="docs/pics/performance/tls/wrk-latency.png" alt="HTTPS Latency"/><br/><p align="center"><b>Latency (microseconds)</b></p></td>
35+
</tr>
36+
</table>
2337

2438
**Compatibility**
2539

2640
Orion Proxy configuration is generated from Envoy's xDS protobuf definitions. Orion Proxy aims to be a drop in replacement for Envoy.
2741

42+
## Architecture
2843

44+
Orion Proxy is designed as a high-performance L7 proxy compatible with Envoy's xDS API while delivering superior performance through Rust's zero-cost abstractions and memory safety guarantees.
2945

30-
## Quick Start
31-
32-
**Note:** To control how many CPU cores/threads Orion uses (especially in containers), set the `ORION_CPU_LIMIT` environment variable. In Kubernetes, use the Downward API:
46+
<img src="docs/pics/architecture/orion_architecture.png" alt="Orion Architecture" style="zoom: 80%;" />
3347

34-
```yaml
35-
env:
36-
- name: ORION_CPU_LIMIT
37-
valueFrom:
38-
resourceFieldRef:
39-
resource: limits.cpu
40-
divisor: "1"
41-
```
48+
### Core Components
4249

43-
## CPU/Thread Limit Configuration
50+
- **xDS Client**: Subscribes to and processes Envoy xDS APIs (LDS, RDS, CDS, EDS) for dynamic configuration updates
51+
- **Configuration Manager**: Manages runtime configuration, converts Envoy protobuf definitions to Orion's internal representation
52+
- **Listener Manager**: Handles incoming connections, applies listener filters (TLV, Proxy Protocol, TLS Inspector)
53+
- **Router (L7)**: HTTP routing, header manipulation, retries, timeouts, and traffic shifting
54+
- **Cluster Manager**: Manages upstream clusters, implements load balancing algorithms (round-robin, least-request, random)
55+
- **Transport Layer**: High-performance async I/O using Tokio, supports HTTP/1.1, HTTP/2, and raw TCP
56+
- **TLS Engine**: Powered by rustls for memory-safe TLS/mTLS, client certificate validation
57+
- **Observability**: Prometheus metrics export, OpenTelemetry tracing integration
58+
- **Admin Interface**: HTTP API for runtime configuration inspection, metrics, and health checks
4459

45-
Orion can be configured to use a specific number of CPU cores/threads by setting the `ORION_CPU_LIMIT` environment variable. This is especially useful in containerized environments where access to `/sys/fs` may be restricted.
60+
### Key Design Principles
4661

47-
### Kubernetes Example (Downward API)
48-
49-
Add the following to your container spec to set `ORION_CPU_LIMIT` to the container's CPU limit:
50-
51-
```yaml
52-
env:
53-
- name: ORION_CPU_LIMIT
54-
valueFrom:
55-
resourceFieldRef:
56-
resource: limits.cpu
57-
divisor: "1"
58-
```
59-
60-
Orion will automatically use this value to determine the number of threads/cores.
62+
- **Zero-Copy I/O**: Minimizes memory allocations and copies through Rust's ownership system and `Bytes` buffers
63+
- **Async Runtime**: Built on Tokio for efficient handling of thousands of concurrent connections
64+
- **Memory Safety**: Eliminates entire classes of bugs (use-after-free, data races) through Rust's type system
65+
- **Envoy Compatibility**: Direct protobuf compatibility with Envoy xDS APIs for seamless integration with Istio and other control planes
6166

67+
## Quick Start
6268

6369
### Building
70+
6471
```console
6572
git clone https://github.com/kmesh-net/orion
6673
cd orion
@@ -70,6 +77,7 @@ cargo build
7077
```
7178

7279
### Running
80+
7381
```console
7482
cargo run --bin orion -- --config orion/conf/orion-runtime.yaml
7583
```
@@ -89,7 +97,28 @@ docker run -p 8000:8000 --name orion-proxy orion-proxy
8997
curl -v http://localhost:8000/direct-response # Should return HTTP 200 with "meow! 🐱"
9098
```
9199

92-
### Testing with Backend Servers
100+
For detailed Docker configuration options, see [docker/README.md](docker/README.md).
101+
102+
## CPU/Thread Limit Configuration
103+
104+
Orion can be configured to use a specific number of CPU cores/threads by setting the `ORION_CPU_LIMIT` environment variable. This is especially useful in containerized environments where access to `/sys/fs` may be restricted.
105+
106+
### Kubernetes Example (Downward API)
107+
108+
Add the following to your container spec to set `ORION_CPU_LIMIT` to the container's CPU limit:
109+
110+
```yaml
111+
env:
112+
- name: ORION_CPU_LIMIT
113+
valueFrom:
114+
resourceFieldRef:
115+
resource: limits.cpu
116+
divisor: "1"
117+
```
118+
119+
Orion will automatically use this value to determine the number of threads/cores.
120+
121+
## Testing with Backend Servers
93122
94123
For testing load balancing with real backend servers:
95124
@@ -108,8 +137,6 @@ curl http://localhost:8000/ # Proxies to nginx backends!
108137
docker rm -f backend1 backend2 orion-proxy
109138
```
110139

111-
For detailed Docker configuration options, see [docker/README.md](docker/README.md).
112-
113140
## Examples and Demos
114141

115142
### TLV Listener Filter Demo
@@ -131,16 +158,13 @@ This demo will:
131158
- Show debug logs confirming successful TLV processing
132159
- Verify compatibility with Kmesh TLV configuration format
133160

134-
135161
For detailed information, see [examples/tlv-filter-demo/README.md](examples/tlv-filter-demo/README.md).
136162

137163
<!-- ## Contributing -->
138164
<!-- If you're interested in being a contributor and want to get involved in developing Orion Proxy, please see [CONTRIBUTING](CONTRIBUTING.md) for more details on submitting patches and the contribution workflow. -->
139165

140166
## License
141167

142-
Orion Proxy is licensed under the
143-
[Apache License, Version 2.0](./LICENSE).
144-
168+
Orion Proxy is licensed under the [Apache License, Version 2.0](./LICENSE).
145169

146-
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkmesh-net%2Forion.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkmesh-net%2Forion?ref=badge_large)
170+
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkmesh-net%2Forion.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkmesh-net%2Forion?ref=badge_large)
447 KB
Loading

0 commit comments

Comments
 (0)