TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Async Rails 3 stack

26 pointsby igrigorikalmost 15 years ago

1 comment

igrigorikalmost 15 years ago
Since this has come up a few times already: ab -c 5 -n 10 <a href="http://127.0.0.1:3000/widgets/http" rel="nofollow">http://127.0.0.1:3000/widgets/http</a><p>That's not a benchmark, it's a proof of concept: <a href="http://github.com/igrigorik/async-rails/blob/master/app/controllers/widgets_controller.rb#L3" rel="nofollow">http://github.com/igrigorik/async-rails/blob/master/app/cont...</a><p>/widgets/http makes an http request to /widgets, which does a 1s sleep query inside of mysql. All of this is happening on the same reactor loop, and finishes with ~2s, aka, the sleeps are not blocking the reactor and hence the "async stack".