[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7982":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":22,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},7982,"goliath","postrank-labs\u002Fgoliath","postrank-labs","Goliath is a non-blocking Ruby web server framework","",null,"Ruby",2423,215,85,31,0,1,59.1,"Other",false,"master",true,[],"2026-06-12 04:00:36","# Goliath\n\n[\u003Cimg src=\"https:\u002F\u002Fsecure.travis-ci.org\u002Fpostrank-labs\u002Fgoliath.png?travis\"\u002F>](http:\u002F\u002Ftravis-ci.org\u002Fpostrank-labs\u002Fgoliath) [\u003Cimg src=\"https:\u002F\u002Fgemnasium.com\u002Fpostrank-labs\u002Fgoliath.png?travis\"\u002F>](https:\u002F\u002Fgemnasium.com\u002Fpostrank-labs\u002Fgoliath)\n\nGoliath is an open source version of the non-blocking (asynchronous) Ruby web server framework. It is a lightweight framework designed to meet the following goals: bare metal performance, Rack API and middleware support, simple configuration, fully asynchronous processing, and readable and maintainable code (read: no callbacks).\n\nThe framework is powered by an EventMachine reactor, a high-performance HTTP parser and Ruby 1.9+ runtime. The one major advantage Goliath has over other asynchronous frameworks is the fact that by leveraging Ruby fibers introduced in Ruby 1.9+, it can untangle the complicated callback-based code into a format we are all familiar and comfortable with: linear execution, which leads to more maintainable and readable code.\n\nEach HTTP request within Goliath is executed within its own Ruby fiber and all asynchronous I\u002FO operations can transparently suspend and later resume the processing without requiring the developer to write any additional code. Both request processing and response processing can be done in fully asynchronous fashion: streaming uploads, firehose API's, request\u002Fresponse, websockets, and so on.\n\n## Installation & Prerequisites\n\n* Install Ruby 1.9 (via RVM or natively)\n\n```bash\n$> gem install rvm\n$> rvm install 1.9.3\n$> rvm use 1.9.3\n```\n\n* Install Goliath:\n\n```bash\n$> gem install goliath\n```\n\n## Getting Started: Hello World\n\n```ruby\nrequire 'goliath'\n\nclass Hello \u003C Goliath::API\n  def response(env)\n    [200, {}, \"Hello World\"]\n  end\nend\n\n> ruby hello.rb -sv\n> [97570:INFO] 2011-02-15 00:33:51 :: Starting server on 0.0.0.0:9000 in development mode. Watch out for stones.\n```\n\nSee examples directory for more hands-on examples of building Goliath powered web-services.\n\n## Performance: MRI, JRuby, Rubinius\n\nGoliath is not tied to a single Ruby runtime - it is able to run on MRI Ruby, JRuby and Rubinius today. Depending on which platform you are working with, you will see different performance characteristics. At the moment, we recommend MRI Ruby 1.9.3+ as the best performing VM: a roundtrip through the full Goliath stack on MRI 1.9.3 takes ~0.33ms (~3000 req\u002Fs).\n\nGoliath has been used in production environments for 2+ years, across many different companies: PostRank (now Google), [OMGPOP](OMGPOP) (now Zynga), [GameSpy](http:\u002F\u002Fwww.poweredbygamespy.com\u002F2011\u002F09\u002F09\u002Fgrowing-pains-they-hurt-so-good\u002F), and many others.\n\n## FAQ\n\n* How does Goliath compare to other Ruby async app-servers like Thin?\n    * They are similar (both use Eventmachine reactor), but also very different. Goliath is able to run on different Ruby platforms (see above), uses a different HTTP parser, supports HTTP keepalive & pipelining, and offers a fully asynchronous API for both request and response processing.\n\n* How does Goliath compare to Mongrel, Passenger, Unicorn?\n    * Mongrel is a threaded web-server, and both Passenger and Unicorn fork an entire VM to isolate each request from each other. By contrast, Goliath builds a single instance of the Rack app and runs all requests in parallel through a single VM, which leads to a much smaller memory footprint and less overhead.\n\n* How do I deploy Goliath in production?\n    * We recommend deploying Goliath behind a reverse proxy such as HAProxy ([sample config](https:\u002F\u002Fgithub.com\u002Fpostrank-labs\u002Fgoliath\u002Fwiki\u002FHAProxy)), Nginx or equivalent. Using one of the above, you can easily run multiple instances of the same application and load balance between them within the reverse proxy.\n\n## Guides\n\n* [Server Options](https:\u002F\u002Fgithub.com\u002Fpostrank-labs\u002Fgoliath\u002Fwiki\u002FServer)\n* [Middleware](https:\u002F\u002Fgithub.com\u002Fpostrank-labs\u002Fgoliath\u002Fwiki\u002FMiddleware)\n* [Configuration](https:\u002F\u002Fgithub.com\u002Fpostrank-labs\u002Fgoliath\u002Fwiki\u002FConfiguration)\n* [Plugins](https:\u002F\u002Fgithub.com\u002Fpostrank-labs\u002Fgoliath\u002Fwiki\u002FPlugins)\n* [Zero Downtime Restart](https:\u002F\u002Fgithub.com\u002Fpostrank-labs\u002Fgoliath\u002Fwiki\u002FZero-downtime-restart)\n\n\n### Hands-on applications:\n\nIf you are you new to EventMachine, or want a detailed walk-through of building a Goliath powered API? You're in luck, a super-awesome Pluralsight screencast which will teach you all you need to know:\n\n* [Meet EventMachine](http:\u002F\u002Fwww.pluralsight.com\u002Fcourses\u002Fmeet-eventmachine) - introduction to EM, Fibers, building an API with Goliath\n\nAdditionally, you can also watch this presentation from GoGaRuCo 2011, which describes the design and motivation behind Goliath:\n\n* [0-60 with Goliath: Building high performance web services](http:\u002F\u002Fconfreaks.com\u002Fvideos\u002F653-gogaruco2011-0-60-with-goliath-building-high-performance-ruby-web-services)\n\nOther resources:\n\n* [Asynchronous HTTP, MySQL, etc](https:\u002F\u002Fgithub.com\u002Fpostrank-labs\u002Fgoliath\u002Fwiki\u002FAsynchronous-Processing)\n* [Response streaming with Goliath](https:\u002F\u002Fgithub.com\u002Fpostrank-labs\u002Fgoliath\u002Fwiki\u002FStreaming)\n* [Examples](https:\u002F\u002Fgithub.com\u002Fpostrank-labs\u002Fgoliath\u002Ftree\u002Fmaster\u002Fexamples)\n\n## Discussion and Support\n\n* [Source](https:\u002F\u002Fgithub.com\u002Fpostrank-labs\u002Fgoliath)\n* [Issues](https:\u002F\u002Fgithub.com\u002Fpostrank-labs\u002Fgoliath\u002Fissues)\n* [Mailing List](http:\u002F\u002Fgroups.google.com\u002Fgroup\u002Fgoliath-io)\n\n## License & Acknowledgments\n\nGoliath is distributed under the MIT license, for full details please see the LICENSE file.\n","Goliath 是一个非阻塞式的 Ruby Web 服务器框架，旨在提供高性能、可维护的异步处理能力。它基于 EventMachine 反应器构建，并利用 Ruby 1.9+ 中引入的纤程（Fiber）特性，将复杂的回调代码转换为更易于理解和维护的线性执行模式。Goliath 支持 Rack API 和中间件，配置简单，能够实现完全异步的数据处理，包括流式上传、请求\u002F响应以及 WebSocket 等场景。此框架适合需要高并发处理能力和良好性能表现的应用开发环境，如实时数据处理服务或大规模在线应用后端。",2,"2026-06-11 03:15:29","top_language"]