Home

Awesome

Hertz

English | 中文

Release WebSite License Go Report Card OpenIssue ClosedIssue Stars Forks

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

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, monitoring, OpenTelemetry integration. more

Service Governance

Contains service registration and discovery extensions, Sentinel integration. 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

Extensions

ExtensionsDescription
AutotlsMake Hertz support Let's Encrypt.
Http2HTTP2 support for Hertz.
WebsocketEnable Hertz to support the Websocket protocol.
EtagSupport ETag (or entity tag) HTTP response header for Hertz.
LimiterProvides a current limiter based on the bbr algorithm.
Monitor-prometheusProvides service monitoring based on Prometheus.
Obs-opentelemetryHertz's Opentelemetry extension that supports Metric, Logger, Tracing and works out of the box.
OpensergoThe Opensergo extension.
PprofExtension for Hertz integration with Pprof.
RegistryProvides service registry and discovery functions. So far, the supported service discovery extensions are nacos, consul, etcd, eureka, polaris, servicecomb, zookeeper, redis.
SentrySentry extension provides some unified interfaces to help users perform real-time error monitoring.
TracerLink tracing based on Opentracing.
BasicauthBasicauth middleware can provide HTTP basic authentication.
JwtJwt extension.
KeyauthProvides token-based authentication.
RequestidAdd request id in response.
SessionsSession middleware with multi-state store support.
CasbinSupports various access control models by Casbin.
CorsProvides cross-domain resource sharing support.
CsrfCsrf middleware is used to prevent cross-site request forgery attacks.
SecureSecure middleware with multiple configuration items.
GzipA Gzip extension with multiple options.
I18nHelps translate Hertz programs into multi programming languages.
LarkUse hertz handle Lark/Feishu card message and event callback.
LoadbalanceProvides load balancing algorithms for Hertz.
LoggerLogger extension for Hertz, which provides support for zap, logrus, zerologs logging frameworks.
RecoveryRecovery middleware for Hertz.
ReverseproxyImplement a reverse proxy.
SwaggerAutomatically generate RESTful API documentation with Swagger 2.0.
CacheHertz middleware for cache HTTP response with multi-backend support

Blogs

Contributing

Contributing

RoadMap

Hertz RoadMap

License

Hertz is distributed under the Apache License, version 2.0. The licenses of third party dependencies of Hertz are explained here.

Community

LarkGroup

Contributors

Thank you for your contribution to Hertz!

Contributors

Landscapes

<p align="center"> <img src="https://landscape.cncf.io/images/cncf-landscape-horizontal-color.svg" width="150"/>&nbsp;&nbsp;<img src="https://www.cncf.io/wp-content/uploads/2023/04/cncf-main-site-logo.svg" width="200"/> <br/><br/> CloudWeGo enriches the <a href="https://landscape.cncf.io/">CNCF CLOUD NATIVE Landscape</a>. </p>