Giter Site home page Giter Site logo

savsgio / atreugo Goto Github PK

View Code? Open in Web Editor NEW
1.2K 25.0 70.0 523 KB

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

License: Apache License 2.0

Go 100.00%
go golang fasthttp micro-framework atreugo extensible performance fast zero

atreugo's Introduction

Atreugo

Test status Coverage Status Go Report Card GoDev GitHub release

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

It's built on top of fasthttp.

Install

go get github.com/savsgio/atreugo/v11

Supported Go versions:

  • 1.22.x
  • 1.21.x
  • 1.20.x
  • 1.19.x

Documentation

See: docs

Organization

Find useful libraries like middlewares, websocket, etc.

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 specific 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 to see how to use Atreugo.

Note:

*atreugo.RequestCtx is equal to *fasthttp.RequestCtx, but with extra functionalities, so you can use the same functions of *fasthttp.RequestCtx. Don't worry ๐Ÿ˜„

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 test result for 100, 1000, 5000 clients is:

* Smaller is better

Contributing

Feel free to contribute or fork me... ๐Ÿ˜‰

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.