cloudwego /hertz
Go HTTP framework with high-performance and strong-extensibility for building micro-services.
★ 7,403⑂ 649👁 51⑃ 838● 701▤ 65
+1
日增长
+2
周增长
+19
月增长
7,403
stars
649
forks
51
watchers
838
prs
701
issues
65
releases
README
Hertz English | 中文 !Stars !Forks Hertz [həːts] is a high-usability, high-performance and high-extensibility Golang HTTP framework that helps developers build microservices. It was originally a fork of fasthttp and inspired by gin, echo and combined with the internal requirements in ByteDance. At present, it has been widely used inside ByteDance. Nowadays, more and more microservices use Golang. If you have requirements for microservice performance and hope that the framework can fully meet the internal customizable requirements, Hertz will be a good choice. Basic Features - High usability During the development process, it is often more important to write the correct code quickly. Therefore, in the iterative process of Hertz, we actively listen to users' opinions and continue to polish the framework, hoping to provide users with a better user experience and help users write correct code faster. - High performance Hertz uses the self-developed high-performance network library Netpoll by default. In some special scenarios, compared to Go Net, Hertz has certain advantages in QPS and time delay. For performance data, please refer to the Echo data in the figure below. Comparison of four frameworks: !Performance Comparison of three frameworks: !Performance For detailed performance data, please refer to hertz-benchmark. - High extensibility Hertz adopts a layered design, providing more interfaces and default extension implementations. Users can also extend by themselves. At the same time, thanks to the layered design of the framework, the extensibility of the framework will be much greater. At present, only stable capabilities are open-sourced to the community. More planning refers to RoadMap. - Multi-protocol support The Hertz framework provides HTTP/1.1 and ALPN protocol support natively. In addition, due to the layered design, Hertz even supports custom build protocol resolution logic to meet any needs of protocol layer extensions. - Network layer switching capability Hertz implements the function to switch between Netpoll and Go Net on demand. Users can choose the appropriate network library for different scenarios. And Hertz also supports the extension of network library in the form of plug-ins. Documentation Getting Started Example The Hertz-Examples repository provides code out of the box. more Basic Features Contains introduction and use of general middleware, context selection, data binding, data rendering, direct access, logging, error handling. more Observability Contains instrumentation, logging, tracing. more Framework Extension Contains network library extensions, protocol extensions, logger extensions, monitoring extensions. more Reference Framework configurable items list. more FAQ Frequently Asked Questions. more Performance Performance testing can only provide a relative reference. In production, there are many factors that can affect actual performance. We provide the hertz
Top issues
#73Are you using Hertz ? 46 comments · 2022-06-20#1428自定义模板中使用 update_behavior: type: "skip" 不生效8 comments · 2025-08-28#1009google.protobuf.Empty 生成异常问题。7 comments · 2023-11-28#1154生成 model 文件路径不符合预期6 comments · 2024-07-15#1121[Question] Static method not work welll with relative path.5 comments · 2024-05-23#766[Feature Request]auto gen swagger comment for handler5 comments · 2023-05-06#724[Question]: How do I implement a Java servlet-like forward with the URL address unchanged?5 comments · 2023-04-14#343Use better gzip/deflate4 comments · 2022-11-02
Discussions
Latest release
v0.10.6 v0.10.6 2026-08-06What's Changed Feat feat(client): add optional pooled connection health check by @StellarisW in https://github.com/cloudwego/hertz/pull/1523 Fix fix: reject empty HTTP trailer tokens by @Xander-ByteDance in https://github.com/cloudwego/hertz/pull/1522 fix: sanitize request headers during unsafe redirects by @wdp2020 in https://github.com/cloudwego/hertz/pull/1524 CI ci: deprecate self-hosted arm64, MacOS by @xiaost in https://github.com/cloudwego/hertz/pull/1514 New Contributors @Xander-ByteDance made their first contribution in https://github.com/cloudwego/hertz/pull/1522