Hertz alternatives and similar packages
Based on the "Web Frameworks" category.
Alternatively, view hertz alternatives based on common mentions on social networks and blogs.
-
Gin
Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin. -
Iris
The fastest HTTP/2 Go Web Framework. New, modern and easy to learn. Fast development with Code you control. Unbeatable cost-performance ratio :rocket: -
Gorilla WebSocket
DISCONTINUED. A fast, well-tested and widely used WebSocket implementation for Go. -
goa
Design-first Go framework that generates API code, documentation, and clients. Define once in an elegant DSL, deploy as HTTP and gRPC services with zero drift between code and docs. -
GoFr
An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability. -
Huma
A modern, simple, fast & flexible micro framework for building HTTP REST/RPC APIs in Go backed by OpenAPI 3 and JSON Schema. -
Faygo
Faygo is a fast and concise Go Web framework that can be used to develop high-performance web app(especially API) with fewer codes. Just define a struct handler, faygo will automatically bind/verify the request parameters and generate the online API doc. -
go-server-timing
DISCONTINUED. Go (golang) library for creating and consuming HTTP Server-Timing headers -
golongpoll
golang long polling library. Makes web pub-sub easy via HTTP long-poll servers and clients :smiley: :coffee: :computer:
CodeRabbit: AI Code Reviews for Developers

Do you think we are missing an alternative of Hertz or a related project?
Popular Comparisons
README
Hertz
English | [中文](README_cn.md)
Hertz [həːts] is a high-usability, high-performance and high-extensibility Golang HTTP framework that helps developers build microservices. It was designed with reference to other open-source frameworks like fasthttp, 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](images/performance-4.png) Comparison of three frameworks: [Performance](images/performance-3.png) 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](ROADMAP.md).
- Multi-protocol support
The Hertz framework provides HTTP1.1, 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
Service Governance
Contains tracer monitor. more
Framework Extension
Contains network library extensions. more
Reference
Apidoc, 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-benchmark project to track and compare the performance of Hertz and other frameworks in different situations for reference.
Related Projects
- Netpoll: A high-performance network library. Hertz integrated by default.
- Hertz-Contrib: A partial extension library of Hertz, which users can integrate into Hertz through options according to their needs.
- Example: Use examples of Hertz. ## Extensions
Extensions | Description |
---|---|
Websocket | Enable Hertz to support the Websocket protocol. |
Pprof | Extension for Hertz integration with Pprof. |
Sessions | Session middleware with multi-state store support. |
Obs-opentelemetry | Hertz's Opentelemetry extension that supports Metric, Logger, Tracing and works out of the box. |
Registry | Provides service registry and discovery functions. So far, the supported service discovery extensions are nacos, consul, etcd, eureka, polaris, servicecomb, zookeeper, redis. |
Keyauth | Provides token-based authentication. |
Secure | Secure middleware with multiple configuration items. |
Sentry | Sentry extension provides some unified interfaces to help users perform real-time error monitoring. |
Requestid | Add request id in response. |
Limiter | Provides a current limiter based on the bbr algorithm. |
Jwt | Jwt extension. |
Autotls | Make Hertz support Let's Encrypt. |
Monitor-prometheus | Provides service monitoring based on Prometheus. |
I18n | Helps translate Hertz programs into multi programming languages. |
Reverseproxy | Implement a reverse proxy. |
Opensergo | The Opensergo extension. |
Gzip | A Gzip extension with multiple options. |
Cors | Provides cross-domain resource sharing support. |
Swagger | Automatically generate RESTful API documentation with Swagger 2.0. |
Tracer | Link tracing based on Opentracing. |
Recovery | Recovery middleware for Hertz. |
Basicauth | Basicauth middleware can provide HTTP basic authentication. |
Lark | Use hertz handle Lark/Feishu card message and event callback. |
Logger | Logger extension for Hertz, which provides support for zap, logrus, zerologs logging frameworks. |
Blogs
- ByteDance Practice on Go Network Library
- Ultra-large-scale Enterprise-level Microservice HTTP Framework — Hertz is Officially Open Source!
- ByteDance Open Source Go HTTP Framework Hertz Design Practice
- Help ByteDance Reduce Costs and Increase Efficiency, the Design Practice for Large-scale Enterprise-level HTTP Framework Hertz
- A Practical Introduction to the HTTP Framework Hertz: A Guide to Performance Testing ## Contributing
RoadMap
[Hertz RoadMap](ROADMAP.md)
License
Hertz is distributed under the Apache License, version 2.0. The licenses of third party dependencies of Hertz are explained here.
Community
- Email: [[email protected]]([email protected])
- How to become a member: COMMUNITY MEMBERSHIP
- Issues: Issues
- Slack: Join our CloudWeGo community Slack Channel.
- Lark: Scan the QR code below with Lark to join our CloudWeGo/hertz user group.
[LarkGroup](images/lark_group.png)
- WeChat: CloudWeGo community WeChat group.
[WechatGroup](images/wechat_group_cn.png)
Contributors
Thank you for your contribution to Hertz!
Landscapes
CloudWeGo enriches the CNCF CLOUD NATIVE Landscape.
*Note that all licence references and agreements mentioned in the Hertz README section above
are relevant to that project's source code only.