Breaking the Speed Limit: How Mezon-Proto & Raw QUIC are Redefining Our Architecture

๐ ๐๐๐๐๐๐๐๐ ๐๐๐ ๐๐๐๐๐ ๐๐๐๐๐: ๐๐๐ ๐๐๐๐๐-๐๐๐๐๐ & ๐๐๐ ๐๐๐๐ ๐๐๐ ๐๐๐๐๐ ๐๐๐๐๐ ๐๐๐ ๐๐๐๐๐๐๐๐๐๐๐๐๐
At Mezon, weโve always been obsessed with performance. For a long time, our stack (Nginx + Unix Sockets + Golang (fasthttp)) - served us well. But as our traffic scaled and latency requirements tightened, we realized that even the most optimized HTTP/1.1 or H2 stacks carry a "protocol tax" we were no longer willing to pay.
Today, we are excited to share a major architectural shift: the move to Mezon-Proto powered by Raw QUIC.
By stripping away legacy layers and moving toward a custom transport implementation, weโve effectively decoupled our high-speed "Data Plane" from our complex "Control Plane."
โก๐๐ก๐ ๐๐ซ๐จ๐๐ฅ๐๐ฆ: ๐๐ก๐ "๐๐๐๐ ๐๐๐ฑ"
Even with fasthttp in Go, standard web traffic requires significant CPU cycles for:
- Header Parsing: Validating and processing bulky HTTP headers.
- Context Switching: Moving data between Nginx and our Go backend.
- TCP Overhead: Dealing with head-of-line blocking and multi-step handshakes.
We needed a way to serve the majority of our requests (the "Hot Path") with near-zero processing overhead.
โก๐๐ก๐ ๐๐จ๐ฅ๐ฎ๐ญ๐ข๐จ๐ง: ๐ ๐๐ฎ๐๐ฅ-๐๐๐ญ๐ก ๐๐ซ๐๐ก๐ข๐ญ๐๐๐ญ๐ฎ๐ซ๐
Our new architecture splits traffic into two lanes: the Hot Path for lightning-fast data retrieval and the Cold Path for complex business logic.
1๏ธโฃ๐๐ก๐ ๐๐จ๐ญ ๐๐๐ญ๐ก: ๐๐๐ณ๐จ๐ง-๐๐ซ๐จ๐ญ๐จ ๐จ๐ฏ๐๐ซ ๐๐๐ฐ ๐๐๐๐
For data-heavy requests, the mezon-proto-client talks directly to our new Mezon-Quic Server (written in C).
Zero HTTP Parsing: We use a lightweight, binary protocol.
Tiered Caching: The server checks an L1 Local Cache first. If it misses, it queries Valkey (L2), populates L1, and streams raw bytes back to the client.
The Result: The CPU spends its time moving bytes, not parsing strings.
2๏ธโฃ ๐๐ก๐ ๐๐จ๐ฅ๐ ๐๐๐ญ๐ก: ๐๐๐๐ง ๐๐๐
When a request requires complex logic, it hits our Mezon-API (Golang) via a Unix Domain Socket.
Goodbye fasthttp: Since we are no longer serving public HTTP traffic directly from Go, weโve removed fasthttp.
Raw Sockets: The Go backend now receives pre-parsed protocol data through the Unix socket, reducing memory allocations and GC pressure significantly.
โก๐๐ก๐ฒ ๐๐ก๐ข๐ฌ ๐๐๐ญ๐ญ๐๐ซ๐ฌ
By moving the "Hot Path" to a C-based QUIC implementation and using Unix sockets for internal communication, weโve achieved:
- Drastically lower latency: bypassing Nginx and TCP saves milliseconds per request
- Improved memory efficiency: eliminating HTTP parsing reduces footprint and nearly removes GC pauses
- Simplified backend development: engineers can focus on business logic, not infrastructure tuning
------------------------------------------------
MEZON - YOUR CLAN, YOUR WORLD!
A product proudly developed by the engineers at NCCPLUS.
๐ Website: https://mezon.ai/
๐ง Email: hello@mezon.vn
๐ Hotline: 024.6687.4606
๐ฒ Available on App Store & Google Play