Skip to content

Instantly share code, notes, and snippets.

@rthbound
Created June 25, 2015 19:40
Show Gist options
  • Save rthbound/7874818e8d99520a4620 to your computer and use it in GitHub Desktop.
Save rthbound/7874818e8d99520a4620 to your computer and use it in GitHub Desktop.
comparing concurrent-ruby to browser concurrency

All requests made to same resource: http://httpbin.org/delay/1 The minimum possible response time for a single request: 1 second

Scenario 1: Use concurrent-ruby to make 64 requests as concurrently as possible On my machine (8 processors), performing 64 requests as concurrently as possible took 46.2 seconds total. The average response time was 1.18s.

Scenario 2: Use javascript/browser to make 64 requests as concurrently as possible Using google chrome, performing 64 requests as concurrently as possible took 3.09 seconds total. The average response time was also ~1s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment