gitmyhub

hertz

Go ★ 7.3k updated 3d ago

Go HTTP framework with high-performance and strong-extensibility for building micro-services.

Hertz is a fast, extensible Go web framework built and battle-tested inside ByteDance that handles high volumes of HTTP traffic with low latency for backend microservices.

GoNetpollsetup: moderatecomplexity 3/5

Hertz is a framework for building web server software written in the Go programming language. A framework is a set of pre-built tools and conventions that helps developers avoid starting from scratch every time they need to handle web traffic. Hertz was originally created inside ByteDance (the company behind TikTok) for internal use and is now open-sourced and available to the public.

The main focus of Hertz is speed and flexibility. It uses a custom-built network library called Netpoll, which the same team developed, and this combination allows Hertz to handle large numbers of incoming requests quickly and with low delays. The README includes benchmark charts comparing it against three or four other popular Go frameworks, showing where it stands in terms of request throughput and response time.

Hertz is built in layers, meaning different internal parts can be swapped or extended independently. Developers can switch between different underlying network libraries depending on the situation, add custom protocol handling, or plug in monitoring and logging tools without rewriting large portions of their application. A companion GitHub organization called Hertz-contrib maintains a collection of ready-made extensions for common needs, including WebSockets, HTTP/2 support, automatic HTTPS certificates, rate limiting, and Prometheus-based performance monitoring.

The project targets teams building microservices, which are small, focused backend services that communicate with each other to form larger systems. It is not a visual product or an end-user application. If you write backend services in Go and want a framework that was stress-tested at ByteDance scale, Hertz is what this project offers. The documentation site (cloudwego.io) covers getting started guides, examples, feature explanations, and a FAQ.

Where it fits