atreugo

High performance and extensible micro web framework. Zero memory allocations in hot paths.

Github星跟踪图

Atreugo

Build Status
Coverage Status
Go Report Card
GoDoc
GitHub release

High performance and extensible micro web framework with zero memory allocations in hot paths.

It's build on top of fasthttp.

Install

  • WITH Go modules:
go get github.com/savsgio/atreugo/v10
  • WITHOUT Go modules:
go get github.com/savsgio/atreugo

Supported Go versions:

  • 1.9.x
  • 1.10.x
  • 1.11.x
  • 1.12.x
  • 1.13.x

Documentation

See: docs

Feature Overview

  • Optimized for speed. Easily handles more than 100K qps and more than 1M concurrent keep-alive connections on modern hardware.

  • Optimized for low memory usage.

  • Easy 'Connection: Upgrade' support via RequestCtx.Hijack.

  • Server provides anti-DoS limits.

  • Middlewares support:

    • Before view execution.
    • After view execution.
  • Easy routing:

    • Path parameters (mandatories and optionals).
    • Views with timeout.
    • Group paths and middlewares.
    • Static files.
    • Serve one file like pdf, etc.
    • Middlewares for especific views.
    • fasthttp handlers support.
    • net/http handlers support.
  • Common responses (also you could use your own responses):

    • JSON
    • HTTP
    • Text
    • Raw
    • File
    • Redirect

Examples:

Go to examples directory to see how to use Atreugo.

Note:

*atreugo.RequestCtx is equal than *fasthttp.RequestCtx, but adding extra funtionality, so you can use
the same functions of *fasthttp.RequestCtx. Don't worry :smile:

Benchmark

Best Performance: Atreugo is one of the fastest go web frameworks in the go-web-framework-benchmark.

  • Basic Test: The first test case is to mock 0 ms, 10 ms, 100 ms, 500 ms processing time in handlers.

  • Concurrency Test (allocations): In 30 ms processing time, the tets result for 100, 1000, 5000 clients is:

* Smaller is better

Useful third-party libraries

Contributing

Feel free to contribute it or fork me... :wink:

主要指标

概览
名称与所有者savsgio/atreugo
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证Apache License 2.0
所有者活动
创建于2018-05-21 12:32:23
推送于2025-01-01 23:10:55
最后一次提交2025-01-02 00:10:28
发布数101
最新版本名称v11.13.2 (发布于 )
第一版名称v1.0.0 (发布于 2018-05-22 12:23:18)
用户参与
星数1.3k
关注者数25
派生数75
提交数467
已启用问题?
问题数60
打开的问题数3
拉请求数32
打开的拉请求数2
关闭的拉请求数10
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?