{"id":13499270,"url":"https://github.com/ohler55/agoo","last_synced_at":"2025-10-08T18:03:31.666Z","repository":{"id":39984969,"uuid":"115074220","full_name":"ohler55/agoo","owner":"ohler55","description":"A High Performance HTTP Server for Ruby","archived":false,"fork":false,"pushed_at":"2024-10-20T14:47:02.000Z","size":1037,"stargazers_count":908,"open_issues_count":3,"forks_count":39,"subscribers_count":16,"default_branch":"develop","last_synced_at":"2024-10-29T14:15:19.992Z","etag":null,"topics":["benchmark","clustering","clusters","fast","graphql","graphql-server","http","https","ipv6","rack","rails","rails5","ruby","server","sse","unix-domain-socket","wabur","web","webserver","websocket"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ohler55.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"tidelift":"rubygems/agoo","github":["ohler55"]}},"created_at":"2017-12-22T03:51:02.000Z","updated_at":"2024-10-22T22:24:34.000Z","dependencies_parsed_at":"2023-01-30T19:55:14.114Z","dependency_job_id":"80085a5c-c6d6-466e-b506-f4544746282e","html_url":"https://github.com/ohler55/agoo","commit_stats":{"total_commits":300,"total_committers":14,"mean_commits":"21.428571428571427","dds":"0.050000000000000044","last_synced_commit":"7c352c77cd8127ded28652c1bbba918a0afb449e"},"previous_names":[],"tags_count":72,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohler55%2Fagoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohler55%2Fagoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohler55%2Fagoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohler55%2Fagoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohler55","download_url":"https://codeload.github.com/ohler55/agoo/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208688,"owners_count":21065205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","clustering","clusters","fast","graphql","graphql-server","http","https","ipv6","rack","rails","rails5","ruby","server","sse","unix-domain-socket","wabur","web","webserver","websocket"],"created_at":"2024-07-31T22:00:31.707Z","updated_at":"2025-10-08T18:03:26.630Z","avatar_url":"https://github.com/ohler55.png","language":"C","funding_links":["https://tidelift.com/funding/github/rubygems/agoo","https://github.com/sponsors/ohler55","https://tidelift.com/badges/github/ohler55/agoo","https://tidelift.com/subscription/pkg/rubygems-agoo?utm_source=rubygems-agoo\u0026utm_medium=referral\u0026utm_campaign=readme","https://tidelift.com/security"],"categories":["Libraries","C","Implementations","Web Servers"],"sub_categories":["Ruby Libraries","Ruby"],"readme":"# [![{}j](misc/agoo_128.svg)](http://www.ohler.com/agoo) Agoo\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/ohler55/agoo/CI.yml?logo=github\u0026branch=develop)](https://github.com/ohler55/agoo/actions/workflows/CI.yml)\n[![Gem Version](https://badge.fury.io/rb/agoo.svg)](https://badge.fury.io/rb/agoo)\n![Gem](https://img.shields.io/gem/dt/agoo.svg) [![TideLift](https://tidelift.com/badges/github/ohler55/agoo)](https://tidelift.com/subscription/pkg/rubygems-agoo?utm_source=rubygems-agoo\u0026utm_medium=referral\u0026utm_campaign=readme)\n\nA High Performance HTTP Server for Ruby\n\n## Usage\n\n#### Rack\n\n```ruby\nrequire 'agoo'\n\nAgoo::Server.init(6464, './root')\n\nclass MyHandler\n  def call(req)\n    [ 200, { }, [ \"hello world\" ] ]\n  end\nend\n\nhandler = MyHandler.new\nAgoo::Server.handle(:GET, \"/hello\", handler)\nAgoo::Server.start()\n\n# To run this example type the following then go to a browser and enter a URL\n# of localhost:6464/hello.\n#\n# ruby hello.rb\n```\n\n#### GraphQL\n\n```ruby\nrequire 'agoo'\n\nclass Query\n  def hello\n    'hello'\n  end\nend\n\nclass Schema\n  attr_reader :query\n\n  def initialize\n    @query = Query.new()\n  end\nend\n\nAgoo::Server.init(6464, './root', thread_count: 1, graphql: '/graphql')\nAgoo::Server.start()\nAgoo::GraphQL.schema(Schema.new) {\n  Agoo::GraphQL.load(%^type Query { hello: String }^)\n}\nsleep\n\n# To run this GraphQL example type the following then go to a browser and enter\n# a URL of localhost:6464/graphql?query={hello}\n#\n# ruby hello.rb\n```\n\n## Installation\n```\ngem install agoo\n```\n\n## Using Agoo as a server for Rails\n\nAs agoo supports rack compatible apps you can use it for rails applications:\n\nAdd agoo to the Gemfile:\n\n```\n# Gemfile\ngem 'agoo'\n```\n\nInstall bundle:\n\n```\n$ bundle install\n```\n\nStart rails with agoo as server:\n\n```\n$ rails server -u agoo\n```\n\nEnjoy the increased performance!\n\n## What Is This?\n\nAgoo is Japanese for a type of flying fish. This gem flies. It is a high\nperformance HTTP server that serves static resource at hundreds of thousands\nof fetches per second. A simple hello world Ruby handler at over 100,000\nrequests per second on a desktop computer. That places Agoo at about 85 times\nfaster than Sinatra and 1000 times faster than Rails. In both cases the\nlatency was two orders of magnitude lower or more. Checkout the\n[benchmarks](https://web-frameworks-benchmark.netlify.app/result?l=ruby).\n\nAgoo supports the [Ruby rack API](https://rack.github.io) which allows for the\nuse of rack compatible gems such as Hanami and Rails. Agoo also supports WebSockets and SSE.\n\nAgoo is not available on Windows.\n\n## Getting Started\n\nSome examples can be found in the `example` directory.  Some other\ndocumented walk through examples of using Agoo are in the `misc`\ndirectory. These examples are described in markdown files. Some like\nthe [song](misc/song.md) example are simple while others like the\n[glue](misc/glue.md) are more complex. The documented walk through\nexamples are:\n\n- [flymd](misc/flymd.md) - realtime push\n- [glue](misc/glue.md) - publish and subscribe\n- [optimize](misc/optimize.md) - optimizing static asset use\n- [push](misc/push.md) - push with Rack\n- [rails](misc/rails.md) - faster rails\n- [song](misc/song.md) - fun and simple GraphQL\n\n## News\n\n- Version 2.11.0 supports GraphQL subscriptions. TLS (SSL,HTTPS)\n  support added. Examples for both. Related, the\n  [graphql-benchmark](https://github.com/the-benchmarker/graphql-benchmarks)\n  repo was given to [the-benchmarker](https://github.com/the-benchmarker).\n\n- Agoo has a new GraphQL module with a simple, easy to use\n  API. Checkout the [hello](example/graphql/hello.rb) or\n  [song](example/graphql/song.rb) examples.\n  [An Instrumental Intro to GraphQL with Ruby](https://blog.appsignal.com/2019/01/29/graphql.html)\n  is a walk through.\n\n- Agoo takes first place as the highest throughput on [web-frameworks\n  benchmarks](https://github.com/the-benchmarker/web-frameworks). Latency was\n  not at the top but release 2.5.2 improves that. The Agoo-C benchmarks it at\n  the top. The fastest web server across all languages.\n\n- Clustered Agoo is ready. For slower application and a machine with multiple\n  cores a significant improvement is performance is realized. The application\n  must be stateless in that no data is shared between workers.\n\n- WebSocket and SSE are supported and a PR has been submitted to updated the\n  Rack spec. Go over to the [proposed Rack\n  extension](https://github.com/rack/rack/pull/1272) and give it a look and a\n  thumbs-up or heart if you like it.\n\n- Agoo now serves Rails static assets more than 8000 times faster than the\n  default Puma. Thats right, [8000 times faster](misc/rails.md).\n\n## Releases\n\nSee [file:CHANGELOG.md](CHANGELOG.md)\n\nReleases are made from the master branch. The default branch for checkout is\nthe develop branch. Pull requests should be made against the develop branch.\n\n## Support\n\n[Get supported Agoo with a Tidelift Subscription.](https://tidelift.com/subscription/pkg/rubygems-agoo?utm_source=rubygems-agoo\u0026utm_medium=referral\u0026utm_campaign=readme) Security updates are [supported](https://tidelift.com/security).\n\n## Links\n\n - *Documentation*: http://rubydoc.info/gems/agoo or http://www.ohler.com/agoo/doc/index.html\n\n - *GitHub* *repo*: https://github.com/ohler55/agoo\n\n - *RubyGems* *repo*: https://rubygems.org/gems/agoo\n\n - *WABuR* *repo*: https://github.com/ohler55/wabur has an option to use Agoo\n\n - *Perfer* *repo*: https://github.com/ohler55/perfer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohler55%2Fagoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohler55%2Fagoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohler55%2Fagoo/lists"}